Networks Training

  • About
  • My Books
  • IP Tools
  • HOME
  • Cisco Networking
    • Cisco General
    • Cisco IOS
    • Cisco VPN
    • Cisco Wireless
  • Cisco ASA
    • Cisco ASA General
    • Cisco ASA Firewall Configuration
  • Certifications Training
    • CCNA Training
    • Cisco Certifications
    • I.T Training
  • General
    • Tech News
    • General Networking
    • IP Telephony
    • Network Security
    • Product Reviews
    • Software
  • Cisco Routers
  • Cisco Switches
You are here: Home / General Networking / Classless InterDomain Routing (CIDR) Cheat Sheet – Guide & PDF Download

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

Edited By Harris Andrea

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

Table of Contents

Toggle
  • What is Classless Inter-Domain Routing (CIDR)
  • How CIDR is used
  • CIDR Notation
  • CIDR Cheat Sheet
  • Some Examples
    • Related Posts

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.

MORE READING:  EIGRP Variance and Unequal Cost Load Balancing in Networking

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

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:  How OpUtils' IP scanner enhances network visibility for effective network management
CIDR Prefix Total Host IPs Usable Host IPs Netmask # of subnets relative to Class A,B,C
/32 1 1 255.255.255.255 1/256 C
/31 2
O
255.255.255.254 1/128 C
/30 4 2 255.255.255.252 1/64 C
/29 8 6 255.255.255.248 1/32 C
/28 16 14 255.255.255.240 1/16 C
/27 32 30 255.255.255.224 1/8 C
/26 64 62 255.255.255.192 1/4 C
/25 128 126 255.255.255.128 1/2 C
/24 256 254 255.255.255.0 1 C
/23 512 510 255.255.254.0 1/128 B
/22 1,024 1,022 255.255.252.0 1/64 B
/21 2,048 2,046 255.255.248.0 1/32 B
/20 4,096 4,094 255.255.240.0 1/16 B
/19 8,192 8,190 255.255.224.0 1/8 B
/18 16,384 16,382 255.255.192.0 ¼ B
/17 32,768 32,766 255.255.128.0 ½ B
/16 65,536 65,534 255.255.0.0 1 B
/15 131,072 131,070 255.254.0.0 1/128 A
/14 262,144 262,142 255.252.0.0 1/64 A
/13 524,288 524,286 255.248.0.0 1/32 A
/12 1,048,576 1,048,574 255.240.0.0 1/16 A
/11 2,097,152 2,097,150 255.224.0.0 1/8 A
/10 4,194,304 4,194,302 255.192.0.0 1/4 A
/9 8,388,608 8,388,606 255.128.0.0 1/2 A
/8 16,777,216 16,777,214 255.0.0.0 1 A
/7 33,554,432 33,554,430 254.0.0.0 2 A
/6 67,108,864 67,108,862 252.0.0.0 4 A
/5 134,217,728 134,217,726 248.0.0.0 8 A
/4 268,435,456 268,435,454 240.0.0.0 16 A
/3 536,870,912 536,870,910 224.0.0.0 32 A
/2 1,073,741,824 1,073,741,822 192.0.0.0 64 A
/1 2,147,483,648 2,147,483,646 128.0.0.0 128 A
/0 4,294,967,296 4,294,967,294 0.0.0.0 256 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
Spread the love

Related Posts

  • Difference Between Routers and Switches in TCP/IP Networks
  • 11 Different Types of IP Addresses Used in Computer Networks
  • Compare and Contrast Network Topologies (Star, Mesh, Bus, Hybrid etc)
  • 11 Networking Companies Like Cisco (Competitors)
  • What is a Wildcard Mask – All About Wildcard Masks Used in Networking

Filed Under: General Networking

Download Free Cisco Commands Cheat Sheets

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

By subscribing to our email list you will be receiving technical tutorials and industry news from time-to-time. You can unsubscribe at any time.

About Harris Andrea

Harris Andrea is an Engineer with more than two decades of professional experience in the fields of TCP/IP Networks, Information Security and I.T. Over the years he has acquired several professional certifications such as CCNA, CCNP, CEH, ECSA etc.

He is a self-published author of two books ("Cisco ASA Firewall Fundamentals" and "Cisco VPN Configuration Guide") which are available at Amazon and on this website as well.

Comments

  1. pavan says

    July 3, 2021 at 4:27 pm

    hi sir
    this is pavan from india my humble request please help i want learn networking for geetting a gob so please help me

  2. tomas says

    February 12, 2025 at 10:31 am

    @pavan you can use youtube for free resources like jeremy it

Leave a 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.

Search this site

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

BLOGROLL

Tech21Century
Firewall.cx

Copyright © 2026 | Privacy Policy | Terms and Conditions | Contact | Amazon Disclaimer | Delivery Policy