SaveMyCert
Log in
5 of 5 free questions left today·for 10 a day
Network Infrastructure and Connectivity

CCNA IPv6 Addressing: Address Types, EUI-64, SLAAC and Prefix Sizing

18 min readCCNA · Network Infrastructure and ConnectivityUpdated

IPv6 addressing is the system of 128-bit addresses, written as eight hexadecimal hextets, that identifies interfaces on an IPv6 network, with a prefix (usually /64) naming the subnet and an interface ID naming the device. CCNA v2.0 exam topic 1.4 asks you to troubleshoot it: abbreviate and expand addresses, recognise unicast address types by prefix, build and reverse modified EUI-64 interface IDs, configure and verify addresses on Cisco IOS, choose how hosts get addresses (SLAAC or DHCPv6), size and carve prefixes, and read the show output that reveals a wrong prefix, a missing router advertisement or a duplicate address.

What you’ll learn
  • Abbreviate IPv6 addresses to the RFC 5952 form and expand compressed addresses back to all 32 hex digits
  • Identify global unicast, unique local, link-local, loopback, unspecified and multicast addresses from their prefix
  • Build a modified EUI-64 interface ID from a MAC address, and recover the MAC from an EUI-64 address
  • Configure and verify IPv6 addresses on Cisco IOS with static, eui-64, link-local, ipv6 enable, autoconfig and DHCPv6 client commands
  • Explain what a router needs to send usable router advertisements, and choose SLAAC, stateless DHCPv6 or stateful DHCPv6 with the RA flags
  • Size IPv6 prefixes (/48, /56, /64, /127, /128), count subnets and carve aligned blocks, and decide whether addresses share a subnet
  • Troubleshoot duplicate addresses and predict the multicast groups an interface joins

How is an IPv6 address written and abbreviated?

An IPv6 address is 128 bits written as eight 16-bit hextets of four hex digits, separated by colons. Two rules shorten it, and both are reversible only if you apply them exactly (RFC 4291):

  • Drop leading zeros inside any hextet: 0db8 becomes db8, 000a becomes a, 0000 becomes 0. Trailing zeros are never dropped: 0d40 can only shrink to d40.
  • Replace one run of consecutive all-zero hextets with ::, and only once per address. Using :: twice is invalid because nobody could tell how many zeros each one stands for.

RFC 5952 adds a recommended (canonical) text form so that the same address is always written the same way: drop all leading zeros, compress the longest run of zero hextets, pick the first run when two runs tie, never use :: for a single zero hextet, and use lowercase. Cisco IOS displays addresses in uppercase; the value is identical.

Full formRFC 5952 formWhy
2001:0db8:0000:0000:0000:0000:0000:00012001:db8::1One run of six zero hextets
2001:0db8:0000:0000:0b10:0000:0000:00072001:db8::b10:0:0:7Two runs of two tie, so the first is compressed
2001:0db8:0000:0001:0000:0000:0000:00012001:db8:0:1::1The run of three beats the single zero
fe80:0000:0000:0000:0c12:44ff:fe7a:91d5fe80::c12:44ff:fe7a:91d5Only the leading zero of 0c12 is removed

Expanding is the reverse and is what most troubleshooting needs: count the hextets that are written, and the :: stands for exactly enough zero hextets to make eight, inserted at the position where it appears. Then pad every hextet on the left to four digits. 2001:DB8:0:93::C has five written hextets, so :: is three zero hextets after 93: 2001:0DB8:0000:0093:0000:0000:0000:000C. Padding a hextet on the right instead of the left, or placing the zeros anywhere other than where the :: sits, produces a different address.

Which IPv6 unicast address types must you recognise?

You identify an IPv6 address type from its leading bits, which in practice means its first hextet. The interface ID never changes the type. IPv6 has no broadcast; one-to-all delivery uses multicast instead (and anycast addresses are drawn from unicast space, so they look like unicast).

TypePrefixFirst hextet looks likeScope and use
Global unicast (GUA)2000::/32000 to 3FFFRoutable on the internet; what ISPs and RIRs allocate
Unique local (ULA)FC00::/7FC or FD (FD in practice)Routed inside an organisation, never on the internet; the IPv6 equivalent of RFC 1918 space
Link-localFE80::/10FE80 (FE80 to FEBF)Valid on one link only; never forwarded by a router
Loopback::1/128—The node's own stack, like 127.0.0.1
Unspecified::/128—"No address yet": the source address of a node that has none (for example during duplicate address detection)
Multicast (not unicast)FF00::/8FFxxOne-to-many; the second byte holds flags and scope (FF02 = link, FF05 = site)

Details worth knowing:

  • Unique local addresses (RFC 4193) are in FC00::/7, but only the half with the L bit set (FD00::/8) is defined, and it is followed by a random 40-bit global ID so that two organisations that merge are unlikely to collide. ULA is the right choice for space that must route between internal subnets but must not be reachable from the internet.
  • Site-local (FEC0::/10) was deprecated by RFC 3879 and replaced by unique local addressing. It is not a current choice.
  • 2001:DB8::/32 is reserved for documentation (RFC 3849). It is technically inside 2000::/3 but is never used on a real network.
  • Do not confuse the unspecified address :: with the default route ::/0. The first is a source address meaning "none"; the second is a routing-table prefix that matches everything.

How does modified EUI-64 build an interface ID from a MAC address?

Modified EUI-64 turns a 48-bit MAC address into the 64-bit interface ID (the last four hextets) in three steps (RFC 4291 appendix A):

  1. Split the MAC into two halves of three bytes each: 0019.e8d4.7b3a becomes 00:19:e8 and d4:7b:3a.
  2. Insert FFFE between the halves: 00:19:E8:FF:FE:D4:7B:3A.
  3. Invert the universal/local (U/L) bit, the 7th bit of the first byte, which has the value 0x02. Flip it whatever its starting value: 00 becomes 02, A8 becomes AA, 02 becomes 00.

The result 0219:E8FF:FED4:7B3A is written 219:E8FF:FED4:7B3A after dropping the leading zero. With the prefix 2001:DB8:BEEF:20::/64 the address is 2001:DB8:BEEF:20:219:E8FF:FED4:7B3A.

The bit flip is where most mistakes happen. Work on the first byte in binary when it is not 00:

MAC first byteBinaryAfter flipping 0x02Interface ID begins
000000 00000000 001002
A81010 10001010 1010AA
020000 00100000 000000
E01110 00001110 0010E2

A quick way: the second hex digit of the first byte changes by 2. If the digit's 0x2 bit is clear, add 2 (0→2, 8→A, 4→6); if it is set, subtract 2 (2→0, E→C, 3→1).

Reversing EUI-64 is used to find which device owns an address, for example to search a switch's MAC address table. Take the interface ID, recognise FF:FE in the middle (bytes 4 and 5) and remove it, then flip the 0x02 bit of the first byte back. 2C4:10FF:FE6B:D917 is 02C4:10FF:FE6B:D917; removing FFFE leaves 02:C4:10:6B:D9:17, and flipping 02 back to 00 gives the MAC 00c4.106b.d917. An interface ID with no FFFE in that position was not built with EUI-64: it was typed by hand (such as ::1) or randomly generated.

How do you configure and verify IPv6 addresses on a Cisco IOS interface?

Cisco IOS gives an interface its IPv6 addresses with the ipv6 address family of commands, and you verify them with show ipv6 interface. The methods you must tell apart:

Interface commandResult
ipv6 address 2001:DB8:1:1::1/64Static global address; the interface ID is exactly what you typed
ipv6 address 2001:DB8:1:1::/64 eui-64You give the prefix; IOS builds the interface ID from the interface MAC with modified EUI-64
ipv6 address FE80::A link-localManually set link-local address; replaces the automatic one
ipv6 enableEnables IPv6 with only an automatic link-local address; no global address
ipv6 address autoconfigThe router acts as a SLAAC client and builds a global address from the RAs it receives
ipv6 address autoconfig defaultAs above, and also installs a default route toward the router that sent the RAs
ipv6 address dhcp (optionally rapid-commit)The interface is a DHCPv6 client; rapid-commit shortens the exchange to two messages. It gets an address, not a gateway

Several global addresses can coexist on one interface. Unlike IPv4's ip address, which replaces the primary address unless you add secondary, each ipv6 address command adds an address, and there is no secondary keyword. This is how a LAN carries an old and a new prefix during renumbering; the router advertises both prefixes. Remove one with no ipv6 address followed by that exact address and length.

Verification commands:

  • show ipv6 interface brief prints one short block per interface: its [status/protocol], then each IPv6 address, link-local first. An interface with no IPv6 configuration shows unassigned. An interface that lists only an FE80 address has IPv6 enabled but no global address.
  • show ipv6 interface type number gives the detail: whether IPv6 is enabled, the link-local address, each global address with its subnet, DAD tags such as [TEN] or [DUP], the joined multicast groups and the ND/RA settings.
  • show ipv6 neighbors lists other nodes (the neighbour cache), not the router's own addresses; show ipv6 route connected lists connected prefixes, not interface status or link-local addresses.

Reading show ipv6 interface brief output is a skill on its own: a short interface ID such as ::A or FE80::A means the address was typed, while FE80::21B:D4FF:FE5A:6C01 was generated by EUI-64 from MAC 001b.d45a.6c01 (remove FFFE, flip 02 back to 00).

How does a Cisco router advertise prefixes for SLAAC?

Hosts learn their prefix and default router from Router Advertisements (RAs), ICMPv6 messages that a router multicasts periodically to FF02::1 (all nodes) and also sends in response to a host's Router Solicitation (as a multicast or a unicast reply), which the host multicasts to FF02::2 (all routers) because it does not yet know any router's address. For a Cisco IOS router to play its part, two things must be true:

  1. ipv6 unicast-routing is enabled globally. Without it, IOS behaves as an IPv6 host: it forwards no IPv6 packets and sends no RAs, so hosts get neither a prefix nor a default router. Interface commands such as ipv6 nd prefix or the RA flags only shape RAs that are being sent; they cannot fix missing RAs. Enabling routing also makes the interface join FF02::2.
  2. The interface has an on-link prefix to advertise. By default IOS advertises the prefix of each global address configured on the interface (ipv6 nd prefix can add or change advertised prefixes). An interface with only ipv6 enable (link-local only) sends RAs that name the router as a default gateway but carry no prefix, so SLAAC hosts keep only their link-local addresses.

A router that should advertise is configured with addresses; ipv6 address autoconfig is the opposite role, making the router a client of someone else's RAs.

Two RA fields matter for troubleshooting: the router lifetime (non-zero means "use me as a default router"; ipv6 nd ra lifetime 0 tells hosts not to) and, per prefix, the autonomous (A) flag that allows SLAAC from that prefix.

Why does SLAAC need a /64, and how do you size IPv6 prefixes?

SLAAC works only with a /64 because hosts append a 64-bit interface ID to the advertised prefix, and RFC 4862 hosts build an address only when prefix length plus interface ID length equals 128. A /56, /60 or any other length in an RA is ignored for address formation: hosts may still learn the router as default gateway from the same RA, which is a telling symptom (gateway present, no global address). If a LAN interface carries prefixes of several lengths, hosts form SLAAC addresses from the /64 prefixes only and ignore the others; several prefixes in one RA are normal. (Many hosts form more than one address per /64, for example a stable address plus temporary privacy addresses under RFC 8981, but all of them come from /64 prefixes.) Hosts may build the 64-bit ID with EUI-64 or, as most modern operating systems do, a random or stable-private value; either way it is 64 bits.

Common IPv6 prefix sizes:

PrefixTypical useContains
/48A site or enterprise allocation65,536 /64s (16 subnet bits)
/56A small site or branch delegation256 /64s (8 bits)
/60A very small site16 /64s (4 bits)
/64Every LAN or VLAN, and required for SLAACOne subnet; 64-bit interface IDs
/127Point-to-point link between routers (RFC 6164)Exactly two addresses, both usable
/128A single interface, such as a loopbackOne address

Because IPv6 has no broadcast address, a /127 holds exactly the two router addresses of a point-to-point link; carrying over the IPv4 /30 habit as a /126 works but is not the RFC 6164 recommendation. Many networks still use a /64 per link for simplicity.

Counting subnets: the number of /64s in a block is 2 to the power of (64 minus the prefix length). Carving blocks: each hex digit is 4 bits (a nibble), so prefixes that end on a nibble boundary (/48, /52, /56, /60, /64) are easiest to read.

  • Splitting a /48 into 16 equal blocks needs 4 more bits, so /52; those bits are the first hex digit of the fourth hextet, so a /48 such as 2001:DB8:6::/48 splits into 2001:DB8:6:0000::/52, 2001:DB8:6:1000::/52 and so on up to 2001:DB8:6:F000::/52. Counting the blocks from 0, block 11 is 2001:DB8:6:B000::/52.
  • Splitting a /48 into /56s uses the high byte of the fourth hextet: block n is n in hex followed by 00. For 2001:DB8:F::/48, block 45 is 0x2D, so 2001:DB8:F:2D00::/56, holding /64s 2D00 to 2DFF. Convert decimal to hex first, and keep the trailing zeros: written without them, the value lands in the low byte and names a /64 inside the first /56.

How do you tell whether two IPv6 addresses are in the same subnet?

Two addresses are in the same /64 when their first four hextets are identical after full expansion. Expand both addresses (place the zeros that :: stands for, pad each hextet on the left), then compare the first 64 bits:

  • 2001:DB8:F3:7C::20 has fourth hextet 007C; 2001:DB8:F3:7C0::20 has 07C0. They look alike but are different /64s, because omitted digits are always leading zeros.
  • In 2001:DB8:BEEF:3::2C:41 the :: sits after the fourth hextet, so the fourth hextet is 0003 and 2C belongs to the interface ID.
  • A /64 covers four hextets, not three: hosts that share only their first three hextets are not necessarily on the same subnet.

For a prefix that does not end on a hextet boundary, work out how many bits of the partial hextet are fixed. A /58 fixes the first 10 bits of the fourth hextet and leaves 6 free, so it holds 64 /64s. 2001:DB8:9:C0::/58 therefore spans fourth-hextet values 00C0 to 00FF; a value just below or just above that range belongs to a neighbouring /58, and a value that only looks similar after a careless expansion may be far away.

How do routers choose SLAAC, stateless DHCPv6 or stateful DHCPv6?

The router signals the assignment method to hosts with flags in its RAs, and the default gateway always comes from the RA, never from DHCPv6. DHCPv6 has no default-gateway option (unlike DHCPv4 option 3).

MethodAddress comes fromDNS and other options fromIOS interface configuration
SLAACHost, from the RA prefix (A flag set)RA (RDNSS, where supported) or nothingDefault: a /64 global address on the interface
Stateless DHCPv6Host, via SLAACDHCPv6 serveripv6 nd other-config-flag (O flag)
Stateful DHCPv6DHCPv6 serverDHCPv6 serveripv6 nd managed-config-flag (M flag), plus ipv6 nd prefix prefix/64 no-autoconfig to stop SLAAC

Points the exam builds on:

  • The M flag alone tells hosts to ask DHCPv6 for an address, but the prefix is still advertised with the A flag, so many hosts also create a SLAAC address. To make DHCPv6 the only source, clear the A flag with no-autoconfig on the prefix (or ipv6 nd prefix default no-autoconfig for all of them).
  • Keep sending RAs with a non-zero router lifetime. Suppressing RAs or setting ipv6 nd ra lifetime 0 stops hosts from having any default gateway, so they reach only their own link even though DHCPv6 leases work.
  • If the DHCPv6 server is on another subnet, the router's interface needs ipv6 dhcp relay destination server-address; relaying gets leases through but supplies no gateway either. (Client-side commands on PCs belong to the client-connectivity topic, and DHCPv4 to its own topic.)

How do duplicate address detection and solicited-node multicast work?

Duplicate address detection (DAD) checks that a unicast address is unused on the link before the node uses it (RFC 4862). The node sends a Neighbor Solicitation for its new address from the unspecified source :: (it has no usable address yet) to that address's solicited-node group. While it waits, the address is tentative; if another node answers, the address is a duplicate.

show ipv6 interface tagMeaningEffect
[TEN]Tentative: DAD is still runningNot used yet; the tag disappears when DAD succeeds
[DUP]Duplicate: another node on the link already owns the addressThat address is not used; the router is unreachable at it

IOS also logs a duplicate-address syslog message naming the address and interface in the form %IPV6_ND-4-DUPLICATE: Duplicate address address on interface. Which address is duplicated decides the impact. A duplicate global address is simply not used, and the interface keeps working on its other addresses. A duplicate link-local address is serious: Cisco IOS disables IPv6 processing on that interface, including its global addresses, because Neighbor Discovery and routing depend on the link-local. DAD runs on the node that is adding the address, so that node marks it duplicate; the node already using the address answers the solicitation and carries on. Fix it by configuring a unique link-local address.

Multicast groups an interface joins. IPv6 replaces broadcast with targeted multicast. show ipv6 interface lists the "Joined group address(es)":

  • FF02::1, all nodes: joined by every IPv6 interface, host or router; periodic RAs go here.
  • FF02::2, all routers: joined only when the device acts as a router (ipv6 unicast-routing); Router Solicitations go here.
  • Solicited-node groups, FF02::1:FFxx:xxxx: one per distinct last-24-bits value of the interface's unicast addresses (link-local included). Take the last 24 bits (6 hex digits) and append them to FF02::1:FF. A target ending 00A4:D25E maps to FF02::1:FFA4:D25E.

Address resolution uses the solicited-node group as the Neighbor Solicitation's destination, so only nodes whose address ends in those 24 bits process it. Addresses that share their last 24 bits share one group: FE80::C, 2001:DB8:30:1::C and 2001:DB8:31:1::C all map to FF02::1:FF00:C, and the interface joins it once.

Tip. Most questions in this topic put an address, an IOS interface configuration or show ipv6 interface output in the stem and ask for a precise result: the compressed or expanded form of an address, the EUI-64 address an interface will use or the MAC behind one, the type of an address from its prefix, the block a numbered site receives from a larger allocation, or which addresses share a subnet. Troubleshooting items describe a symptom such as hosts without a global address or default gateway, or a DAD tag in the show output, and ask for the change or explanation that fits the scenario's stated requirements. Several are Select TWO.

Key takeaways
  • Drop only leading zeros in a hextet and use :: once; RFC 5952 compresses the longest zero run, the first one on a tie, and never a single zero hextet.
  • First hextet 2000–3FFF is global unicast, FC/FD unique local (internal only), FE80 link-local, FF multicast; :: is unspecified and ::1 loopback. Site-local FEC0::/10 is deprecated.
  • Modified EUI-64: split the MAC, insert FFFE, flip the 0x02 bit of the first byte (00→02, A8→AA); reverse it by removing FFFE and flipping the bit back.
  • Each ipv6 address command adds an address (no secondary keyword); ipv6 enable gives link-local only; autoconfig makes the router a SLAAC client, and autoconfig default also installs a default route.
  • A Cisco router sends RAs only with ipv6 unicast-routing; by default it advertises the prefixes of the global addresses on the interface, so a LAN interface with only a link-local address sends RAs with no prefix.
  • SLAAC needs a /64; any other prefix length in an RA is ignored for addressing, even though hosts may still learn the gateway.
  • Hosts always learn their default gateway from RAs (the router's link-local source address); DHCPv6 has no gateway option, so never stop RAs to force DHCPv6.
  • O flag = stateless DHCPv6 (SLAAC address + DHCPv6 options); M flag plus a no-autoconfig prefix = addresses from stateful DHCPv6 only.
  • Expand addresses before comparing subnets: 7C is 007C, not 07C0; /48 to /56 uses the high byte of the fourth hextet, and block numbers must be converted to hex.
  • [TEN] means DAD is running, [DUP] means the address is in use elsewhere; a duplicate link-local disables IPv6 on the interface, a duplicate global is just not used.

Frequently asked questions

How do you shorten an IPv6 address correctly?

Remove leading zeros from each 16-bit hextet (0db8 becomes db8, but 0d40 can only become d40), then replace one run of consecutive all-zero hextets with ::. The :: can appear only once in an address. The RFC 5952 recommended form compresses the longest run of zeros, chooses the first run when two are equally long, does not use :: for a single zero hextet, and is written in lowercase.

How do you calculate a modified EUI-64 interface ID?

Split the 48-bit MAC address into two 24-bit halves, insert FFFE between them, and invert the seventh bit (value 0x02) of the first byte. For MAC 0019.e8d4.7b3a the result is 0219:E8FF:FED4:7B3A, written 219:E8FF:FED4:7B3A. The bit is flipped whatever its value, so a first byte of A8 becomes AA and 02 becomes 00.

What is the IPv6 equivalent of RFC 1918 private addresses?

Unique local addresses in FC00::/7, defined in RFC 4193. In practice they begin with FD followed by a random 40-bit global ID. They can be routed between an organisation's subnets but are not routed on the internet. The older site-local range FEC0::/10 is deprecated, and link-local FE80::/10 addresses cannot be routed at all.

Why do SLAAC hosts get only a link-local address?

Either they receive no router advertisement with a usable prefix or the prefix is not a /64. On a Cisco router, check that ipv6 unicast-routing is enabled (IOS sends no RAs without it), that the LAN interface has a global address so there is a prefix to advertise, that the prefix is a /64, and that it has not been set to no-autoconfig.

Does DHCPv6 give hosts a default gateway?

No. DHCPv6 has no default-gateway option, unlike DHCPv4. IPv6 hosts learn their default router from the source link-local address of router advertisements, so RAs must keep being sent with a non-zero router lifetime even when a stateful DHCPv6 server assigns every address.

What is the difference between stateless and stateful DHCPv6?

With stateless DHCPv6, hosts create their own addresses with SLAAC and ask the DHCPv6 server only for options such as DNS servers; a Cisco router signals it with ipv6 nd other-config-flag (O flag). With stateful DHCPv6, the server assigns the addresses too; the router sets ipv6 nd managed-config-flag (M flag) and should advertise the prefix with no-autoconfig so hosts do not also create SLAAC addresses.

What prefix length should a point-to-point IPv6 link use?

RFC 6164 recommends a /127 for links between routers. IPv6 has no broadcast address, so both addresses in a /127 are usable and the two routers fill it exactly. Many networks also use a /64 per link for consistency, while a /128 identifies a single interface such as a loopback.

What happens when a Cisco router detects a duplicate IPv6 address?

The address is marked [DUP] in show ipv6 interface and a duplicate-address syslog message is logged. A duplicate global address is simply not used, so the router cannot be reached at it. A duplicate link-local address is more serious: IOS disables IPv6 processing on that interface, including its global addresses, until a unique link-local address is configured.

Source

This lesson covers the "Network Infrastructure and Connectivity" domain of the official CCNA exam guide. Vendors revise their guides — check the source for the current version.

Test yourself on this topic
Practice now

Sign up free to mark lessons complete, bookmark topics and track your exam readiness.

Spotted a mistake in this lesson?