Classless interdomain routing (CIDR) is a technique supported by BGP4 and based on route aggregation. CIDR allows routers to group routes together to reduce the quantity of routing information carried by the core Internet routers. With CIDR, several IP networks appear to networks outside the group as a single, larger entity. With CIDR, IP addresses and their subnet masks are written as four octets, separated by periods, and followed by a forward slash and a two-digit number that represents the subnet mask. CIDR representation can be either a forward slash with a one-digit number or a forward slash with a two-digit number (for example, 131.108.1/24 or 188.8.131.52/8).
In the past few years, the expansion of the Internet has been phenomenal. Currently, the Internet uses more than 100,000 routes. From 1994 through 1996, the routing table increased from approximately 20,000 entries to more than 42,000. Currently, there are over 120,000 IP routing entries. How can network administrators reduce the large routing table size? Each routing entry requires memory and a table lookup by the router each time a packet is required to reach a destination. Reducing memory requirements and the time it takes to send a packet to the destination provides faster response times for packets to travel around the Internet.
CIDR helps to reduce the number of routing table entries and memory requirements. CIDR helps conserve resources because it removes the limitation of using the default mask (which wastes IP address space) and leaves the addressing up to the IP designer. Routers use CIDR to group networks together to reduce routing table size and memory requirements. CIDR is typically represented with the network number/bits used in the mask, such as 184.108.40.206/24, or the equivalent of 220.127.116.11 255.255.255.0. BGP and classless routing protocols use CIDR to reduce routing table entries, allowing faster lookup and requiring less memory on Cisco routers, for example.
Classful and Classless Routing Protocols
Routing protocols can also be classed, or described, as classful and classless.
Classful addressing, namely Classes A, B, and C (Class D is reserved for multicasts and Class E is reserved for future use), defines a set number of binary bits for the subnet portion. For example, a Class A network ranges from 1 to 127 and uses a subnet mask of 255.0.0.0. A Class B network uses the mask 255.255.0.0, and a Class C network uses 255.255.255.0. Classful routing protocols apply the same rules. If a router is configured with a Class A address of 10.1.1.0, the default mask of 255.0.0.0 is applied, and so forth. This routing method does not scale well, so to design networks to better utilize address space, you can use classless routing, which enables the network designer to apply different masks to Class A, B, and C networks to better utilize address space. For example, you can use a Class B network, such as 18.104.22.168, and apply a Class C mask (255.255.255.0 or /24 mask).
Classful routing protocol examples include RIP and IGRP. Examples of classless routing protocols are OSPF, IS-IS, EIGRP, and BGP. With classless routing, the ability to apply summarization techniques allows for a reduction in routing table size. Over 100,000 IP routing table entries exist on the Internet. Reducing the IP route table size allows for faster delivery of IP packets and lower memory requirements. BGP is commonly referred to as a path vector protocol. To accomplish CIDR, you must allocate subnets at the common bit boundary, ensuring that your networks are continuous. For example, allocating 22.214.171.124/22 to one location and 126.96.36.199/24 to another results in a discontinuous allocation and does not allow CIDR to work properly.
Was this article helpful?