Subnetting mistakes are the #1 cause of lost points on the CCNA 200-301 exam. This topic falls under exam objective 1.6 (Configure and verify IPv4 addressing and subnetting). In real network engineering, a single subnetting error can bring down an entire branch office. Mastering subnetting calculations and avoiding common traps is essential for both the exam and your career.
Jump to a section
Imagine a large apartment building with 256 mailboxes, numbered 0 to 255. The building manager decides to group mailboxes into 'zones' for different floors. Each zone must start at a mailbox number that is a multiple of the zone size. For example, if a zone has 8 mailboxes, it must start at mailbox 0, 8, 16, etc. This is exactly how subnetting works: subnets must start at an address that is a multiple of the subnet size. Now, a new tenant moves in and is assigned mailbox 15, but the zone starting at 8 only covers mailboxes 8-15. That's fine. But if the manager accidentally assigns a zone starting at 10 with size 8, that zone would cover 10-17, which overlaps with the zone starting at 8. This is a subnet overlap – a common mistake. Also, the first mailbox in each zone is reserved for the 'zone manager' (network address) and the last for 'broadcast notices' (broadcast address). So in a zone of 8 mailboxes, usable mailboxes are 9-14. Many people forget to subtract these two when calculating usable addresses. Another trap: the manager might think a zone of size 8 needs 8 addresses, but actually the smallest power of two that fits all required addresses is the zone size. If you need 6 mailboxes, you still need a zone of size 8. This mirrors the requirement that subnet size must be a power of two. Finally, the building has a main office with a different numbering scheme – that's your WAN link. A common mistake is to use a /30 subnet for a point-to-point link but forget that the two addresses in that subnet are the network and broadcast, leaving only two usable – which is correct for a /30, but many think it's /31. The analogy makes these traps concrete.
What is Subnetting and Why Does It Exist?
Subnetting is the process of dividing a single IP network into smaller, manageable subnetworks. It exists to conserve IP addresses, improve network performance by reducing broadcast domains, and enhance security by isolating traffic. Without subnetting, every device in an organization would be in one flat network, leading to broadcast storms and inefficient routing.
The Mechanics: Binary AND and Subnet Masks
Subnetting relies on the subnet mask, a 32-bit number that separates the IP address into network and host portions. The mask has 1s in the network portion and 0s in the host portion. To determine if two addresses are in the same subnet, you perform a bitwise AND of each address with the subnet mask. If the results match, they are in the same subnet.
For example:
IP: 192.168.1.10, Mask: 255.255.255.0 (or /24)
Binary: 11000000.10101000.00000001.00001010 AND 11111111.11111111.11111111.00000000 = 11000000.10101000.00000001.00000000 (192.168.1.0)
Any host with the same network portion (192.168.1.0) is in the same subnet.
Key Defaults and Values
Class A: /8 (255.0.0.0), Class B: /16 (255.255.0.0), Class C: /24 (255.255.255.0)
Subnet sizes must be powers of two: 2, 4, 8, 16, 32, 64, 128, 256...
Number of subnets = 2^(borrowed bits)
Number of hosts per subnet = 2^(remaining host bits) - 2 (network and broadcast)
Common subnet masks: /30 (255.255.255.252) for point-to-point links (2 usable hosts), /29 (255.255.255.248) for small networks (6 usable), /27 (255.255.255.224) for 30 hosts, etc.
Step-by-Step Subnetting Process
Determine the number of required subnets and hosts per subnet.
Choose a subnet mask that provides at least that many subnets and hosts.
Calculate the subnet IDs (network addresses) by incrementing the subnet bits.
Determine the broadcast address for each subnet (next subnet ID minus 1).
Usable host range is from subnet ID +1 to broadcast -1.
Verification with IOS CLI
To see subnetting information on a Cisco router:
R1# show ip interface brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 192.168.1.1 YES manual up upR1# show running-config interface gigabitEthernet 0/0
interface GigabitEthernet0/0
ip address 192.168.1.1 255.255.255.0To verify subnet calculations:
R1# show ip route connected
C 192.168.1.0/24 is directly connected, GigabitEthernet0/0Interaction with Related Protocols
Subnetting is fundamental to VLSM (Variable Length Subnet Masking), which allows different subnet masks within the same major network. It also interacts with routing protocols like OSPF and EIGRP, which exchange subnet information. CIDR (Classless Inter-Domain Routing) eliminates classful boundaries, requiring subnet masks to be explicitly defined.
Common Calculation Traps
Forgetting to subtract 2 for network and broadcast addresses.
Using a subnet mask that doesn't provide enough host bits (e.g., /30 for a LAN with 10 hosts).
Overlapping subnets: ensuring subnet ranges do not overlap by careful planning.
Misunderstanding the 'all-zeros' and 'all-ones' subnets: Cisco IOS allows them by default (ip subnet-zero).
Identify Requirements
Determine the number of subnets needed and the maximum number of hosts per subnet. For example, you need 5 subnets, each with at least 20 hosts. This drives the subnet mask selection.
Choose Subnet Mask
Calculate the minimum number of host bits required. For 20 hosts, you need 5 host bits (2^5=32, minus 2 = 30 usable). So subnet bits = 32 - 5 = 27, mask = /27 (255.255.255.224). Check if this provides enough subnets: borrowed bits = 27-24=3, so 2^3=8 subnets. Enough.
Determine Subnet IDs
The increment is 2^(remaining host bits) = 2^5 = 32. Starting from 0, subnet IDs are: 0, 32, 64, 96, 128, 160, 192, 224. For each subnet, the network address is the base (e.g., 192.168.1.0/27).
Calculate Broadcast and Host Range
Broadcast address is next subnet ID minus 1. For subnet 192.168.1.0/27, next is 192.168.1.32, so broadcast = 192.168.1.31. Usable hosts: 192.168.1.1 to 192.168.1.30. Verify: 2^5=32 total addresses, minus 2 = 30 usable.
Verify with IOS
On a Cisco router, configure an interface with an IP from a subnet and use 'show ip interface brief' to see the IP and mask. Use 'show ip route connected' to see the subnet route. Example: interface GigabitEthernet0/0 with ip address 192.168.1.1 255.255.255.224 shows route 192.168.1.0/27.
Check for Overlaps
Ensure subnet ranges do not overlap. For example, subnet 192.168.1.0/27 covers .0-.31, subnet 192.168.1.32/27 covers .32-.63. No overlap. A common mistake is to use 192.168.1.16/28 (covers .16-.31) which overlaps with .0/27. Always verify boundaries.
In a typical enterprise, subnetting is used to segment departments (HR, Finance, Engineering) into separate VLANs. For example, a company has a /24 network (192.168.1.0/24) and needs 4 subnets. The network engineer chooses a /26 mask (255.255.255.192) to create 4 subnets of 62 usable hosts each. They assign VLAN 10 to HR (192.168.1.0/26), VLAN 20 to Finance (192.168.1.64/26), etc. The router interfaces are configured with the first usable IP as the default gateway. A common mistake is to assign overlapping subnets, such as using 192.168.1.0/25 (128 hosts) for one VLAN and 192.168.1.128/26 (62 hosts) for another, which is fine, but if someone mistakenly uses 192.168.1.64/26 while .0/25 is in use, it overlaps (since .0/25 covers .0-.127). This breaks connectivity. Another scenario: point-to-point WAN links between routers often use /30 subnets to conserve addresses. A junior engineer might use /29, wasting 6 addresses per link. Over many links, this adds up. Performance-wise, proper subnetting reduces broadcast traffic: each subnet is a separate broadcast domain, so ARP requests stay local. When misconfigured, hosts may not reach the default gateway, or traffic may be black-holed. Troubleshooting involves checking the subnet mask on hosts and routers, and verifying routing tables. Cisco's 'show ip interface' command displays the IP and mask, and 'ping' tests reachability. A common production issue: a DHCP server assigns IPs from a scope that overlaps with another subnet, causing IP conflicts. Engineers must plan subnet ranges carefully and document them.
The CCNA 200-301 exam tests subnetting under objective 1.6 (Configure and verify IPv4 addressing and subnetting). Expect 3-5 questions on subnetting, often as scenario-based multiple choice or simulations. The most common wrong answers include:
Choosing a subnet mask that is too small: For example, needing 50 hosts and choosing /26 (62 hosts) is correct, but many choose /27 (30 hosts) because they forget to subtract 2. The exam will give a scenario like 'You need 30 hosts per subnet' and the trap is /27 provides exactly 30 usable, but /26 is safer. Actually, /27 provides 30 usable, so it works, but if they say 'at least 30', /27 is correct. The trap is when they say 'at least 25 hosts', /27 works, but /28 only gives 14, so candidates might pick /28.
Forgetting the network and broadcast addresses: When asked for the usable host range, candidates often include the network or broadcast address. For a /27 subnet 192.168.1.0/27, usable is .1-.30, not .0-.31.
Overlapping subnets: Given two IPs and masks, candidates fail to recognize they are in different subnets. For example, 192.168.1.5/25 and 192.168.1.130/25 are in different subnets (subnet IDs .0 and .128). Many think they are in the same because they see the same network portion.
Miscalculating the increment: For a /28 mask (255.255.255.240), the increment is 16. Candidates often use 8 or 32. The increment is 2^(32-mask) = 2^4 = 16.
Decision rule: First, determine the required number of hosts, then find the smallest power of two that is at least that number + 2. Then calculate the mask bits. For subnets, find the smallest power of two for the number of subnets, then calculate borrowed bits. Always verify with a binary AND if unsure. Use the 'magic number' method: 256 - subnet mask octet = block size. For /27, mask 255.255.255.224, block size = 256-224 = 32. Then subnets are multiples of 32.
Exam tip: Write down the powers of two from 0 to 10 (1,2,4,8,16,32,64,128,256,512,1024) before the exam. For host calculations, subtract 2 from the power of two. For subnet calculations, use the power of two directly.
Subnet masks must be contiguous 1s; only /8 to /30 are valid (excluding /31 for point-to-point).
Usable hosts = 2^(32-mask) - 2. For /24, 254 hosts; for /30, 2 hosts.
Subnet IDs are multiples of the block size (256 - mask octet).
The 'ip subnet-zero' command is enabled by default on Cisco IOS, allowing the all-zeros subnet.
Common exam masks: /24 (255.255.255.0), /25 (128), /26 (192), /27 (224), /28 (240), /29 (248), /30 (252).
To find broadcast: next subnet ID minus 1.
Always verify subnet overlaps by checking if the range of one subnet includes the other's network or broadcast.
These come up on the exam all the time. Here's how to tell them apart.
Classful Addressing
Uses fixed subnet masks based on class: A (/8), B (/16), C (/24).
Wastes addresses because it doesn't match network size.
No VLSM; all subnets in a major network must have the same mask.
Routing protocols do not carry subnet mask information.
Obsolete; not used in modern networks.
Classless Addressing (CIDR)
Uses variable-length subnet masks (VLSM) specified by prefix length.
Efficient address allocation; matches network size precisely.
Allows different subnet masks within the same major network.
Routing protocols (OSPF, EIGRP) carry subnet mask in updates.
Standard for IPv4 addressing; required for CCNA.
Mistake
A /27 subnet provides 32 usable host addresses.
Correct
A /27 subnet has 5 host bits, so 2^5=32 total addresses, minus 2 for network and broadcast = 30 usable hosts.
Candidates forget to subtract the network and broadcast addresses, especially when the number is a power of two.
Mistake
The subnet 192.168.1.0/24 can be subnetted into 4 subnets of /26 without overlap.
Correct
Yes, /26 subnets have block size 64, so subnets are .0/26, .64/26, .128/26, .192/26. No overlap.
Some think the subnets start at .0, .64, .128, .192 but worry about overlap incorrectly.
Mistake
The all-zeros subnet (e.g., 192.168.1.0/27) is not usable on Cisco routers.
Correct
By default, Cisco IOS allows the all-zeros subnet with 'ip subnet-zero'. It is usable.
Older standards (RFC 950) discouraged it, but modern IOS and the CCNA assume it is allowed.
Mistake
A /30 subnet provides 4 usable host addresses.
Correct
A /30 subnet has 2 host bits, so 2^2=4 total addresses, minus 2 = 2 usable hosts. It is used for point-to-point links.
Candidates confuse total addresses with usable addresses, or think /30 is for small LANs with 4 devices.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
The formula is 2^(number of host bits) - 2. The number of host bits is 32 minus the prefix length. For example, a /27 subnet has 5 host bits (32-27=5), so 2^5=32 total addresses, minus 2 = 30 usable hosts. The two subtracted addresses are the network address (all host bits 0) and the broadcast address (all host bits 1). Always subtract 2, unless you are using /31 for point-to-point links (which has no broadcast) – but CCNA expects subtraction for /30 and above.
Perform a bitwise AND between the IP address and the subnet mask. Alternatively, use the magic number method: subtract the mask octet from 256 to get the block size. Then find the multiple of the block size that is less than or equal to the IP octet in the subnet portion. For example, IP 192.168.1.37 with mask 255.255.255.224 (/27): block size = 256-224=32. The multiples are 0,32,64,... Since 37 is between 32 and 64, the subnet ID is 192.168.1.32. The broadcast is next multiple minus 1: 64-1=63, so broadcast .63.
The 'ip subnet-zero' command allows the use of subnet zero (the first subnet in a network, e.g., 192.168.1.0/27) and the all-ones subnet (e.g., 192.168.1.224/27). By default, Cisco IOS enables this command. In older networks, these subnets were considered invalid due to potential confusion with the classful network address and broadcast. However, modern networks and the CCNA exam assume subnet-zero is enabled. This gives you more subnets to work with.
Yes, RFC 3021 allows /31 subnets for point-to-point links, providing 2 usable addresses (no network or broadcast). However, the CCNA 200-301 exam traditionally focuses on /30 for point-to-point links. Some questions may mention /31 as an option, but the standard answer for exam purposes is /30 unless specified otherwise. In real networks, /31 is used to conserve addresses, but Cisco IOS supports it with the 'ip address' command.
A subnet mask is used to determine the network and host portions of an IP address. It has 1s in the network portion and 0s in the host portion. A wildcard mask is the inverse: 0s in the network portion and 1s in the host portion. Wildcard masks are used in ACLs and OSPF configurations. For example, subnet mask 255.255.255.0 has wildcard mask 0.0.0.255. They are not interchangeable; using a subnet mask in place of a wildcard mask will cause errors.
The number of subnets equals 2^(number of borrowed bits). Borrowed bits are the bits added to the default subnet mask. For example, if you have a /24 network and you use a /27 mask, you borrowed 3 bits (27-24=3), so 2^3=8 subnets. If you need more subnets, borrow more bits, but be careful not to reduce host bits too much. The formula assumes subnet-zero is enabled.
VLSM (Variable Length Subnet Masking) allows you to use different subnet masks within the same major network. For example, you can have a /27 subnet for a large department and a /30 for a point-to-point link, both within 192.168.1.0/24. This conserves IP addresses because you don't have to use the same mask for all subnets. VLSM is essential for efficient address allocation in modern networks. The CCNA exam tests your ability to design VLSM schemes without overlapping subnets.
You've just covered Exam Trap: Subnetting Mistakes — now see how well it sticks with free CCNA 200-301 practice questions. Full explanations included, no account needed.
Done with this chapter?