Networks Training

  • About
  • My Books
  • SUGGESTED TRAINING

Classless InterDomain Routing (CIDR) Cheat Sheet – Guide & PDF Download

CIDR was invented to facilitate better and more efficient allocation of IP addressing and especially IPv4 addresses which started running out pretty fast when the whole Internet accelerated its pace during the last 2-3 decades.

subnet mask and usable IP table

What is Classless Inter-Domain Routing (CIDR)

As you know, an IPv4 address consists of 32 bits and is represented as four octets (1 octet=8 bits). An IP address is divided into a network part (leftmost bits) and a host part (remaining bits after the network part).

Originally, IP addresses were assigned to organizations and ISP networks in bulk and according to the following 3 classes:

  • Class A IP range: First 8 bits are the network part and remaining 24 bits are the host part (allowing more than 16 million hosts).
  • Class B IP range: First 16 bits are the network part and remaining 16 bits are the host part (allowing 65,535 IP for hosts).
  • Class C IP range: First 24 bits are the network part and remaining 8 bits are the host part (allowing 254 IP for hosts).

The above was very inefficient and resulted in a lot of wasted IP addresses. Let’s say an ISP wanted to get 4000 IP addresses to assign to its customers. The ISP was allocated a whole Class B range of 65,535 host IPs although they wanted only 4000. Thus, around 61,000 IP addresses were wasted.

How CIDR is used

CIDR uses variable length subnet mask (VLSM) which is not based on the hard boundaries of the 3 Classes described above.

The subnet mask is what defines the length of the network and host portions of the IP address.

MORE READING:  What Is the Difference Between Internet and Intranet?

Therefore, instead of having for example 16-bits on the network part (by using the old Class B assignment) you can have for example 20-bits on the network part and thus 12-bits of the remaining length for the host part.

The above example means that you can have 212 = 4096 available IP addresses for Hosts. This means that when an ISP or big enterprise wants to get around 4000 IP addresses (as in our example), it will be allocated a specific subnet range with 20-bits on the network portion and 12-bits on the host portion instead of a whole Class B range.

CIDR Notation

Assume our fictitious ISP (or big enterprise) is assigned the following IP address range (using CIDR notation):

100.45.48.0 /20

The above notation means that the Network part is 20 bits (as indicated by the CIDR prefix number /20 at the end of the IP address range). Therefore, the Host part is 32-20 = 12 bits which allows for a total of 212 = 4096 IP addresses for hosts.

IMPORTANT NOTE

Using our example above, the actual usable IP addresses that can be assigned to hosts are always 2 less than the total number of IPs. This is because we don’t use the network address and the broadcast address for hosts.

Therefore, the above ISP or big enterprise could allocate the following IP addresses to hosts:

100.45.48.1 up to 100.45.63.254 for a total of 4094 usable hosts.

CIDR Cheat Sheet

The table below shows a CIDR cheat sheet which you can download also as PDF file at the end of this article:

MORE READING:  IEEE 802.3ba Standard -100 Gbps Ethernet is Here
CIDR PrefixTotal Host IPsUsable Host IPsNetmask# of subnets relative to Class A,B,C
/3211255.255.255.2551/256 C
/312
O
255.255.255.2541/128 C
/3042255.255.255.2521/64 C
/2986255.255.255.2481/32 C
/281614255.255.255.2401/16 C
/273230255.255.255.2241/8 C
/266462255.255.255.1921/4 C
/25128126255.255.255.1281/2 C
/24256254255.255.255.01 C
/23512510255.255.254.01/128 B
/221,0241,022255.255.252.01/64 B
/212,0482,046255.255.248.01/32 B
/204,0964,094255.255.240.01/16 B
/198,1928,190255.255.224.01/8 B
/1816,38416,382255.255.192.0¼ B
/1732,76832,766255.255.128.0½ B
/1665,53665,534255.255.0.01 B
/15131,072131,070255.254.0.01/128 A
/14262,144262,142255.252.0.01/64 A
/13524,288524,286255.248.0.01/32 A
/121,048,5761,048,574255.240.0.01/16 A
/112,097,1522,097,150255.224.0.01/8 A
/104,194,3044,194,302255.192.0.01/4 A
/98,388,6088,388,606255.128.0.01/2 A
/816,777,21616,777,214255.0.0.01 A
/733,554,43233,554,430254.0.0.02 A
/667,108,86467,108,862252.0.0.04 A
/5134,217,728134,217,726248.0.0.08 A
/4268,435,456268,435,454240.0.0.016 A
/3536,870,912536,870,910224.0.0.032 A
/21,073,741,8241,073,741,822192.0.0.064 A
/12,147,483,6482,147,483,646128.0.0.0128 A
/04,294,967,2964,294,967,2940.0.0.0256 A

DOWNLOAD CIDR CHEAT SHEET PDF

Some Examples

  • In a /24 CIDR subnet there are a total of 256 host IP addresses but the usable host IPs are 256-2= 254
  • In a /30 CIDR subnet there are total of 4 host IPs but the usable host IPs are 4-2=2 . This subnet is usually used in point-to-point link connections (e.g links between routers) where you only need 2 IPs (one on each end of the point-to-point link).  
  • In a /23 CIDR subnet there are total of 512 host IPs but the usable host IPs are 512-2=510

Related Posts

  • 10 Best Network Troubleshooting Software Tools (Free&Paid)
  • DNS Port Number – What is Domain Name System – How DNS Works
  • How to Configure Static Routing on Cisco IOS Routers (Examples)
  • What is a Subnet Mask Used For (on Routers and Hosts)
  • 10 Best Computer Networking Books for Beginners & Experts

Filed Under: General Networking

Download Cisco Commands Cheat Sheets

Enter your Email below to Download our Free Cisco Commands Cheat Sheets for Routers, Switches and ASA Firewalls



By submitting this form, you agree that the information you provide will be transferred to Elastic Email for processing in accordance with their Terms of Use and Privacy Policy. Also, you allow me to send you informational and marketing emails from time-to-time.












Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Categories

About Networks Training

We Provide Technical Tutorials and Configuration Examples about TCP/IP Networks with focus on Cisco Products and Technologies. This blog entails my own thoughts and ideas, which may not represent the thoughts of Cisco Systems Inc. This blog is NOT affiliated or endorsed by Cisco Systems Inc. All product names, logos and artwork are copyrights/trademarks of their respective owners.

Amazon Disclosure

As an Amazon Associate I earn from qualifying purchases.
Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.

Search

Suggested Cisco Training

CISCO CERTIFICATION TRAINING
CISCO CCNA 200-120 TRAINING
CCNA SECURITY 640-554 TRAINING
CCENT ICND1 TRAINING
CISCO ICND2 TRAINING
CISCO CCNP TRAINING

Blogroll

  • Cisco and Other Technologies
  • Firewall.cx
  • IP Balance

Copyright © 2019 · | Privacy Policy | Privacy Tools | Terms and Conditions | Hire Me | Contact | Amazon Disclaimer | Delivery Policy