Subnet Cheat Sheet: IPv4 Subnetting for Beginners

Are you new to IP subnetting? This cheat sheet will help you get started with easy-to-follow instructions and helpful diagrams. Subnet confidently in no time.

Subnet Cheat Sheet: IPv4 Subnetting for Beginners
(Credit; Alamy Stock Art)

Beginners that are just starting out in the world of enterprise networking must have a solid grasp on how IP subnetting works and how to best build and manage their IP space through segmentation. The best way to go about this is to develop an IPv4 subnetting cheat sheet that can be referenced when developing a subnetting scheme for an organization.

Why is this important? IP subnets break a large physical network into logically segmented sub-networks. The purpose of an IP subnet is to minimize the boundaries of broadcast packets to reduce network congestion, gain improved control over network security, and to better manage IP addressing allocation.

Learn more about IP subnetting!

  • Why do you need a subnet cheat sheet?

  • How to use and create your IPv4 subnet cheat sheet

  • The best IPv4 subnet cheat sheets and charts for beginners

IP subnetting

ip-subnetting-2-MHMG45.jpg

Why do you need a subnet cheat sheet?

IP subnets form the foundation for how networked devices connect and communicate with others on an enterprise network. As such, careful planning must be made to ensure that subnets are “right-sized" to account for optimal performance, network security, and anticipated device connectivity growth. An IPv4 subnet cheat sheet is an efficient way for network administrators to understand the various aspects of building network subnets that adhere to business goals. Here are the main reasons why a subnet cheat sheet is important.

1. To understand the concept of subnetting quickly and easily

For beginners, IP subnetting is a complex methodology that takes time to learn. Additionally, the knowledge required to properly create subnets is not refreshed regularly, and key factors can be forgotten, leading to mistakes during the subnetting process. A cheat sheet is a valuable resource that can be used to quickly refresh administrators on how to accurately create, read and manage sub-networks without having to access multiple sources.

2. To help you memorize commonly used subnet masks

In most cases, IT architects will rely on and reuse commonly used subnet masks that are used for specific use cases. For example, most access or edge layer subnets use a subnet mask of 255.255.255.0 (also called a /24 subnet), which creates a sub-network that allows for up to 254 devices. This subnet size is ideal for edge device communication while minimizing broadcast traffic and providing a choke point where network security devices and access-control lists (ACLs) can be applied. Alternatively, point-to-point subnets will often use a 255.255.255.252 (/30) subnet mask that only allows for two devices to connect to that specific subnet.

3. To help you quickly find the subnets of a given IP network

A subnetting cheat sheet allows administrators to quickly reference subnet sizes so they can find the IP space and subnet size required for a specific need.

4. To help you calculate the number of subnets and host addresses of a given IP network

In some cases, a subnet must be created that allows for a specific number of host addresses. These hosts are often similar in function – such as a subnet allocated specifically for IP surveillance cameras. Depending on the number of cameras deployed on the network and the security/broadcast requirements, subnets can be calculated that best optimize performance and security while also accounting for growth as new cameras are installed and placed on a network.

5. To help you understand the relationship between subnets, broadcast addresses, and host addresses

When an IPv4 subnet is created, a broadcast address is assigned to that specific sub-network. A cheat sheet will show the exact broadcast address without the administrator having to perform any type of calculation.

6. To help you find the subnets of a given IP address more quickly

IP subnet cheat sheets allow administrators to take any given IP address and subnet mask and quickly determine where that IP address falls within a particular subnet.

7. To help you understand the calculations involved in subnetting

Cheat sheets provide a reference for quickly calculating subnets without having to manually determine what part of the IP address is the network ID vs. the host ID.

8. To help you design subnets for complex IP networks

Production networks should have pre-designed subnets that adhere to existing and future growth and management flexibility. Cheat sheets help in this creation process by allocating groups of subnets for various IT endeavors.

9. To help you avoid making common subnetting mistakes

It’s fairly easy to make a mistake when subnetting. Mis-inputting part of a subnet mask or IP space can end up causing connectivity problems that may be difficult to track down.

10. To help you conceptualize subnetting more easily

IP subnetting uses a highly structured approach. A cheat sheet allows administrators to quickly see all the parts of host/network ID space, gateways, and subnet masks for rapid recall.

IP subnetting

ip-subnetting-3-F2NE1G.jpg

How to use and create your IPv4 subnet cheat sheet

A subnet mask cheat sheet should be tailored to meet a network’s existing environment as well as to account for future growth. Here are some tips on how to create and use a cheat sheet.

Step 1: Choose your subnetting goal

The first step in creating a subnetting cheat sheet is to take a step back and look at the physical and logical aspects of the organization's network architecture. Organizations with one central location, for example, are far easier to assess as everything is in one location, and IP space does not have to be allocated and reserved for WAN and branch office connectivity. However, businesses that are geographically distributed and utilize IaaS clouds require far more thought as WAN, branch office, clouds, and remote workforces must all have pools of IP space to accommodate existing users/devices along with the potential for significant growth in one or more of these areas in the future. This is where knowledge of business goals comes into play. Not only must the network architect understand how to subnet – but where to allocate those subnets so that IP space will be allocated efficiently and without risk of over/underutilization.

Most businesses opt to use RFC 1918 IP space that's been allocated for private use within their organization. This IP space is non-internet routable. This means that connectivity to the internet will require network address translation (NAT) at the corporate internet edge to translate the private IP into an internet-routable IP for communication. There are three primary classes of private IP ranges. Class A has a range of 10.0.0.0 to 10.255.255.255. This provides 126 network addresses and 16,777,216 host addresses for the organization prior to subnetting. Class B addresses are 172.16.0.0 to 172.31.255.255 – or 16,384 possible network addresses and 65,536 host addresses. Finally, the Class C private space ranges from 192.168.0.0 to 192.168.255.255 and allows for up to 2,097,150 network addresses and 254 hosts per network.

In some cases, businesses may opt to only use Class A, B, or C addresses. However, many often use a combination of two or more Class ranges depending on their purpose. Of course, these private IP ranges can be further subnetted to create the size of the subnet that meets the organization's needs both from a security and performance perspective.

Step 2: Use this table to find the correct subnet mask formula

A subnet mask cheat sheet can be as simple or complex as you want. Some cheat sheets include information such as CIDR information, wildcard masks, network address, broadcast address, usable host ranges, and even subnet masks written in both 32-bit format and binary. In many cases, however, a simple cheat sheet will suffice that covers the majority of ranges used in a production network. Here’s an example that shows the subnet mask and usable IP addresses that can be assigned to hosts within that mask.

Subnet Mask

Usable IP Addresses

255.255.255.252

2

255.255.255.248

6

255.255.255.240

14

255.255.255.224

30

255.255.255.192

62

255.255.255.128

126

255.255.255.0

254

255.255.254.0

510

255.255.252.0

1,022

255.255.248.0

2,046

255.255.240.0

4,094

255.255.224.0

8,190

255.255.192.0

16,382

255.255.128.0

32,766

255.255.0.0

65,534

255.254.0.0

131,070

255.252.0.0

262,142

255.248.0.0

524,286

255.240.0.0

1,048,574

255.224.0.0

2,097,150

255.192.0.0

4,194,302

255.128.0.0

8,388,606

255.0.0.0

16,777,214

Step 3: Calculate the correct number of host addresses needed

Using the subnet mask cheat sheet, it’s easy to quickly see which mask will be best suited for a particular situation. For example, if a subnet needs to be created that can accommodate approximately 100 devices with the potential for 20% growth, a mask of 255.255.255.128 will be a good fit.

Step 4: Make sure that the calculations are correct

Always use a “measure twice, cut once” methodology when performing IP subnetting. A great secondary source is to use an online IP subnet calculator to verify your subnets prior to configuring them for production use. One example of a free online IP subnet calculator can be found here: https://www.calculator.net/ip-subnet-calculator.html.

Step 5: Make sure that you know how to use your newly configured subnet wisely

Within a subnet, both the first and last IP address within the subnet range are allocated for the network IP and broadcast IP. All other IPs within the subnet range can be used for host IP address assignment. This is known as the usable host range. Also, be sure to reserve a handful of IPs for the static configuration of infrastructure equipment. These can either be reserved by the DHCP service or removed from the DHCP pool if one is in use.

Step 6: Test your newly configured subnet before use

IP subnets should be tested prior to production use. In most cases, a laptop can be used to either acquire IP space within the newly created subnet. Alternatively, administrators can statically assign themselves with a handful of IP addresses within the subnet to ensure that the Node/Network IDs are correct and allow for correct communication within the specified IP range that the subnet allows.

IP subnetting

ip-subnetting-4-M0PWYG.jpg

The best IPv4 subnet cheat sheets and charts for beginners

1. Subnet Mask Cheat Sheet

As mentioned, subnet mask cheat sheets can be as simple or as complex as you want. The key is to determine what information is important and what can be left out. It may be the case that a cheat sheet is created to include a wealth of information – but, over time, pruned back to remove information that is rarely used.

2. CIDR Notation Cheat Sheet

Classless Inter-Domain Routing – or CIDR – refers to the various classes of IP address ranges. For enterprise purposes, Class A, B, and C ranges are commonly used in production environments. A CIDR notation cheat sheet can quickly show the four 8-bit octets of a 32-bit IPv4 address and which octets are allocated for the network ID, and which are allocated as host ID space for each class.

Octet 1

Octet 2

Octet 3

8 bits

8 bits

8 bits

8 bits

Class A

Net ID

Host ID

Class B

Net ID

Host ID

Class C

Net ID

Host ID

3. IPv4 Address Range Reference Sheet

Another useful cheat is one that shows usable host ranges and broadcast addresses within a particular subnet mask along with the broadcast address assigned to each subnet, as shown in the following example:

Network

Subnet Mask

Host Range

Broadcast Address

192.168.0.0

255.255.255.0

192.168.0.1 - 192.168.0.254

192.168.0.255

192.168.1.0

255.255.255.0

192.168.1.1 - 192.168.1.254

192.168.1.255

192.168.3.0

255.255.255.0

192.168.3.1 - 192.168.1.254

192.168.3.255

192.168.4.0

255.255.255.0

192.168.4.1 - 192.168.1.254

192.168.4.255

192.168.5.0

255.255.255.0

192.168.5.1 - 192.168.1.254

192.168.5.255

192.168.6.0

255.255.255.0

192.168.6.1 - 192.168.1.254

192.168.6.255

192.168.7.0

255.255.255.0

192.168.7.1 - 192.168.1.254

192.168.7.255

192.168.8.0

255.255.255.0

192.168.8.1 - 192.168.1.254

192.168.8.255

192.168.255.0

255.255.255.0

192.168.255.1 - 192.168.1.254

192.168.255.255

4. Binary to Decimal Conversion Cheat Sheet

In some cases, it's useful to know how to convert binary to decimal and vice versa. To accomplish this easily, a simple 8-bit conversion table can be part of an IPv4 subnet cheat sheet that shows how each of the 8-bits within an octet shown is both binary and decimal format.

128

0

0

0

0

0

0

0

0

=

0

1

0

0

0

0

0

0

0

=

128

1

1

0

0

0

0

0

0

=

192

1

1

1

0

0

0

0

0

=

224

1

1

1

1

0

0

0

0

=

240

1

1

1

1

1

0

0

0

=

248

1

1

1

1

1

1

0

0

=

252

1

1

1

1

1

1

1

0

=

254

1

1

1

1

1

1

1

1

=

255

5. Wildcard Mask Cheat Sheet

Finally, a wildcard mask chart should be added to an IPv4 subnet cheat sheet to determine the inverse of a subnet mask quickly and accurately. Wildcards are used to designate networks within some dynamic routing protocols and for the creation of access control lists. An example of a subnet mask to wildcard mask cheat sheet table for commonly used masks is as follows:

CIDR

Subnet Mask

Wildcard Mask

/8

255.0.0.0

0.255.255.255

/16

255.255.0.0

0.0.255.255

/20

255.255.240.0

0.0.15.255

/22

255.255.252.0

0.0.3.255

/24

255.255.255.0

0.0.0.255

/26

255.255.255.192

0.0.0.63

/29

255.255.255.248

0.0.0.7

/30

255.255.255.252

0.0.0.3

About the Author

Andrew Froehlich, President, West Gate Networks

President, West Gate Networks

As a highly experienced network architect and trusted IT consultant with worldwide contacts, particularly in the United States and Southeast Asia, Andrew Froehlich has nearly two decades of experience and possesses multiple industry certifications in the field of enterprise networking. Froehlich has participated in the design and maintenance of networks for State Farm Insurance, United Airlines, Chicago-area schools and the University of Chicago Medical Center. He is the founder and president of Loveland, Colo.-based West Gate Networks, which specializes in enterprise network architectures and data center build outs. The author of two Cisco certification study guides published by Sybex, he is a regular contributor to multiple enterprise IT related websites and trade journals with insights into rapidly changing developments in the IT industry.

SUBSCRIBE TO OUR NEWSLETTER
Stay informed! Sign up to get expert advice and insight delivered direct to your inbox

You May Also Like


More Insights