Classless Inter-Domain Routing (CIDR)

CIDR Notation

Classless Inter-Domain Routing (CIDR) specifies an IP address range by the combination of an IP address and its associated network mask. CIDR notation uses the following format -

xxx.xxx.xxx.xxx/n

where n is the number of (leftmost) '1' bits in the mask. For example:

192.168.12.0/23

applies the network mask 255.255.254.0 to the 192.168 network, starting at 192.168.12.0. This notation represents the address range 192.168.12.0 - 192.168.13.255. Compared to traditional class-based networking, 192.168.12.0/23 represents an aggregation of the two Class C networks 192.168.12.0 and 192.168.13.0 each using the default network mask 255.255.255.0.

CIDR supports Internet address allocation and message routing independent of the traditional class of a given IP address range. For example:

10.4.12.0/22

represents the address range 10.4.12.0 - 10.4.15.255 by employing the network mask 255.255.252.0. This effectively represents an apportioning of four Class C networks within the much larger Class A space.

CIDR notation is sometimes adopted even on non-CIDR networks. In non-CIDR IP subnetting, however, the value of n is restricted to either 8 (Class A), 16 (Class B) or 24 (Class C) from the Internet address allocation and routing perspective.

How CIDR Works

The flexibility of CIDR derives from the ability of routers to work with subnet masks other than the traditional Class A, B, or C masks (values of n other than 8, 16, or 24). For CIDR to work, Internet routing protocols must be implemented that support the CIDR conventions. Popular routing protocols like BGP (Border Gateway Protocol) and OSPF (Open Shortest Path First) were updated to support CIDR years ago, but some less popular protocols still do not support CIDR today.

Routers on the Internet backbone (WAN network between ISPs) all generally support CIDR. Backbone support of CIDR is essential to achieve conservation of IP address space. Private networks and small public LANs have much less need to conserve addresses, however, and therefore may not utilize CIDR.

For aggregation to work, the subnets involved must be contiguous (numerically adjacent) in the address space. CIDR cannot, for example, aggregate 192.168.12.0 and 192.168.15.0 into a single route unless the intermediate .13 and .14 address ranges are included. The 192.168.12.0/24 route does exactly this.

CIDR and IPv6

IPv6 utilizes CIDR routing technology and CIDR notation in the same way as IPv4. IPv6 is designed for fully classless addressing.

Supernetting

Supernetting allows the use of multiple IP networks on the same interface. Also called Classless InterDomain Routing (CIDR). It is the reverse of subnetting, which allows the use of a single IP network on multiple interfaces.

Officially, supernetting is the term used when multiple network addresses of the same Class are combined into blocks. If the IP networks are contiguous, you may be able to use a supernet. If the IP networks are not contiguous, you would need to use sub-interfaces. These are not currently supported on some manufacturers routers but are supported on routers from Cisco Systems. Needless to say all routers in the network in question must understand CIDR addressing or ir don't work!

A prerequisite for supernetting is that the network addresses be consecutive and that they fall on the correct boundaries. To combine two Class C networks, the first address' third octet must be evenly divisible by 2. If you would like to supernet 8 networks, the mask would be 255.255.248.0 and the first address' third octet needs to be evenly divisible by 8. For example, 198.41.15.0 and 198.41.16.0 could NOT be combined into a supernet, but you would be able to combine 198.41.18.0 and 198.41.19.0 into a supernet.

An IP address is a 32-bit number (4 bytes, called "octets", separated by periods, commonly called "dots.") Supernetting is most often used to combine Class C addresses (the first octet has values from 192 through 223). A single Class C IP network has 24 bits for the network portion of the IP address, and 8 bits for the host portion of the IP address. This gives a possibility of 256 hosts within a Class C IP network (2^8=256).

The subnet mask for a Class C IP network is normally 255.255.255.0. To use a supernet, the number of bits used for the subnet mask is REDUCED. For example, by using a 23 bit mask (255.255.254.0 -- 23 bits for the network portion of the IP network, and 9 bits for the host portion), you effectively create a single IP network with 512 addresses. Supernetting, or combining blocks of IP networks, is the basis for most routing protocols currently used on the Internet.

For Example: Two Class "C" network numbers of 198.41.78.0 and 198.41.79.0.

The subnet mask for this example supernet is 23 bits, or 255.255.254.0. ALL devices on the network MUST be using this subnet mask. Any device that is not using this subnet mask would be unreachable.

The broadcast address for ALL devices on the example supernet is 198.41.79.255. Most modern devices don't require you to fill out the broadcast address, as it can be deduced from the IP address and the subnet mask. The broadcast address is used as a special destination signifying ALL hosts on the network.

As with any IP network, the first number in the range (.0 in a class "C") has special significance, and can't be assigned to any hosts on the network. The first number in the range is referred to as the "network number". Conversely, the last, or highest number in the range (.255 in a class "C") is called the broadcast address, and also can't be used by any host on the network.

Because of these unique addresses, it would probably be wise not to use the 198.41.78.255 and 198.41.79.0 addresses (in the above example), even though these SHOULD be perfectly legal addresses for hosts when using a supernet.

There is one additional prerequisite for supernetting, you MUST EITHER be running static routing EVERYWHERE or be using a classless routing protocol such as RIP2 (or OSPF) which include subnet mask information and can pass supernetting information in order for this to work. Standard RIP does not transmit the subnet mask information.

Typically a router knows how to interpret an IP address by looking at the prefix (first 2 bits); this indictes whether it is Class-A, Class-B or Class-C. In turn the class of the network determines how many of the bits are network number bits and how many of the bits are host number bits. CIDR-capable routers do not use this system. Instead they explicitly store the number of bits used to name the network in the router. This enables them to view several contiguous Class-C netowrk as a single network.

In short the details for CIDR work more or less the same as for subnetting but you merge up instead of splitting down.


::: Made with CoffeeCup : Web Design Software & Website Hosting :::