Cidr

VLSM was a step up from subnetting because it relayed subnet information through routing protocols. This idea leads directly into this section on CIDR, which is documented in the following RFCs: 1517, 1518, 1519, and 1520. CIDR is an effective method to stem the tide of IP address allocation as well as routing table overflow. Without the implementation of CIDR in 1994 and 1995 in RFC 1817, the Internet would not be functioning today because the routing tables would have been too large for the routers to handle.

The primary requirement for CIDR is the use of routing protocols that support it, such as RIP-2, OSPFv2, and BGP-4. CIDR can be thought of as advanced subnetting. The subnetting mask, previously a number with special significance, becomes an integral part of routing tables and protocols. A route is no longer just an IP address that has been interpreted according to its class with the corresponding network and host bits.

Validating a CIDRized Network

The routing tables within the Internet have been growing as fast as the Internet itself. This growth has caused an overwhelming utilization of Internet routers' processing power and memory utilization, consequently resulting in saturation.

Between 1988 and 1991, the Internet's routing tables doubled in size every 10 months. This growth would have resulted in about 80,000 routes by 1995. Routers would have required approximately 25 MB of dedicated RAM to keep track of them all, and this is just for routers with a single peer. Through the implementation of CIDR, the number of routes in 1996 was about 42,000. Today, the routing table is about 100,000 routes at the core of the Internet. Without CIDR to aggregate these routes, the routing table size of a BGP-speaking router would be approximately 775,000 routes. This would shut down most common BGP-speaking routers due to memory utilization requirements, and the CPU would be degraded.

The major benefit of CIDR is that it enables continuous, uninterrupted growth of large networks. CIDR enables routers to group routes to reduce the quantity of routing information that is carried by a network's routers. With CIDR, several IP networks appear to networks outside the group as a single, larger entity. CIDR eliminates the concept of Class A, B, and C networks and replaces this concept with a generalized IP prefix.

Some of the benefits of using CIDR within your network are as follows:

• Reduces the local administrative burden of updating external route information

• Saves routing table space in routers by using route aggregation

38 Chapter 1: Networking and Routing Fundamentals

Reduces route-flapping and convergence issues Reduces CPU and memory load on a router

Enables the delegation of network numbers to customers or other portions of the network Increases efficiency in the use of available address space

What Do Those Slashes Mean?

The terms /16 and /24 refer to the number of bits of the network part of the IP address. A former Class B address might appear as 172.24.0.0/16, which is the same as 256 Class Cs, which can appear as 192.200.0.0/16. A single Class C appears as 192.201.1.0/24 when using CIDR. This new look to IP addresses consists of an IP address and a mask length. A mask length is often called an IP prefix. The mask length specifies the number of left-most contiguous significant bits in the corresponding IP address.

For example, the CIDRized IP address of 172.24.0.0/16 indicates that you are using 172.24.0.0255.255.0.0. The /16 is an indication that you are using 16 bits of the mask when counting from the far left. Figure 1-15 demonstrates how CIDR defines its mask.

Figure 1-15 Example of CIDR Addressing

Prefix

mask 255.255.255.0 mask 255.255.0.0

11000110 00100000

11111111 11111111

11111111 11111111

Prefix length

Supernet

00000001

11111111 00000000

Natural mask

00000000

00000000 00000000

198.32.1.0 255.255.255.0 <—>-198.32.1.0/24 198.32.0.0 255.255.0.0 <->198.32.0.0/16

Important CIDR Terms

A network is called a supernet when the IP prefix contains fewer bits than the network's natural mask. For example, the Class C address 200.34.5.0 has a natural mask of 255.255.255.0. This address can also be represented in CIDR terms as 200.34.0.0/16. Therefore, because the natural mask is 24 bits and the CIDR mask is 16 bits (16 - 24), this network is referred to as a supernet. Simply put, supernets have an IP prefix that is shorter than the natural mask.

This enables the more specific contiguous networks—such as 200.34.5.0, 200.34.6.0, and 200.34.7.0—to be summarized into the one CIDR advertisement, which is referred to as an aggregate. Simply put, aggregates indicate any summary route. Figure 1-16 demonstrates how CIDR can be used to benefit your network by reducing routing tables.

Figure 1-16 Example of CIDR Benefits on Routing Tables

10000011.00010100.

000000

Host bits -

00.00000000

<-VLSM Network Prefix->-

IP Classless

Use IP classless in your routers and use a default route inside your autonomous system. The ip classless command prevents the existence of a single subnet route from blocking access through the default route to other subnets. For those of you who are running Cisco IOS Software Release 12.0 and later, IP classless is enabled by default. IP classless causes the router to forward packets that are destined for unknown subnets to the best supernet route possible, instead of dropping them. In other words, if a specific route is not available, a less-specific route will be taken, provided that one exists. This is opposite to the old classful idea, in which if a specific route did not exist, the packets were dropped.

CIDR Translation Table

Table 1-8 provides basic CIDR information.

Table 1-8 CIDR Translation Table

CIDR

Dotted Decimal Format

Inverse Dotted Decimal Format

/1

128.0.0.0

127.255.255.255

/2

192.0.0.0

63.255.255.255

/3

224.0.0.0

31.255.255.255

/4

240.0.0.0

15.255.255.255

/5

248.0.0.0

7.255.255.255

/6

252.0.0.0

3.255.255.255

/7

254.0.0.0

1.255.255.255

/8

255.0.0.0

0.255.255.255

/9

255.128.0.0

0.127.255.255

40 Chapter 1: Networking and Routing Fundamentals

Table 1-8 CIDR Translation Table (Continued)

CIDR

Dotted Decimal Format

Inverse Dotted Decimal Format

/10

255.192.0.0

0.63.255.255

/11

255.224.0.0

0.31.255.255

/12

255.240.0.0

0.15.255.255

/13

255.248.0.0

0.7.255.255

/14

255.252.0.0

0.3.255.255

/15

255.254.0.0

0.1.255.255

/16

255.255.0.0

0.0.255.255

/17

255.255.128.0

0.0.127.255

/18

255.255.192.0

0.0.63.255

/19

255.255.224.0

0.0.31.255

/20

255.255.240.0

0.0.15.255

/21

255.255.248.0

0.0.7.255

/22

255.255.252.0

0.0.3.255

/23

255.255.254.0

0.0.1.255

/24

255.255.255.0

0.0.0.255

/25

255.255.255.128

0.0.0.127

/26

255.255.255.192

0.0.0.63

/27

255.255.255.224

0.0.0.31

/28

255.255.255.240

0.0.0.15

/29

255.255.255.248

0.0.0.7

/30

255.255.255.252

0.0.0.3

/31

255.255.255.254

0.0.0.1

/32

255.255.255.255

0.0.0.0

Manually Computing the Value of a CIDR IP Prefix

To manually compute the CIDR IP prefix, refer to the following example, with a 5-bit-long subnet:

Compute the CIDR IP prefix as follows:

1 The four octets represent 32 bits.

2 This example is using only 19 bits.

2 This example is using only 19 bits.

Case Study: VLSMs 41

3 The first two octets use 16 bits. The third octet uses only 3 bits. Five remaining bits are not used, as follows:

128

64

32

16

8

4

2

1

x

x

x

1

1

1

1

1

4 Add the remaining 5 bits using the binary conversion: 16 + 8 + 4 + 2 + 1 = 31.

5 Add 31 to the octet, where the value was computed from (0 + 31 = 31).

6 The final output of this CIDR block is 166.38.0.0 through 166.38.31.255.

Was this article helpful?

0 0

Post a comment