Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

2.6.2. Subnetting Process

💡 First Principle: Subnetting is about borrowing bits from the host portion to create additional networks. More borrowed bits = more subnets but fewer hosts per subnet. The core formula: 2^(borrowed bits) = subnets; 2^(remaining host bits) − 2 = usable hosts.

The step-by-step method (memorize this):

Example: Subnet 192.168.1.0/24 into 4 equal subnets

  1. How many bits to borrow? 2^2 = 4 subnets, so borrow 2 bits
  2. New prefix: /24 + 2 = /26
  3. New subnet mask: 255.255.255.192 (192 = 128+64, the two borrowed bits)
  4. Block size: 256 − 192 = 64 (increment between subnets)
  5. Subnets:
    • 192.168.1.0/26 (hosts: .1−.62, broadcast: .63)
    • 192.168.1.64/26 (hosts: .65−.126, broadcast: .127)
    • 192.168.1.128/26 (hosts: .129−.190, broadcast: .191)
    • 192.168.1.192/26 (hosts: .193−.254, broadcast: .255)
Quick reference for common prefix lengths:
PrefixMaskHostsBlock Size
/24255.255.255.0254
/25255.255.255.128126128
/26255.255.255.1926264
/27255.255.255.2243032
/28255.255.255.2401416
/29255.255.255.24868
/30255.255.255.25224

Wildcard masks are the inverse of subnet masks—used in OSPF network commands and ACLs. To calculate: 255.255.255.255 minus the subnet mask. Example: /26 mask 255.255.255.192 → wildcard 0.0.0.63.

VLSM (Variable Length Subnet Masking) lets you use different prefix lengths within the same network. Without VLSM, a point-to-point link (needing 2 hosts) would waste an entire /24 (254 addresses). With VLSM, you assign /30 for WAN links (2 hosts) and /24 for user LANs—efficient allocation matching actual need.

Configuration Example

Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip address 192.168.1.1 255.255.255.0
Router(config-if)# no shutdown
Verification:
Router# show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0     192.168.1.1     YES manual up                    up

⚠️ Exam Trap: The first address in a subnet is the network address and the last is the broadcast address—neither is usable for hosts. Usable hosts = 2^n − 2. Exception: /31 networks (RFC 3021) support exactly 2 hosts with no network or broadcast address—used exclusively on point-to-point links to save address space.