IP Subnetting Cheat Sheet (free PDF) for Network Engineers

IP Subnetting Cheat Sheet Infographic

IP Subnetting Cheat Sheet, including CIDR Cheat Sheet

With this IP subnetting cheat sheet plus the CIDR Cheat Sheet article, we’ll provide you with all the details and show you how to subnet IP addresses, which are essential for network-related interviews, jobs, and exams. Understanding how subnetting works may seem difficult initially, but it begins to make sense as you continue. You can quickly create and deploy IP subnets that will give your organization the necessary level of design ease, scalability, management, and security you need.

IP Subnetting Cheat Sheet Infographic PDF

I hope you have downloaded the PDF; let’s first understand a few basic things before diving into subnetting.

What is IP subnetting, and why do we need it?

IP Subnetting splits a network into multiple sub-networks, creating a partition based upon a consecutive block of IPv4 addresses, further represented by an IP address and the subnet mask.

Subnetting is widely used to preserve IP addresses and design scalable and secured networks. 

More on this later; let’s first understand IP address and other important concepts related to subnetting.

What is an IP address?

IP Address Explained
IP Address Explained

An IP address is a unique identifier for every computer, server, router, and hardware that connects to the network. But, first, let’s understand a few needy greedy things about IP addresses.

  • It is a 32-bit binary number representing a specific physical location on the network. 
  • Three dots separate this 32-bit number, and four blocks we call octets. Each octet represents 8 bits or 1 byte, and when you multiply by 4, it will give 8×4=32 bits.
  •  IP addresses can be broken down into three categories, namely unicast (used on individual devices), multicast (allows someone to send information to a group of computers), and broadcast (which allows one computer to send information out to everyone). Unicast IP addresses are the most common type and are found on our laptops or other devices to connect to the Internet.

What is a subnet mask?

The subnet mask divides the IP address into the host and network addresses, defining which parts belong to the device and which to the network.

An IP address and a subnet mask provide complete information and numerical identification to any device connecting to the network. Therefore, both types of addresses are always used in conjunction and have a length of 32 bits. These 32 bits are further split into four sections. Each portion is referred to as an Octet and includes 8 bits.

For example:-

Here is IP Address and is Subnet Mask.

When you put the IP address and the subnet mask together, you can separate the network and host parts of the address. Here subnet mask is, so will become Network Address, and the Host Address will become

What is Classless and Classful Ip addressing, and what is the difference?

IPv4 addresses were initially intended to be classful— ranging from Class A to Class E. Also, Unicast IPv4 addresses can be divided into two parts: the network portion and the Host ID portion of the address. Please check the table below.

Classful IP addressing worked within the bounds of the above-defined classes and was an old way of assigning IP addresses and subnets to a network.

As the Internet grew, this restricted assignment of IP addresses became a bottleneck. As a result, a more flexible and practical approach, called Classless IP Addressing, was developed.

What is the difference between Private and Public IP addresses?

  • Private ip addresses, sometimes called Internal ip addresses, are only meant to be used on private networks and should not be routed on the Internet.
  • And then there are Public ip addresses that can only be used on the Internet. You can check your public address by simply googling “what is my address.”
  • IANA has designated the following three blocks of IP address space for private use. 
  • You can refer to the below table for reserved private IP addresses.
Private IP Address with Subnet MaskPrivate IP RangePrivate IP Range denoted in CIDR to to to

What is CIDR notation, and why do we use it?

IETF created Classless Interdomain Routing or CIDR in 1993 to provide greater granularity than classful routing; the CIDR notation is /XX.

It is also an efficient method for allocating IP subnets without any subnet boundaries, which lowered the rate at which Ipv4 addresses were depleted and helped grow the Internet rapidly.

For example: Instead of writing the IP address with a subnet mask,, we can write

What are CIDR Blocks?

CIDR Blocks

CIDR blocks are made up of addresses with the same prefix and the same amount of bits. And with the help of supernetting, you can combine numerous connecting CIDR blocks into a bigger routing network with a shared network prefix.

The length of the prefix determines the size of the CIDR blocks. Using a shorter prefix, for example,, more addresses (approx. 16 Million) can be allocated, resulting in a bigger block. On the other hand, a longer prefix, for example,, represents a smaller block, and you can allocate fewer addresses (6) only.

The Internet Assigned Numbers Authority (IANA) is the first to deal with CIDR blocks. After that, Regional Internet Registries (RIRs) receive huge allocations of IP addresses from IANA. Large geographical regions, such as North America, Africa, and Europe, are served by these large CIDR blocks.

Once an RIR obtains a CIDR block from IANA, it further divides it into smaller pieces to distribute to Local Internet Registries (LIRs). LIRs are generally ISP (Internet Service Providers) and split the CIDR blocks into smaller ones until the end-user is reached. The quantity of unique addresses needed by an end-user determines the size of the block granted to them by LIR.

Organizations that use multiple ISPs must receive provider-independent blocks directly from an RIR or LIR; however, most end-users use blocks assigned by their Internet Service Provider.

What is VLSM, and why do we use it?

When using VLSM, you can divide an IP address space into subnets of different sizes, from 0 to 32 bits. This makes subnets more useful because subnets can have masks of various sizes. CIDR uses VLSMs to create routes.

Quick Tip:- Before choosing a routing protocol, you should always check if the protocol supports VLSM or not. For example, classful routing protocols like RIPv1 and IGRP do not support VLSM.

How to convert Binary to Decimal and Decimal to Binary?

Ipv4 addresses are always represented in dotted-decimal separated by three dots for humans to understand easily. Further, machines convert these decimal numbers into Binary numbers for further processing. So we must know how to convert Binary to Decimal and vice versa. Binary is always represented in 1 or 0. However, any integer or non-integer number is Decimal, for example, 1,2,100,200, etc.

Example:- Convert Binary 11011011 into Decimal.

Binary to Decimal conversion example
Binary to Decimal conversion example

Please refer to the handy table for Binary to Decimal and Decimal to Binary conversion.

1 means the bit is ON
0 means the bit is OFF
Binary to decimal conversion table

IP Subnetting Cheat Sheet with CIDR Cheat Sheet

So now we know the basics of IP addressing and subnetting; let’s put it all together in an IP subnetting cheat sheet for quick reference.

The formula for usable IP addresses always deducts two IP addresses because two IPs are always reserved within any subnet. One IP is Network Address, and the second one is Broadcast Address.

CIDR NotationSubnet MaskTotal Number of NetworksFormula Used for Usable
Hosts= 2^(32 - Network Bits)
- 2
Wildcard Mask
/^(32-0) - 2 = 2^32 - 2= 4,294,967,294255.255.255.255
/1128.0.0.012^(32-1) - 2 = 2^31 - 2 = 2,147,483,646127.255.255.255
/2192.0.0.022^(32-2) - 2 = 2^30 - 2 = 1,073,741,82263.255.255.255
/3224.0.0.032^(32-3) - 2 = 2^29 - 2 = 536,870,91031.255.255.255
/4240.0.0.042^(32-4) - 2 = 2^28 - 2 = 268,435,45415.255.255.255
/5248.0.0.052^(32-5) - 2 = 2^27 - 2 = 134,217,7267.255.255.255
/6252.0.0.062^(32-6) - 2 = 2^26 - 2 = 67,108,8623.255.255.255
/7254.0.0.072^(32-7) - 2 = 2^25 - 2 = 33,554,4301.255.255.255
/8255.0.0.082^(32-8) - 2 = 2^24 - 2 = 16,777,2140.255.255.255
/9255.128.0.092^(32-9) - 2 = 2^23 - 2 = 8,388,6060.127.255.255
/10255.192.0.0102^(32-10) - 2 = 2^22 - 2 = 4,194,3020.63.255.255
/11255.224.0.0112^(32-11) - 2 = 2^21 - 2 = 2,097,1500.31.255.255
/12255.240.0.0122^(32-12) - 2 = 2^20 - 2 = 1,048,5740.15.255.255
/13255.248.0.0132^(32-13) - 2 = 2^19 - 2 = 524,2860.7.255.255
/14255.252.0.0142^(32-14) - 2 = 2^18 - 2 = 262,1420.3.255.255
/15255.254.0.0152^(32-15) - 2 = 2^17 - 2 = 131,0700.1.255.255
/16255.255.0.0 162^(32-16) - 2 = 2^16 - 2 = 65,5340.0.255.255
/17255.255.128.0172^(32-17) - 2 = 2^15 - 2 = 32,7660.0.127.255
/18255.255.192.0182^(32-18) - 2 = 2^14 - 2 = 16,3820.0.63.255
/19255.255.224.0192^(32-19) - 2 = 2^13 - 2 = 8,1900.0.31.255
/20255.255.240.0202^(32-20) - 2 = 2^12 - 2 = 4,0940.0.15.255
/21255.255.248.0212^(32-21) - 2 = 2^11 - 2 = 2,0460.0.7.255
/22255.255.252.0222^(32-22) - 2 = 2^10 - 2 = 1,0220.0.3.255
/23255.255.254.0232^(32-23) - 2 = 2^9 - 2 = 5100.0.1.255
/24255.255.255.0242^(32-24) - 2 = 2^8 - 2 = 2540.0.0.255
/25255.255.255.128252^(32-25) - 2 = 2^7 - 2 = 1260.0.0.127
/26255.255.255.192262^(32-26) - 2 = 2^6 - 2 = 620.0.0.63
/27255.255.255.224272^(32-27) - 2 = 2^5 - 2 = 300.0.0.31
/28255.255.255.240282^(32-28) - 2 = 2^4 - 2 =
/29255.255.255.248292^(32-29) - 2 = 2^3 - 2 =
/30255.255.255.252302^(32-30) - 2 = 2^2 - 2 =
/31255.255.255.25431Total number of Hosts =
/32255.255.255.25532Total number of Hosts =
IP Subnetting Cheat Sheet

Let’s put it All together

Let’s take an example of the network configuration of your computer.

Let’s understand the main things here.

  • The IPv4 address of this computer is
  • Subnet Mask or subnet size or prefix length is
  • is from the Private IP address range.
  • You can also write the above IP address and subnet mask in the CIDR notion as
  • Default Gateway is
  • Let’s line up the IP address and Subnet Mask portion and convert Decimal numbers to Binary.
    • 11000000.10101000.00000010.00001111 — IP address (
    • 11111111.11111111.11111111.00000000 — Subnet mask (
  • As you can see above, the first three octets (24 bits) make up the network address, and the last octet (8 bits) makes up the host address. This gives you these things:
    • 11000000.10101000.00000010.00000000 — Network address (
    • 00000000.00000000.00000000. 00001111 — Host address (
  • The network address is, and the host address is When a packet with a destination address of arrives on the subnet, your computer will receive and process it.


In conclusion, IP Subnetting Cheat Sheet is a reference guide to subnetting. It includes an introduction to IP addressing, subnetting, IP subnets, classful/classless addressing, CIDR, and Binary to Decimal conversion table. I hope you have found this article useful! Please share it with others who you think might benefit from it. Let me know your thoughts in the comments below.

Afroz Ahmad
Afroz Ahmad

"Hey there, fellow network enthusiasts! My name is Afroz, and I bring over 14 years of expertise as a CCIE along with hands-on experience in the realm of Internet Services. I've worked with multiple ISPs and am currently engaged with one of the major ISP equipment vendors as a Network Designer. My true passion lies in not only navigating the intricacies of the networking industry but also in imparting that knowledge through my blog and courses. I understand the challenges that come with navigating the complex world of networking, and I firmly believe that teaching not only enriches others but also deepens my own understanding. Whether you're taking your first steps or you're a seasoned veteran in the field, I invite you to join me on this rewarding journey of learning and discovery. It's an expedition that promises to be both valuable and enjoyable – who knows, you might even have some fun along the way!"

Articles: 138

Leave a Reply

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