IPv6 addressing: unicast types, prefix sizes and modified EUI-64
Why this matters
IPv6 is no longer a lab exercise. Mobile carriers, cloud providers and many enterprise networks run it alongside IPv4, and a junior network engineer is expected to read an IPv6 address, tell what kind it is, and know why a router has three addresses on one interface. A help-desk analyst who sees a laptop with only an FE80 address needs to know that it means "no router advertisement arrived", not "IPv6 is working".
The faults are different from IPv4's, and they are easy to miss. A router forwards IPv4 perfectly but never advertises an IPv6 prefix because one global command is missing. A LAN is given a /56 and none of its hosts configure themselves. A change record contains an address compressed with two double colons, which matches nothing. Getting the address types, the prefix sizes and the EUI-64 calculation right is what lets you spot these in seconds.
The lesson
Configuring, assigning and sizing IPv6 unicast addresses, including modified EUI-64
An IPv6 address is 128 bits, written as eight groups of four hexadecimal digits separated by colons:
2001:0db8:0000:0001:0000:0000:0000:00ff
Most unicast addresses split into two halves. The first 64 bits are the prefix: the network part, made up of a global routing prefix and a subnet ID. The last 64 bits are the interface ID, which identifies the host on that link.
Writing addresses: the two compression rules
Two rules shorten an address, and only these two:
- Drop leading zeros in any group. 0db8 becomes db8, 00ff becomes ff, 0000 becomes 0. You may never drop trailing zeros: 0a00 becomes a00, not a.
- Replace one run of consecutive all-zero groups with a double colon (::). Use it once only, and on the longest run. If two runs tie, compress the first.
Worked example: 2001:0db8:0000:0001:0000:0000:0000:00ff.
- Drop leading zeros: 2001:db8:0:1:0:0:0:ff.
- The longest run of zero groups is the three in groups 5 to 7. Replace them: 2001:db8:0:1::ff.
The single zero in group 3 stays as 0. Writing 2001:db8:1::ff would lose it and change the address. Writing 2001:db8::1::ff uses two double colons, which is invalid, because nobody could tell how many zeros each one hides.
A second example: 2001:0db8:0a00:0000:0000:0bc0:0000:0010 becomes 2001:db8:a00:0:0:bc0:0:10, then 2001:db8:a00::bc0:0:10. The run of two zero groups is longer than the single one later, so that is the one compressed.
IOS displays addresses in upper case; both cases mean the same thing.
The unicast address types and other prefixes to recognise
| Type | Prefix | What it is for |
|---|---|---|
| Global unicast | 2000::/3 (first group 2000 to 3fff) | Publicly routable addresses, like IPv4 public space |
| Unique local | FC00::/7, in practice FD00::/8 | Routed inside an organisation, never on the internet; the role RFC 1918 plays in IPv4 |
| Link-local | FE80::/10 | Valid on one link only; never routed off it |
| Multicast | FF00::/8 | One-to-many; IPv6 has no broadcast |
| Loopback | ::1/128 | The host itself |
| Unspecified | ::/128 | "No address yet", used as a source during start-up |
Reading the first group is usually enough. 2001:db8:4a::25 is global unicast. fd12:3456::9 is unique local. fe80::1a2b:3c is link-local. ff02::1:ff4a:1025 is multicast. Look only at the start of the address: 2001:db8::fe80 merely ends in fe80; it is global unicast. And fd80::1:2:3:4 is unique local, not link-local. FEC0::/10, the old site-local range, is deprecated.
Every IPv6-enabled interface has a link-local address. Routers use them as next hops and as the source of routing protocol messages. On Ethernet, IOS XE creates one automatically as soon as IPv6 is enabled on the interface, which happens when you give it any global address or enter ipv6 enable. That is why an interface configured with one address shows two.
Three multicast groups appear in show output often:
- FF02::1, all nodes on the link.
- FF02::2, all routers on the link. An interface joins it only when the router is acting as an IPv6 router.
- FF02::1:FFxx:xxxx, the solicited-node group, built from the last 24 bits of each unicast address. Neighbour discovery uses it instead of broadcasts. It is a multicast group, not an address the interface was given.
Anycast addresses are ordinary unicast addresses assigned to several devices; the network delivers to the nearest one.
Prefix sizing
IPv6 subnetting is about the prefix, not about counting hosts. Three sizes come up again and again:
- /48 is a typical allocation to a whole site.
- /56 is common for smaller sites and home connections.
- /64 is the standard size of one LAN. It leaves a 64-bit interface ID.
To count subnets, take the difference between the two prefix lengths and raise 2 to that power.
Worked example: a provider delegates 2001:db8:4c00::/48 to a site, and every LAN gets a /64.
- Bits available for the subnet ID: 64 - 48 = 16.
- Subnets: 2^16 = 65,536.
- They run from 2001:db8:4c00:0000::/64 to 2001:db8:4c00:ffff::/64. The fourth group is the subnet ID, so planning is a matter of choosing that group: 2001:db8:4c00:10::/64 for VLAN 10, 2001:db8:4c00:20::/64 for VLAN 20.
A /56 to /64 gives 8 bits, so 256 subnets.
Keep LANs at /64. SLAAC builds a 64-bit interface ID, so hosts autoconfigure only from a /64 prefix. A LAN interface configured as 2001:db8:10:2000::1/56 will advertise a /56, and hosts will ignore it for autoconfiguration. The prefix is valid global unicast space; it is just the wrong size for a LAN. Point-to-point links between routers often use a /127 instead.
Modified EUI-64
Modified EUI-64 builds a 64-bit interface ID from a 48-bit MAC address. It does two things:
- Splits the MAC in half, after the third byte, and inserts FFFE in the middle. That makes 64 bits.
- Inverts the seventh bit of the first byte, counting from the left. This is the universal/local bit. Inverting it adds or removes 2 in the first byte's value.
Worked example: R1's Gi0/0 has the MAC 0050.56a1.b2c3.
- Write the MAC as bytes: 00 50 56 a1 b2 c3.
- Split after the third byte: 00 50 56 | a1 b2 c3.
- Insert FFFE: 00 50 56 ff fe a1 b2 c3.
- First byte 00 is 0000 0000 in binary. The seventh bit is worth 2. Invert it: 0000 0010, which is 02.
- Interface ID: 0250:56ff:fea1:b2c3.
- Add the prefix 2001:db8:acad:10::/64 and drop leading zeros: 2001:db8:acad:10:250:56ff:fea1:b2c3.
R1(config)#ipv6 unicast-routing
R1(config)#interface GigabitEthernet0/0
R1(config-if)#ipv6 address 2001:db8:acad:10::/64 eui-64
R1(config-if)#end
R1#show ipv6 interface brief
GigabitEthernet0/0 [up/up]
FE80::250:56FF:FEA1:B2C3
2001:DB8:ACAD:10:250:56FF:FEA1:B2C3
The link-local address uses the same interface ID with the FE80::/64 prefix.
The bit flip catches people in three ways. Work in binary for the first byte:
- 52 is 0101 0010. Inverting the bit worth 2 gives 0101 0000, which is 50. So MAC 5254.0012.abcd gives the interface ID 5054:00ff:fe12:abcd, written 5054:ff:fe12:abcd. Changing 52 to 12 would flip the bit worth 64, the wrong one.
- 0c is 0000 1100. Inverting gives 0000 1110, which is 0e. MAC 0c1a.2b3c.4d5e gives the link-local address fe80::e1a:2bff:fe3c:4d5e.
- 02 is 0000 0010. The bit is already on, and inverting it turns it off, giving 00. A locally administered MAC 0200.5e10.2030 with prefix 2001:db8:7:7::/64 gives 2001:db8:7:7:0:5eff:fe10:2030. The bit is inverted, not forced on.
Two more errors to reject: FFFE always goes between the third and fourth bytes, never at the end, and it is FFFE, not FEFF.
How interfaces get their addresses
| Method | IOS XE interface command | What happens |
|---|---|---|
| Static | ipv6 address 2001:db8:20:1::1/64 |
You set the whole address |
| Static prefix, EUI-64 host part | ipv6 address 2001:db8:20:1::/64 eui-64 |
You set the prefix; the interface ID comes from the MAC |
| Link-local only | ipv6 enable |
Creates a link-local address and nothing else |
| Chosen link-local | ipv6 address fe80::1 link-local |
Replaces the automatic link-local address |
| SLAAC client | ipv6 address autoconfig |
Learns a prefix from a router advertisement and builds its own address; add default to install a default route too |
| DHCPv6 client | ipv6 address dhcp |
Leases an address from a DHCPv6 server; rapid-commit shortens the exchange to two messages |
Setting the link-local address by hand makes routing tables much easier to read. Neighbours then see R1's Gi0/1 as FE80::1 in next-hop fields instead of a long EUI-64 value:
R1(config)#interface GigabitEthernet0/1
R1(config-if)#ipv6 address fe80::1 link-local
R1(config-if)#ipv6 address 2001:db8:acad:20::1/64
Hosts usually get addresses in one of three ways. With SLAAC, a router's router advertisement (RA) announces the /64 prefix and the host builds its own interface ID, by EUI-64 or, on most modern operating systems, from random bits for privacy. SLAAC needs no DHCPv6 server. With stateless DHCPv6, the host uses SLAAC for its address and asks DHCPv6 only for extras such as DNS servers. With stateful DHCPv6, the server assigns the address itself. Flags in the RA tell hosts which to use.
A router sends RAs only when it is an IPv6 router, and that takes one global command, ipv6 unicast-routing. Without it, IOS XE will still accept addresses on its interfaces, and they will show up/up, but it does not forward IPv6 packets between interfaces and does not send RAs. Hosts then form only link-local addresses.
Troubleshooting IPv6 address problems
Start with show ipv6 interface, which shows the addresses, the groups joined and the RA behaviour:
R2#show ipv6 interface GigabitEthernet0/1
GigabitEthernet0/1 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::5054:FF:FE12:ABCD
No Virtual link-local address(es):
Global unicast address(es):
2001:DB8:20:1::1, subnet is 2001:DB8:20:1::/64
Joined group address(es):
FF02::1
FF02::1:FF00:1
FF02::1:FF12:ABCD
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds (using 30000)
Two clues are missing here. FF02::2 is not in the joined groups, and there is no line saying router advertisements are sent. Both mean R2 is not acting as an IPv6 router. Hosts on this LAN will show only FE80 addresses. The fix is ipv6 unicast-routing in global configuration. Adding ipv6 enable would not help, since the interface already has IPv6 enabled.
After the fix, the same command adds:
Joined group address(es):
FF02::1
FF02::2
FF02::1:FF00:1
FF02::1:FF12:ABCD
...
ND router advertisements are sent every 200 seconds
Hosts use stateless autoconfig for addresses.
Other faults and their signs:
- Hosts get no global address, but RAs are being sent. Check the prefix length. A /56 or /48 on a LAN interface stops SLAAC.
- An address is marked [DUP]. Duplicate address detection found another device already using it. Correct the static address or the duplicate MAC.
- An address in a ticket does not match anything. Expand it in full, group by group, and check the compression rules. Two double colons or dropped trailing zeros mean the record itself is wrong.
- A static route through a link-local next hop is rejected. A link-local address is only meaningful on one link, so the route must also name the exit interface (lesson 14).
What the exam is really asking
- Compression. Drop leading zeros only. One double colon only, on the longest run of zero groups. A single zero group stays as 0.
- Recognising types by the first group. 2000::/3 global unicast, FC00::/7 (FD) unique local, FE80::/10 link-local, FF00::/8 multicast. Read the start of the address, not its end.
- Unique local versus link-local. Unique local is routed inside the company. Link-local never leaves its link.
- EUI-64 steps. FFFE in the middle, after the third byte. Invert the seventh bit: 00 becomes 02, 02 becomes 00, 52 becomes 50, 0c becomes 0e. The result is 64 bits.
- Why there are two addresses. Enabling IPv6 creates a link-local address automatically; RAs and DHCPv6 do not hand out link-local addresses.
- Prefix arithmetic. Subnets = 2 to the power of (64 minus the site prefix length). /48 gives 65,536 LANs; /56 gives 256.
- SLAAC needs a /64 and an RA. It does not need DHCPv6.
-
ipv6 unicast-routingis what makes a router forward IPv6 and send RAs. Without it, hosts form only link-local addresses.
Practise what you just read
1. R1’s Gi0/0 has the MAC address 0050.56a1.b2c3 and is configured with ipv6 address 2001:db8:acad:10::/64 eui-64. Which global unicast address does it build?
Select one
Show answer
C. Modified EUI-64 splits the MAC into 0050.56 and a1.b2c3, inserts FFFE between them, and flips the seventh bit of the first byte, so 00 becomes 02. The interface ID is 0250:56ff:fea1:b2c3, giving 2001:db8:acad:10:250:56ff:fea1:b2c3. The option 2001:db8:acad:10:50:56ff:fea1:b2c3 forgets the bit flip.
2. A change record lists the address 2001:0db8:0000:0000:0000:00a0:0000:0001. Which is its correctly compressed form?
Select one
Show answer
B. Leading zeros in each group may be dropped, giving 2001:db8:0:0:0:a0:0:1, and the longest run of zero groups, three of them, becomes a double colon: 2001:db8::a0:0:1. 2001:db8::a0::1 uses the double colon twice, which is invalid, and 2001:db8::a:0:1 wrongly drops a trailing zero.
3. Which IPv6 prefix contains the link-local unicast addresses that every IPv6-enabled interface creates for itself?
Select one
Show answer
A. Link-local unicast addresses come from FE80::/10, and each IPv6-enabled interface creates one so it can talk to neighbours on the same link. FC00::/7 is unique local space, FF00::/8 is multicast, and FEC0::/10 is the old site-local range, deprecated and never used for link-local addresses.
15 more questions on this exam topic are part of the full practice bank.
Hands-on labs
Every lab runs in Cisco Packet Tracer on your own computer (or on paper), costs nothing, never touches a real network, and ends by saving your work for the next lab.
Part of the free Cisco CCNA 200-301 course — 29 lessons and 28 hands-on labs.
This is an independent study companion for the Cisco CCNA 200-301 v2.0 exam and is not produced by or endorsed by Cisco. Cisco, CCNA and IOS are trademarks of Cisco Systems, Inc.