Classless Interdomain Routing (CIDR)


Classless interdomain routing (CIDR) is an industry standard for displaying the number of subnet bits used with the IP address of a host or a network. If, for example, you have a 172.16.10.1 address with a 255.255.255.0 mask, instead of writing the IP address and subnet mask separately, you can combine them. For example, 172.16.10.1/24 means that the subnet mask has 24 out of 32 bits on.

The following list shows all the possible CIDRs:

255.0.0.0=/8 255.128.0.0=/9 255.192.0.0=/10 255.224.0.0=/11 255.240.0.0=/12 255.248.0.0=/13 255.252.0.0=/14 255.254.0.0=/15 255.255.0.0=/16 255.255.128.0=/17 255.255.192.0=/18 255.255.224.0=/19 255.255.240.0=/20 255.255.248.0=/21 255.255.252.0=/22 255.255.254.0=/23 255.255.255.0=/24 255.255.255.128=/25 255.255.255.192=/26 255.255.255.244=/27 255.255.255.240=/28 255.255.255.248=/29 255.255.255.252=/30

Notice that the CIDR list starts at a minimum of /8 and can’t go higher than /30. This is because you must leave two hosts at a minimum.

Cisco and CIDR

Cisco has not always followed the CIDR standard. Take a look at the way a Cisco 2500 series router asks you to put the subnet mask in the configuration when using the Setup mode:

Configuring interface Ethernet0:   Is this interface in use? [yes]:return   Configure IP on this interface? [yes]:return     IP address for this interface: 1.1.1.1     Number of bits in subnet field [0]: 8     Class A network is 1.0.0.0, 8 subnet bits; mask is /16 

Notice that the router asks for the number of bits used only for subnetting, which does not include the default mask. This is nothing short of idiotic. Cisco used this subnetting method on the CCNA 1.0 exam. When dealing with these types of questions, remember that your answers involve the number of bits used for creating subnets, not the number of bits in the subnet mask. The industry standard is that you count all bits used in the subnet mask and then display that number as a CIDR—for example, /25 is 25 bits.

The newer Cisco routers, however, run a Setup script that no longer asks you to enter the number of bits used only for subnetting. Here is an example of a new 1700 series router in Setup mode:

Configure IP on this interface? [no]: y  IP address for this interface:1.1.1.1  Subnet mask for this interface [255.0.0.0]:255.255.0.0  Class A network is 1.0.0.0, 16 subnet bits; mask is /16

Notice that the Setup mode asks you to enter the subnet mask address. It then displays the mask in CIDR format. Much better.

Configuring Subnet Mask Display Formats

When configuring IP addresses in a Cisco router, you cannot enter the number of bits used in a subnet mask in a router—for example, 172.16.10.1/24. It would be nice to be able to do that. You must type out the mask: 172.16.10.1 255.255.255.0.

By default, the router displays a CIDR output for the number of bits used in the mask. If you want the router to display the full mask, use the terminal ip netmask-format command as follows:

Router#sh int f0 FastEthernet0 is up, line protocol is up   Hardware is PQUICC_FEC, address is 0050.547d.1787     (bia 0050.547d.1787)   Internet address is 172.16.10.20/24 Router#terminal ip netmask-format ?   bit-count    Display netmask as number of significant                  bits   decimal      Display netmask in dotted decimal   hexadecimal  Display netmask in hexadecimal Router#terminal ip netmask-format decimal Router#sh int f0 FastEthernet0 is up, line protocol is up   Hardware is PQUICC_FEC, address is 0050.547d.1787     (bia 0050.547d.1787)   Internet address is 172.16.10.20 255.255.255.0 

As an example, to view your mask information in hexadecimal, use the following command:

Router#term ip netmask-format hex Router#sh int f0 FastEthernet0 is up, line protocol is up   Hardware is PQUICC_FEC, address is 0050.547d.1787     (bia 0050.547d.1787)   Internet address is 172.16.10.20 0xFFFFFF00




CCDA. Cisco Certified Design Associate Study Guide
CCDA: Cisco Certified Design Associate Study Guide, 2nd Edition (640-861)
ISBN: 0782142001
EAN: 2147483647
Year: 2002
Pages: 201

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net