IPv6 addressing and prefixes
IPv6 address structure and compression rules, /64 prefixes, and how to configure and verify IPv6 addressing on Cisco routers.
Structure and notation
An IPv6 address is 128 bits written as eight groups of four hex digits separated by colons: 2001:0db8:0000:0000:0000:0000:0000:0001. The leftmost 64 bits conventionally identify the prefix (subnet) and the rightmost 64 the interface ID.
IPv6 anatomy quick facts
| Element | Value |
|---|---|
| Total length | 128 bits |
| Notation | 8 groups × 4 hex digits, colon-separated |
| Conventional prefix | /64 (subnet) |
| Interface ID | Right 64 bits — manual, EUI-64, or random |
| Loopback | ::1 |
| Unspecified | :: |
Compression rules
- Drop leading zeros inside each group:
0db8→db8. - Replace the longest run of all-zero groups with
::— allowed once per address. - Never use
::twice: the expansion would be ambiguous. - Mixed case is legal; lowercase is convention (RFC 5952).
- Full
- 2001:0db8:0000:0001:0000:0000:0000:00a5
- Drop leading zeros →
2001:db8:0:1:0:0:0:a5. - The longest zero run is groups 5–7 (three groups) →
2001:db8:0:1::a5. - To expand
2001:db8::ff: count the present groups (3), fill with zeros to eight →2001:0db8:0000:0000:0000:0000:0000:00ff.
2001:db8:0:1::a5 is the canonical compressed form.
Configuration and verification
Enable IPv6 routing and assign an address — Privileged EXEC → Global + interface configuration
Cisco IOS / IOS XE
- IPv6 routing is off by default —
ipv6 unicast-routingis mandatory.
configure terminal ipv6 unicast-routing interface gigabitethernet0/1 ipv6 address 2001:db8:100:1::1/64 no shutdown end
show ipv6 interface brief show ipv6 interface gi0/1 ping ipv6 2001:db8:100:1::2
- Interface lists the global unicast address plus an auto-created link-local
FE80::address. ipv6 unicast-routingabsent leaves the interface up but the router will not forward IPv6.
- Without
ipv6 unicast-routing, interfaces accept addresses but the device never routes. - The link-local address exists on every IPv6-enabled interface even without a global address.
Changes device configuration.
Common mistakes
- Using
::twice in one address — illegal and ambiguous. - Forgetting
ipv6 unicast-routing— the single most common 'IPv6 is configured but nothing routes' cause. - Assuming IPv6 has a broadcast — it uses multicast instead.
- Treating letters as errors — hex digits a–f are part of the address.
Observation: Interface has a global IPv6 address; directly connected pings work, but routed/transit traffic fails.
ipv6 unicast-routingmissing- Prefix mismatch between the two ends
- Interface down or ACL filtering ICMPv6
| Check | Indicates |
|---|---|
show running-config | include unicast-routing | Absent → the device won't forward transit IPv6 (it still answers directly connected neighbors). |
show ipv6 interface brief | Compare prefixes on both ends — they must share the subnet. |
show ipv6 neighbors after ping | Resolution failures point at ND issues, not routing. |
Correction: Enable ipv6 unicast-routing or correct the prefix/address.
show ipv6 neighbors resolves the peer and ping succeeds.
Related resources
Sources
- Cisco CCNA 200-301 v1.1 Exam Topics (official PDF) — reviewed 2026-11-02
- RFC 8200 — Internet Protocol, Version 6 (IPv6) Specification — reviewed 2026-11-02
- RFC 5952 — A Recommendation for IPv6 Address Text Representation — reviewed 2026-11-02
- Cisco — IPv6 Command Reference — reviewed 2026-11-02
Targets CCNA 200-301 v1.1 objectives. Supplemental blocks are labeled beyond exam scope.