Quick and Dirty Subnet Mask CheatSheet

By | 2024-07-23

This is just quick and dirty cheatsheet for subnet masks.  It compares the relationship of host bits, prefix length, subnet mask, and usable IP addresses per subnet.

Host BitsPrefix LengthSubnet MaskUsable IP Addresses
1/31255.255.255.25421-2 = 0*
2/30255.255.255.25222-2 = 2
3/29255.255.255.24823-2 = 6
4/28255.255.255.24024-2 = 14
5/27255.255.255.22425-2 = 30
6/26255.255.255.19226-2 = 62
7/25255.255.255.12827-2 = 126
8/24255.255.255.028-2 = 254
9/23255.255.254.029-2 = 510
10/22255.255.252.0210-2 = 1022

What is Subnetting?

Subnetting is a networking concept that allows you to divide a larger network into smaller, more manageable sub-networks, known as subnets. This is done by borrowing bits from the host portion of an IP address and using them to create additional network addresses.

Here’s a more detailed explanation of subnetting:

IP Address Structure

  • An IP address is composed of two main parts: the network portion and the host portion.
  • The network portion identifies the network, while the host portion identifies individual devices within that network.

Purpose of Subnetting

  • Subnetting helps to improve network efficiency, security, and scalability.
  • It allows you to create multiple smaller networks (subnets) within a larger network, each with its own network address and range of available host addresses.
  • This can help to reduce network congestion, improve network performance, and make it easier to implement access control and routing policies.

The Subnetting Process

  • Subnetting involves borrowing bits from the host portion of the IP address and using them to create additional network addresses.
  • The number of bits borrowed determines the number of subnets and the number of hosts per subnet.
  • For example, if you have a Class C network (e.g., 192.168.1.0/24) and you borrow 2 bits from the host portion, you can create 4 subnets (2^2 = 4) with 62 hosts per subnet (2^6 – 2).

Benefits of Subnetting

  • Improved network performance: Subnetting can help reduce network congestion and improve overall network performance by containing network traffic within the appropriate subnets.
  • Enhanced security: Subnetting can help to isolate and secure different parts of the network, making it more difficult for unauthorized access or network attacks.
  • Efficient use of IP addresses: Subnetting allows you to make better use of available IP addresses by dividing a larger network into smaller, more manageable subnets.
  • Easier network management: Subnetting simplifies network administration and makes it easier to implement routing policies, access control lists, and other network management tasks.

Subnetting is a fundamental concept in network design and is widely used in both small and large-scale networks to improve efficiency, security, and scalability.

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

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.