0% found this document useful (0 votes)
6 views

Classless Inter Domain Routing

Uploaded by

vishal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Classless Inter Domain Routing

Uploaded by

vishal
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Classless Inter Domain Routing (CIDR)

 Difficulty Level : Medium


 Last Updated : 08 Aug, 2019
As we have already learned about Classful Addressing, so in this
article, we are going to learn about Classless Inter-Domain Routing.
which is also known as Classless addressing. In the Classful
addressing the no of Hosts within a network always remains the
same depending upon the class of the Network.
Class A network contains 224 Hosts,
Class B network contains 216 Hosts,
Class C network contains 28 Hosts
Now, let’s suppose an Organization requires 2 14 hosts, then it must
have to purchase a Class B network. In this case, 49152 Hosts will
be wasted. This is the major drawback of Classful Addressing.
In order to reduce the wastage of IP addresses a new concept
of Classless Inter-Domain Routing is introduced. Now a
days IANA is using this technique to provide the IP addresses.
Whenever any user asks for IP addresses, IANA is going to assign
that many IP addresses to the User.

Representation: It is as also a 32-bit address, which includes a


special number which represents the number of bits that are present
in the Block Id.
a . b . c . d / n
Where, n is number of bits that are present in Block Id / Network Id.
Example:
20.10.50.100/20
Rules for forming CIDR Blocks:
1. All IP addresses must be contiguous.
2. Block size must be the power of 2 (2 n).
If the size of the block is the power of 2, then it will be easy to
divide the Network. Finding out the Block Id is very easy if the block
size is of the power of 2.
Example:
If the Block size is 2 5 then, Host Id will contain 5 bits and Network
will contain 32 – 5 = 27 bits.
1. First IP address of the Block must be evenly divisible by the size of
the block. in simple words, the least significant part should always
start with zeroes in Host Id. Since all the least significant bits of
Host Id is zero, then we can use it as Block Id part.
Example:
Check whether 100.1.2.32 to 100.1.2.47 is a valid IP address block or not?
1. All the IP addresses are contiguous.
2. Total number of IP addresses in the Block = 16 = 2 4.
3. 1st IP address: 100.1.2.00100000
Since, Host Id will contains last 4 bits and all the least significant 4
bits are zero. Hence, first IP address is evenly divisible by the size
of the block.
All the three rules are followed by this Block. Hence, it is a valid IP address
block.

Classless Inter-Domain Routing (CIDR) is a group of IP addresses that are allocated


to the customer when they demand a fixed number of IP addresses.
In CIDR there is no wastage of IP addresses as compared to classful addressing
because only the numbers of IP addresses that are demanded by the customer are
allocated to the customer.
The group of IP addresses is called Block in Classless Inter - Domain (CIDR).
CIDR follows CIDR notation or Slash notation. The representation of CIDR notation
is x.y.z.w /n the x.y.z.w is IP address and n is called mask or number of bits that are
used in network id.

Properties of CIDR Block


The properties of CIDR block are as follows −

 The IP addresses in a block are continuous.


 The first address of a block should be exactly divisible by the number of
addresses of a block.
 The size of the Block should be power of 2.

Use of CIDR
Variable-length subnet masking is the foundation of CIDR (VLSM). It can now
specify prefixes of any duration, making it much more powerful than the previous
method.
Two collections of numbers make up CIDR IP addresses. The network address is
written as a prefix, similar to how an IP address is written (e.g. 192.255.255.255).
The suffix, which means how many bits are in the whole address (e.g. /12), is the
second component. A CIDR IP address will look anything like this when put together

192.255.255.255/12
As part of the IP address, the network prefix is also defined. These changes are
based on how many bits are needed. As an illustration, in the above example, the
first 12 bits of the address are for the network, while the last 20 bits are for host
addresses.

CIDR Notation
Using CIDR we can assign an IP address to host without using standard id address
classes like Class A, B, and C.
In CIDR we simply tell how many bits are used for network id. The network id bits are
provided after the '/' symbol. Like /10 means 10 bits are used for the network id part
and remaining 32-10=22 bits are used for the host id part.
The advantage of using CIDR notation is that it reduces the number of entries in the
routing table and also it manages the ip address space.

Disadvantages
The disadvantages of using CIDR Notation are as follows −

 Using CIDR it is complex to determine the route. By using classful addresses,


we are directly having separate tables for class A, Class B, Class C.
 So we directly go to these tables by seeing the prefix of IP address. But by
using CIDR, we don't have these tables separately. All entries are placed in a
single table. So, it is difficult to find a route.

Netmasks and Subnets


The process of dividing a network into smaller network sections is
called subnetting. This can be useful for many different purposes and
helps isolate groups of hosts from each other to deal with them more
easily.

As we discussed above, each address space is divided into a network


portion and a host portion. The amount of the address that each of these
take up is dependent on the class that the address belongs to. For
instance, for class C addresses, the first 3 octets are used to describe the
network. For the address 192.168.0.15, the 192.168.0 portion describes
the network and the 15 describes the host.
By default, each network has only one subnet, which contains all of the
host addresses defined within. A netmask is basically a specification of the
amount of address bits that are used for the network portion. A subnet
mask is another netmask within used to further divide the network.

Each bit of the address that is considered significant for describing the
network should be represented as a “1” in the netmask.

For instance, the address we discussed above, 192.168.0.15 can be


expressed like this, in binary:

1100 0000 - 1010 1000 - 0000 0000 - 0000 1111


As we described above, the network portion for class C addresses is the
first 3 octets, or the first 24 bits. Since these are the significant bits that
we want to preserve, the netmask would be:

1111 1111 - 1111 1111 - 1111 1111 - 0000 0000


This can be written in the normal IPv4 format as 255.255.255.0. Any bit
that is a “0” in the binary representation of the netmask is considered
part of the host portion of the address and can be variable. The bits that
are “1” are static, however, for the network or subnetwork that is being
discussed.

You might also like