Classless Inter-Domain Routing
Table of Contents
Classless Inter-Domain Routing
Overview
CIDR is a method of allocating IP addresses that allows for more efficient use of IP address space compared to the traditional classful addressing system.
It introduces the concept of a subnet mask, which determines the size of the network and the number of hosts it can accommodate.
Key Concepts
- Network prefix: The number of bits in the subnet mask that are set to 1. This determines the size of the network.
- Host portion: The remaining bits in the subnet mask that are set to 0. This determines the number of hosts within a network.
CIR Notation
CIDR notation represents an IP address and its subnet mask in a single format.
It consists of the IP address followed by a slash and the network prefix.
For example, 192.168.1.0/24 represents a network with a network prefix of 24 bits and a subnet mask of 255.255.255.0
Benefits of CIR
- Efficient IP address allocation: CIDR allows for more flexible and efficient allocation of IP addresses, reducing the risk of address exhaustion.
- Variable-length subnet masking (VLSM): CIDR supports VLSM, which allows for the creation of subnets of different sizes within a larger network.
- Simplified routing: CIDR simplifies routing by reducing the number of routes required.
Example
Consider the IP address 192.168.1.0 with a subnet mask of 255.255.255.0.
This represents a network with a network prefix of 24 bits and a host portion of 8 bits.
The network can accommodate 28 - 2 = 254 hosts (excluding the network address and broadcast address).
CIDR notation: 192.168.1.0/24