IPv4 vs IPv6: addressing, SLAAC, dual stack
The short answer, then the mechanics
IPv4 uses 32-bit addresses, IPv6 uses 128-bit addresses, and nearly everything else that exams ask follows from that and from three design changes: IPv6 has no broadcast (multicast replaces it), hosts can configure themselves with SLAAC (stateless address autoconfiguration) from router advertisements, and every interface carries a link-local address (fe80::/10) that is used for neighbor discovery and routing next hops. The decision rule for scenario questions: for “a host must get an address with no DHCP server” think SLAAC, for “which address is valid only on this link” think link-local, and for “run both protocols side by side during migration” think dual stack. The addressing architecture is RFC 4291, and the address length, link-local, multicast and no-broadcast facts below come from it.
Layer 1: reading and shortening an address
An IPv6 address is written as eight groups of four hexadecimal digits separated by colons. Two rules shorten it, and they are the source of many exam questions:
- Leading zeros in a group can be dropped (
0db8becomesdb8,0000becomes0). - One run of consecutive all-zero groups can be replaced by
::. Only one, because with two a reader could not tell how many groups each stands for.
2001:0db8:0000:0000:0000:ff00:0042:8329 becomes 2001:db8::ff00:42:8329. The reverse also works as a check: count the groups that are present, subtract from eight, and that many zero groups sit where the :: is. A prefix length works as in IPv4: 2001:db8:1:1::/64 means the first 64 bits are the network prefix. A normal LAN subnet is a /64, because SLAAC and the standard interface identifier assume 64 bits of host part. The prefix plus interface identifier must add up to 128 bits, and RFC 4862 says a host ignores an advertised prefix for SLAAC if they do not.
Layer 2: the address types
| Type | Prefix | What it is for |
|---|---|---|
| Global unicast | Allocated space; in practice currently 2000::/3 | Routable on the internet; the IPv6 counterpart of a public IPv4 address |
| Unique local (ULA) | fc00::/7, in practice fd00::/8 | Private addressing inside a site, not routed on the internet; the closest counterpart of RFC 1918 space (RFC 4193) |
| Link-local | fe80::/10 | Valid on one link only; every interface must have one (RFC 4291) |
| Multicast | ff00::/8 | One-to-many delivery; replaces broadcast |
| Loopback | ::1/128 | The host itself, like 127.0.0.1 |
| Unspecified | ::/128 | “No address yet”, used as a source during autoconfiguration |
Anycast has no prefix of its own: an anycast address is taken from unicast space and looks identical to a unicast address, and the same address is configured on several nodes so the nearest one answers. The 2000::/3 range is how global unicast space is currently allocated; RFC 4291 itself defines global unicast as everything not claimed by the other types.
Layer 3: how a host gets its address
SLAAC. The host first builds a link-local address from fe80:: plus an interface identifier, then listens for Router Advertisements (RAs) from routers, or asks with a Router Solicitation. Each RA carries a prefix; the host appends its 64-bit interface identifier and has a global address. Before using any address the host runs Duplicate Address Detection with a Neighbor Solicitation. No server tracks leases.
DHCPv6. Stateful DHCPv6 hands out addresses and keeps leases like DHCPv4. Stateless DHCPv6 is a combination: the host builds its address with SLAAC and asks DHCPv6 only for extras such as DNS servers. The RA’s flags tell the host which to use (the managed and other-configuration bits are in RFC 4861). Note that DHCPv6 does not supply the default gateway; the router’s RA does.
Static. Configured by hand, still subject to duplicate address detection.
The interface identifier can be derived from the MAC address by modified EUI-64, the form CCNA 200-301 tests by name and the one a Cisco router uses with ipv6 address <prefix>/64 eui-64. Because it exposes the MAC address, RFC 8064 recommends stable, opaque identifiers for SLAAC instead, and current operating systems generate random-looking identifiers by default.
Worked example: EUI-64
A host interface has MAC 00:1A:2B:3C:4D:5E and the RA advertises 2001:db8:10:20::/64.
- Split the MAC in the middle:
00:1A:2Band3C:4D:5E. - Insert
FF:FEbetween them:00:1A:2B:FF:FE:3C:4D:5E. - Flip the seventh bit of the first byte (the universal/local bit).
00is0000 0000; flipping the bit worth 2 gives02. - Write as four groups:
021a:2bff:fe3c:4d5e. - Join to the prefix:
2001:db8:10:20:21a:2bff:fe3c:4d5e(leading zero dropped).
What changed from IPv4 besides length
| Topic | IPv4 | IPv6 |
|---|---|---|
| Address resolution | ARP | Neighbor Discovery (ICMPv6, RFC 4861) |
| One-to-all on the link | Broadcast | No broadcast; multicast groups |
| Fragmentation | Routers may fragment | Only the source fragments; routers do not (RFC 8200) |
| Header | Variable, with checksum | Fixed 40 bytes; no header checksum |
| NAT | Common to stretch address space | Not needed for address supply |
| DNS record for a host | A | AAAA |
Dual stack and the other migration options
Dual stack runs IPv4 and IPv6 on the same devices and interfaces, so each host has both addresses and uses whichever the destination supports. Tunneling carries IPv6 packets inside IPv4 across a network that does not route IPv6 yet. Translation converts between the two. RFC 4213 describes dual stack and configured tunnels. For routing, dual stack means two sets of everything: ipv6 unicast-routing must be enabled on a Cisco router, and static routes and OSPF exist per protocol (OSPFv3 for IPv6; see OSPF explained).
Which exams test this
| Exam | How the topic appears | Where on this site |
|---|---|---|
| CCNA 200-301 | v1.1 (until Feb 2, 2027): Network Fundamentals, configure and verify IPv6 addressing and prefix (1.8) and describe the address types, including global, unique local and link-local unicast, anycast, multicast and modified EUI-64 (1.9); IP Connectivity adds IPv6 static routes (3.3). v2.0 (from Feb 3, 2027): Network Infrastructure and Connectivity, troubleshoot IPv6 address configuration, assignment and prefix sizing (1.4); IP Routing adds IPv6 static routes and OSPFv3 (3.2, 3.3); Network Services and Security adds AAAA records (4.4) and RA guard (4.7.d) | Network infrastructure explained, IP routing explained, Network services and security explained |
| CompTIA Network+ N10-009 | Networking Concepts, objective 1.8: IPv6 to mitigate address exhaustion, and compatibility through tunneling, dual stack and NAT64; Network Operations, objective 3.4, adds SLAAC and IPv6 network services | Networking concepts explained |
How exam questions are built around the topic
Expect one of four shapes. Shorten or validate an address: the trap is a second ::, or a group with five digits. Identify the type from the prefix: fe80 is link-local, fd or fc is unique local, ff is multicast, 2 or 3 as the first digit is global unicast. Build the EUI-64 address: forgetting to flip the seventh bit is the standard wrong answer. Autoconfiguration scenarios: “no DHCP server, clients still have global addresses” means SLAAC and router advertisements; “clients have an address but no DNS server” points to stateless DHCPv6. Constraint words that decide: “link”, “site”, “internet”, “stateless”, “nearest”.
A common confusion is thinking IPv6 needs a /64 only by convention. For SLAAC it is effectively required by the 64-bit interface identifier. For subnetting arithmetic, the IPv4 method in subnetting step by step carries over, but exams rarely ask for IPv6 host counts. Addressing rides on the layers of the OSI vs TCP/IP models, and NAT questions are covered in NAT types.
Practice questions
Question 1. A branch LAN has IPv6-enabled routers but no DHCP server. Laptops on the LAN still obtain global unicast addresses. Which mechanism makes this possible?
- A. Stateful DHCPv6 relayed by the router
- B. ARP replies from the default gateway
- C. Router Advertisements used for stateless address autoconfiguration
- D. A broadcast DHCPDISCOVER sent to the whole LAN
Show answer
Answer: C
With SLAAC the router sends Router Advertisements containing the prefix, and each host appends its own interface identifier and checks for duplicates. No server is needed. Stateful DHCPv6 would need a server. ARP resolves IPv4 addresses to MAC addresses and does not assign addresses. A broadcast DHCPDISCOVER does not exist in IPv6, which has no broadcast.
Question 2. Which address is a valid shortened form of 2001:0db8:0000:0000:0000:0000:0000:0001?
- A. 2001:db8::1
- B. 2001:db8::0::1
- C. 2001:db8:0:0:0:0:1
- D. 2001:db8:1::
Show answer
Answer: A
Dropping leading zeros and replacing the single run of zero groups with :: gives 2001:db8::1. Option B uses :: twice, which is ambiguous and invalid. Option C has only seven groups and no ::, so it is not a full address. Option D is a different address: 2001:db8:1:: expands to 2001:db8:1:0:0:0:0:0, with the 1 in the third group instead of the last.