IP Subnetting Cheat Sheet (free PDF) for Network Engineers

With this IP subnetting and 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 subnet cheat sheet 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?

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:- 192.168.100.1 255.255.255.0

Here, 192.168.100.1 is the IP Address, and 255.255.255.0 is the 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 255.255.255.0, so 192.168.100.0 will become Network Address, and the Host Address will become 0.0.0.1

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
10.0.0.0 255.0.0.010.0.0.0 to 10.255.255.25510.0.0.0/8
172.16.0.0 255.240.0.0172.16.0.0 to 172.31.255.255172.16.0.0/12
192.168.0.0 255.255.0.0192.168.0.0 to 192.168.255.255192.168.0.0/16

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, 192.168.100.0 255.255.255.0, we can write 192.168.100.0/24.

What are 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, 10.0.0.0/8, more addresses (approx. 16 Million) can be allocated, resulting in a bigger block. On the other hand, a longer prefix, for example, 192.168.100.200/29, 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 decimals 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. The 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.

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

Binary
1 means the bit is ON
0 means the bit is OFF
Decimal
00
11
102
113
1004
1015
1106
1117
10008
10019
101010
101111
110012
110113
111014
111115
1000016
1000117
1001018
1001119
1010020
1010121
1011022
1011123
1100024
1100125
1101026
1101127
1110028
1110129
1111030
1111131
10000032
100000064
10000000128
100000000256
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
/00.0.0.002^(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 = 140.0.0.15
/29255.255.255.248292^(32-29) - 2 = 2^3 - 2 = 60.0.0.7
/30255.255.255.252302^(32-30) - 2 = 2^2 - 2 = 20.0.0.3
/31255.255.255.25431Total number of Hosts = 20.0.0.1
/32255.255.255.25532Total number of Hosts = 10.0.0.0
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 192.168.2.15
  • The Subnet Mask or subnet size or prefix length is 255.255.255.0
  • 192.168.2.15 is from the Private IP address range.
  • You can also write the above IP address and subnet mask in the CIDR notation as 192.168.2.15/24
  • The default Gateway (which is usually your home wifi router) is 192.168.2.1
  • Let’s line up the IP address and Subnet Mask portion and convert Decimal numbers to Binary.
    • 11000000.10101000.00000010.00001111 = IP address (192.168.2.15)
    • 11111111.11111111.11111111.00000000 = Subnet mask (255.255.255.0)
  • 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 (192.168.2.0)
    • 00000000.00000000.00000000.00001111 = Host address (000.000.000.15)
  • The network address is 192.168.2.0, and the host address is 0.0.0.15.
  • When a packet with a destination address of 192.168.2.15 arrives on the 192.168.2.0 subnet, your computer will receive and process it.

Conclusion

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.

Leave a Reply

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