Our beginner networking students often describe IPv4 subnetting as the most difficult concept to grasp. It can certainly be confusing, but it is necessary for any entry-level networking certification. Mastering IPv4 subnetting will also make you more efficient in network administration and design.
With that, we hope our IPv4 subnetting cheat sheet will be a great reference for you in your studies and career.
Click to download a pdf copy here to keep with you, and when you’re ready, read on.
IPv4 Subnetting Cheat Sheet Search
Search our IPv4 Subnetting cheat sheet to find the right cheat for the term you’re looking for. Simply enter the term in the search bar and you’ll receive the matching cheats available.
Subnetting allows a computer/host to know if the machine it wants to talk to is local or outside of its network. The subnet mask determines how many IPv4 addresses can be assigned within a network.
|CIDR||SUBNET MASK||OF ADDRESSES||WILDCARD|
Decimal to Binary
While IPv4 addresses appear to be four sets of numbers separated by decimals, they are actually made up of 32 ones and zeros. Understanding this will assist you in setting up your networks and is required on both the CompTIA Network+ and Cisco Certified Network Associate exams.
|255 1111 1111||0 0000 0000|
|254 1111 1110||1 0000 0001|
|252 1111 1100||3 0000 0011|
|248 1111 1000||7 0000 0111|
|240 1111 0000||15 0000 1111|
|224 1110 0000||31 0001 1111|
|192 1100 0000||63 0011 1111|
|128 1000 0000||127 0111 1111|
|0 0000 0000||255 1111 1111|
Why Learn Binary?
Subnet masks determine which part of the IP address is for the network, and which is for the host. We can view this when examining the subnet mask in binary format. Any binary digit that is a “1” is for the network, while a “0” is for the host.
*Note that subnet masks can only be written with all ones followed by all zeros.*
The above example is called a /24 (pronounced whack 24) subnet because there are 24 binary digits in the “1” (or network) position. So, the first 24 binary digits (or three octets) of an IP range are for the network (non-changing), and the last eight binary digits (last octet) are for the hosts.
In this next example, our internet provider gave us an IP range of 220.127.116.11 with a /24 subnet, allowing 254 IP addresses.
*Remember that hosts cannot have an IP address that ends in the first or last number in the available range.*
Classful addressing will use the following subnet masks.
These are very easy to calculate.
But what if we want a /28 subnet mask, for instance?
In this example, our internet provider gave us a different subnet mask (/28). We see the first 28 binary digits are in the one position. They also gave us an IP range of 18.104.22.168.
How many hosts can we have now?
Why is this? We know the first four binary characters are part of the network, so cannot change. 01010000 converts to 80, our first IP in the range. We now look at all available combinations of the next four binary positions.
Without understanding decimal to binary, this would be a very difficult calculation.
IPv4 Address Classes
These were the first effort to divide network IDs and set how many public IPv4 addresses you can have.
|A||0.0.0.0 – 127.255.255.255|
|B||22.214.171.124 – 126.96.36.199|
|C||192.0.0.0 – 188.8.131.52|
|D||184.108.40.206 – 220.127.116.11|
|E||240.0.0.0 – 255.255.255.255|
Reserved (Private) IP Ranges
These IP address ranges are reserved for internal networks. You will never see public IPv4 addresses in these ranges.
|CLASS A||10.0.0.0 – 10.255.255.255|
|CLASS B||172.16.0.0 – 172.31.255.255|
|CLASS C||192.168.0.0 – 192.168.255.255|
|LOCALHOST||127.0.0.0 – 127.255.255.255|
|ZEROCONF (APIPA/BONJOUR)||169.254.0.0 – 169.254.255.255|
If you want to discuss IPv4, you need to learn the following terms.
|WILDCARD MASK||A wildcard mask indicates which parts of an IP address are available for examination.|
|CIDR||Classless interdomain routing was developed to provide more granularity|
than legacy classful addressing; CIDR notation is expressed as /XX
IPv4 subnetting can be confusing at first, but we promise with practice it will become second nature.
Want more help learning subnetting? Check out these courses in our VIP Members Section
You should add RFC 1918 address space to this list
Thank you Sir.
this is very useful.
Thank you for sharing useful resources !
These subnetting masks are really useful for IPv4 addresses.
Love this – thank you!
Thank you very much Nathan. Appreciate that.
Thank you! This is a very useful cheatsheet.