TCP/IP Protocol Suite: Table Of Contents
CIDR – Q&A
Questions
- What are the limitations of IPv4 address classes?
- How a large number of IP addresses are wasted using IPv4
address classes?
- What are the possible solutions to the limitations of IP
addressing?
- What is CIDR?
- Which RFCs discuss about CIDR?
- What is the difference between classful IP addressing and
classless IP addressing?
- How is a network ID assigned in a CIDR IP address?
- How is an IP address represented in CIDR notation?
- What are the advantages of CIDR?
- How CIDR can be used to effectively manage the IP address
space?
- How CIDR reduces the number of entries in a routing
table?
- Will CIDR completely eliminate IP address crunch
problem?
Answers
- What are the limitations of IPv4 address classes?
- A large number of IP addresses are wasted because of using IP address
classes.
- The routing tables will become large. A separate routing table entry is
needed for each network resulting in a large number of routing table entries.
- How a large number of IP addresses are wasted using IPv4 address
classes?
- What are the possible solutions to the limitations of IP
addressing?
- IP version 6 (IPv6) or IP next generation (IPng). This is the latest
version of IP. This solves a lot of problems in IPv4. This document doesn’t
discuss about IPv6.
- Classless Inter Domain Routing (CIDR).
- What is CIDR?
- Which RFCs discuss about CIDR?
- What is the difference between classful IP addressing and classless IP
addressing?
- How is a network ID assigned in a CIDR IP address?
- How is an IP address represented in CIDR notation?
- What are the advantages of CIDR?
- CIDR can be used to effectively manage the available IP address space.
- CIDR can reduce the number of routing table entries.
- How CIDR can be used to effectively manage the IP address space?
- How CIDR reduces the number of entries in a routing table?
- Will CIDR completely eliminate IP address crunch problem?
The limitations of IPv4 address classes are:
If a network has slightly more number of hosts than a particular class, then it
needs either two IP addresses of that class or the next class of IP address.
For example, let use say a network has 300 hosts, this network needs either a
single class B IP address or two class C IP addresses. If class B address is
allocated to this network, as the number of hosts that can be defined in a
class B network is (2^16 – 2), a large number of host IP addresses are wasted.
If two class C IP addresses are allocated, as the number of networks that can
be defined using a class C address is only (2^21), the number of available
class C networks will quickly exhaust. Because of the above two reasons, a lot
of IP addresses are wasted and also the available IP address space is rapidly
reduced.
The possible solutions to the limitation of IPv4 addressing are:
Classless Inter Domain Routing (CIDR) is a method for assigning IP addresses
without using the standard IP address classes like Class A, Class B or Class C.
In CIDR, depending on the number of hosts present in a network, IP addresses
are assigned.
RFCs 1517, 1518, and 1519 discusses about CIDR.
The difference between classful IP addressing and classless IP addressing is in
selecting the number of bits used for the network ID portion of an IP address.
In classful IP addressing, the network ID portion can take only the predefined
number of bits 8, 16, or 24. In classless addressing, any number of bits can
be assigned to the network ID.
In CIDR IP addressing, the first ‘n’ bits of an IP address are assigned to
identify the network and the remaining bits are used to identify the host,
where the value of ‘n’ may be between 1 to 31. The value of ‘n’ depends on the
number of hosts in the network.
In CIDR notation, an IP address is represented as A.B.C.D /n, where “/n” is
called the IP prefix or network prefix. The IP prefix identifies the number of
significant bits used to identify a network. For example, 192.9.205.22 /18
means, the first 18 bits are used to represent the network and the remaining 14
bits are used to identify hosts.
The advantages of CIDR over the classful IP addressing are:
Using CIDR IP addressing, any number of contiguous bits can be assigned to
identify networks, depending on the number of hosts it needs to support. This
will greatly reduce the number of wasted IP addresses. For example, let us say
a network has 900 hosts. If classful IP addressing is used, this network needs
4 class C IP addresses or one class B IP address. If a class B IP address is
used, as the maximum number of hosts in a class B network is 65534, a very
large number (65534 – 900) of host IP addresses will be wasted. As the number
of class C IP networks is limited (2097152), it is not preferable to assign 4
class C IP addresses to this network. On the other hand, if CIDR is used, then
this network can be assigned an IP address with a network prefix of 22 (i.e.
/22). This means, 10 bits are available for hosts, resulting in 1024 available
host IP addresses, satisfying the exact requirements of the network. So CIDR
the IP address space can be effectively used.
Using classful IP addressing, a separate entry is needed in the routing table
of a router for each network. This results in a routing table with a large
number of entries due to the existence of a large number of networks. As each
router has its own limitation, this large routing table will lead to reduced
performance and eventual breakdown of the router. If CIDR addressing is used,
a single entry can be used to represent a group of networks. This will reduce
the number of entries in the router. This is known as route aggregation. The
routes for the individual networks will be present in another router down the
path. Each entry in the router will have a network prefix associated with it.
The network prefix is used to identify the correct network from the given IP
address.
No. Even using CIDR, all the available IP addresses will get used at some
point in time. The final solution to this problem is to use the next version
of IP (IPv6).
TCP/IP Protocol Suite: Table Of Contents