IPv6 Prefix Length vs Subnet Mask on CCNA Exam
Presenting Symptom
A router configured with an IPv6 address and prefix length cannot ping the IPv6 address of a directly connected neighbor, even though both interfaces are up and physically connected.
Network Context
Two Cisco routers (R1 and R2) are directly connected via GigabitEthernet0/0 interfaces in a small branch office. Both routers run IOS 15.9. R1 has IPv6 address 2001:db8:1::1/64 and R2 has 2001:db8:1::2/32. The engineer notices that R1 can ping its own IPv6 address but cannot ping R2's IPv6 address.
Diagnostic Steps
Check IPv6 interface status and address
show ipv6 interface briefGigabitEthernet0/0 [up/up]
FE80::1
2001:DB8:1::1
GigabitEthernet0/0 [up/up]
FE80::2
2001:DB8:1::2Both interfaces are up/up. Note the IPv6 addresses: R1 has /64, R2 has /32. This mismatch in prefix length is a red flag.
Verify IPv6 routing table for the destination
show ipv6 route 2001:db8:1::2IPv6 Routing Table - default - 3 entries
Codes: C - Connected, L - Local, S - Static
C 2001:DB8:1::/64 [0/0]
via GigabitEthernet0/0, directly connected
L 2001:DB8:1::1/128 [0/0]
via GigabitEthernet0/0, receiveR1 shows a connected route for 2001:DB8:1::/64. Since R2's address is 2001:DB8:1::2/32, it falls within the /64 prefix, so R1 should have a directly connected route. If R2 had a different prefix (e.g., /32), R1 might not have a route. Here, the route exists, so the issue is likely at Layer 2 or neighbor discovery.
Check IPv6 neighbor cache
show ipv6 neighborsIPv6 Address Age Link-layer Addr State Interface 2001:DB8:1::2 0 aaaa.bbbb.cccc REACH Gi0/0 FE80::2 0 aaaa.bbbb.cccc REACH Gi0/0
If the neighbor is not listed or state is not REACH, then neighbor discovery failed. Here, it is REACH, so Layer 2 is fine. The problem might be that R2's /32 prefix causes it to not consider R1's address as on-link, but neighbor cache shows it works. Actually, the issue is that R2's /32 prefix means it does not have a connected route for the /64 subnet, so it may not respond to pings from R1 if R1's source address is not within R2's configured prefix. Let's check R2's routing.
Check R2's IPv6 route for the source address
show ipv6 route 2001:db8:1::1IPv6 Routing Table - default - 2 entries
Codes: C - Connected, L - Local, S - Static
C 2001:DB8:1::/32 [0/0]
via GigabitEthernet0/0, directly connected
L 2001:DB8:1::2/128 [0/0]
via GigabitEthernet0/0, receiveR2 has a connected route for 2001:DB8:1::/32. The source address 2001:DB8:1::1 is within this /32, so R2 should have a route. However, the problem is that R2's prefix length /32 is shorter than the actual subnet /64. When R2 receives a packet destined to 2001:DB8:1::2, it checks its routing table and finds the connected /32 route. But for neighbor discovery, R2 uses the prefix length from its interface configuration. With /32, R2 considers only itself as on-link; it will not perform neighbor discovery for other addresses within the /64. So R2 cannot reply to pings because it does not have a neighbor entry for R1. Actually, the neighbor cache on R2 might show R1 as INCOMPLETE. Let's verify.
Check R2's IPv6 neighbors
show ipv6 neighborsIPv6 Address Age Link-layer Addr State Interface 2001:DB8:1::1 0 (incomplete) Gi0/0
The neighbor state is INCOMPLETE, meaning R2 cannot resolve R1's MAC address. This is because R2's /32 prefix causes it to not consider R1 as on the same link. R2 does not send Neighbor Solicitations for addresses outside its on-link prefix. Thus, the ping fails.
Root Cause
R2 is configured with an IPv6 prefix length of /32 on its interface, while the actual subnet uses a /64 prefix. IPv6 neighbor discovery only operates within the prefix length configured on the interface. With a /32 prefix, R2 considers only addresses within that /32 as on-link, but the /64 subnet is larger; R2 does not attempt neighbor discovery for addresses outside its configured prefix (like R1's /64 address), so it cannot resolve the Layer 2 address and fails to respond to pings.
Resolution
Verification
On R2, run: ``` show ipv6 neighbors ``` Expected output: ``` IPv6 Address Age Link-layer Addr State Interface 2001:DB8:1::1 0 aaaa.bbbb.cccc REACH Gi0/0 ``` Then from R1, ping R2: ``` ping 2001:db8:1::2 ``` Expected output: ``` Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 2001:DB8:1::2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms ```
Prevention
["Always use a /64 prefix length for IPv6 subnets on LAN interfaces, as required by RFC 4291 for SLAAC and neighbor discovery.","Double-check IPv6 address configuration consistency across directly connected interfaces to ensure matching prefix lengths.","Use 'show ipv6 interface brief' to verify prefix lengths during initial setup and after changes."]
CCNA Exam Relevance
On the CCNA 200-301 exam, this scenario appears in troubleshooting questions where a misconfigured IPv6 prefix length causes connectivity issues. The exam tests understanding that IPv6 neighbor discovery is prefix-length dependent, and that a mismatch can prevent communication even though addresses are in the same subnet. Candidates must know that the default prefix length for IPv6 LANs is /64 and that using a different length can break neighbor discovery.
Exam Tips
Remember that IPv6 neighbor discovery only works within the prefix length configured on the interface; a /64 is required for proper operation.
In troubleshooting, always check 'show ipv6 neighbors' for incomplete entries, which indicate neighbor discovery failure.
Know that 'show ipv6 route' shows connected routes based on the prefix length; a mismatch can cause routing issues.
Commands Used in This Scenario
show ipv6 interface brief
Displays a summary of IPv6 interface status and addresses, useful for quickly verifying IPv6 configuration and interface operational state.
show ipv6 neighbors
Displays the IPv6 neighbor discovery cache, showing the mapping of IPv6 addresses to MAC addresses on directly connected links, used to verify neighbor reachability and troubleshoot IPv6 connectivity.
show ipv6 route
Displays the IPv6 routing table on a Cisco router, showing all known IPv6 routes and their next-hop information for troubleshooting and verification of IPv6 routing.
Test Your CCNA Knowledge
Practice with scenario-based questions to prepare for the CCNA 200-301 exam.
Practice CCNA Questions