IP subnetting is a fundamental skill for network administrators, enabling efficient IP address allocation and network design. This cheatsheet provides a quick reference guide for IP subnetting, including key concepts, calculations, tips, and rare information.

1. IP Address Classes:

  • Class A: to (with a default subnet mask of
  • Class B: to (with a default subnet mask of
  • Class C: to (with a default subnet mask of

2. Subnet Mask:

A subnet mask is a 32-bit value that separates the IP address into network and host portions. It is represented using four octets (e.g.,

3. Subnetting Calculation:

  • Determine the required number of subnets and hosts per subnet.
  • Identify the appropriate IP address class based on the required number of subnets and hosts.
  • Select a subnet mask that provides the desired number of subnets and hosts.

4. Subnetting Formulas:

  • Number of Subnets = 2^(n), where n is the number of subnet bits
  • Number of Hosts = 2^(h) – 2, where h is the number of host bits

5. Subnetting Tips and Tricks:

  • Use the largest available subnet mask when subnetting to minimize IP address wastage.
  • Always subtract 2 from the total number of hosts per subnet to account for the network address and broadcast address.
  • Start subnetting from the largest network portion and allocate smaller subnets as needed.
  • When subnetting a Class C network, borrow bits from the host portion to create subnets.
  • Use the “magic number” method to quickly determine the increment between subnets.
  • Implement Variable Length Subnet Masking (VLSM) to allocate different-sized subnets within a larger network.

6. Rare Subnetting Information:

  • Subnet Zero: In the past, using the first subnet (all zeros) was not allowed. However, modern networking equipment and protocols now support subnet zero, so it can be used for addressing.
  • Directed Broadcast: A directed broadcast is a special IP address used to send a packet to all hosts on a specific subnet. It has a broadcast address in the host portion of the IP address.
  • Subnetting IPv6: IPv6 uses a different addressing scheme than IPv4. It uses a 128-bit address space and employs hexadecimal notation for subnetting.


IP subnetting is a crucial skill for network administrators, allowing efficient utilization of IP address space. By understanding the concepts, calculations, and tips mentioned in this cheatsheet, network administrators can effectively subnet networks, optimize address allocation, and design scalable network architectures.