Subnet Notes

Address Classes

Class A: 8 network bits, 24 host bits (255.0.0.0)
Class B: 16 network bits, 16 host bits (255.255.0.0)
Class C: 24 network bits, 8 host bits (255.255.255.0)
Class D: Multicast (224.0.0.0–239.255.255.255)
Class E: Reserved (240.0.0.0–255.255.255.255)

Examples

  • 17.22.90.7 → Class A
  • 220.10.77.40 → Class C
  • 165.245.0.1 → Class B
  • 128.90.10.2 → Class B
  • 191.77.24.250 → Class B
  • 192.1.12.5 → Class C

Network & Broadcast Addresses

  • Network address: First IP in the subnet (all host bits = 0)
  • Broadcast address: Last IP in the subnet (all host bits = 1)
  • First usable host: Network address + 1
  • Last usable host: Broadcast address − 1

CIDR and VLSM

CIDR removes classful restrictions by specifying the number of network bits. For example, 192.168.1.44/24 uses 24 bits for the network portion.

CIDR Examples

  • /8 → 255.0.0.0
  • /16 → 255.255.0.0
  • /24 → 255.255.255.0
  • /26 → 255.255.255.192
  • /12 → 255.240.0.0

VLSM (Variable Length Subnet Masks) allows different subnet masks within the same classful network.

Calculating Subnets and Hosts

  • Number of subnets = 2subnet bits
  • Hosts per subnet = 2host bits − 2

Example: 10.1.1.0/24 → 216 subnets, 28 − 2 = 254 hosts each.

Magic Number Subnetting

“Magic number” = 256 − (value in the interesting octet of the subnet mask). Use this to find the subnet boundary.
Example: For 172.16.242.133/27, the interesting octet is 224, so magic number = 256 − 224 = 32.

Master Subnet Chart

CIDR 1 CIDR 2 CIDR 3 CIDR 4 Subnet in Decimals Networks Addresses
/1 /9 /17 /25 128 2 128
/2 /10 /18 /26 192 4 64
/3 /11 /19 /27 224 8 32
/4 /12 /20 /28 240 16 16
/5 /13 /21 /29 248 32 8
/6 /14 /22 /30 252 64 4
/7 /15 /23 /31 254 128 2
/8 /16 /24 /32 255 256 1

Address Block Range Chart

Block Size Ranges (Decimal)
128-address block 0 128
64-address block 0 64 128 192
32-address block 0 32 64 96 128 160 192 224
16-address block 0 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240
8-address block 0 8 16 24 32 40 48 56 64 72 80 88 96 104 112 120 128 136 144 152 160 168 176 184 192 200 208 216 224 232 240 248

Seven Second Subnetting Method

  1. Convert IP address and subnet mask to decimal.
  2. Use the Master Chart to find the corresponding mask/CIDR and the number of devices per subnet.
  3. Use the Address Block Chart to identify the network (starting boundary).
  4. Use the Address Block Chart to determine the broadcast (ending boundary).
  5. First usable IP = Network address + 1; Last usable IP = Broadcast address − 1.

Example

For IP: 165.245.12.88/24 with a subnet mask of 255.255.255.0
Network address: 165.245.12.0
Broadcast address: 165.245.12.255
Usable range: 165.245.12.1 to 165.245.12.254

Back