CompTIA Network+ guideNetworking concepts
IPv6 for CompTIA Network+: Address Types, Shortening, SLAAC, and Dual Stack
The IPv6 you need for N10-009: shorten and expand addresses by the RFC 5952 rules, identify address types by prefix, count subnets in a /48, compare SLAAC with DHCPv6, and choose between dual stack, tunneling, and NAT64.
Short answer
CompTIA Network+ N10-009 covers IPv6 in objective 1.8 (addressing, address exhaustion, and the compatibility tools dual stack, tunneling, and NAT64) and in objective 3.4, which lists SLAAC. In practice that means you should be able to shorten and expand an address by the RFC 5952 rules, recognize loopback, link-local, unique local, multicast, and global unicast prefixes, work out how many /64 subnets a prefix holds, and pick the right transition tool for a scenario. A /48, for example, holds 2^16 = 65,536 /64 subnets.
Where IPv6 sits in CompTIA Network+ N10-009
IPv6 appears in two N10-009 objectives. Objective 1.8, under Networking Concepts, lists IPv6 addressing with two sub-points: mitigating address exhaustion, and compatibility requirements, meaning tunneling, dual stack, and NAT64. Objective 3.4, under Network Operations, lists stateless address autoconfiguration (SLAAC) next to DHCP.
The A+ exam stops at recognizing ::1 and fe80:: addresses, as the A+ networking guide shows. Network+ expects you to work with full addresses by hand, which is what the rest of this page practices.
Reading an IPv6 address: 128 bits in eight groups
An IPv6 address is 128 bits, written as eight groups of four hexadecimal digits separated by colons. Each group is 16 bits, and 8 × 16 = 128. A prefix length works the same way as IPv4 CIDR: /64 means the first 64 bits identify the network and the remaining 64 bits identify the interface.
Two differences from IPv4 matter early. RFC 4291 says IPv6 has no broadcast addresses, because multicast replaces them. It also says that for most unicast addresses the interface ID is 64 bits long, which is why /64 is the normal size for one IPv6 subnet. Every example on this page uses 2001:db8::/32, the prefix RFC 3849 reserves for documentation.
Shortening and expanding addresses by the RFC 5952 rules
RFC 5952 sets the recommended text form. Its rules, in the order you apply them:
- Drop leading zeros in every group. A group of 0000 becomes 0.
- Replace the longest run of consecutive all-zero groups with "::".
- Break ties by position. If two runs are equally long, compress the first one.
- Never use "::" for a single zero group, and write the letters a to f in lowercase.
RFC 4291 adds the rule that makes "::" safe to read: it can appear only once in an address, because two of them would leave the number of missing groups ambiguous.
Example 1. Shorten 2001:0db8:0000:0001:0000:0000:0000:00a0.
- Drop leading zeros: 2001:db8:0:1:0:0:0:a0.
- The zero runs are group 3 (one group) and groups 5 to 7 (three groups). The longer run gets the "::".
- Result: 2001:db8:0:1::a0. The single zero in group 3 stays as 0.
Example 2. Shorten 2001:db8:0:0:1:0:0:1.
- Two runs of two zero groups each, groups 3 to 4 and groups 6 to 7.
- They tie, so the first run is compressed.
- Result: 2001:db8::1:0:0:1, which is the form RFC 5952 itself uses for this case.
Example 3. Expand 2001:db8:a::1.
- Count the groups that are written: 2001, db8, a, and 1, so four groups.
- The "::" stands for 8 − 4 = 4 zero groups.
- Pad each group to four digits: 2001:0db8:000a:0000:0000:0000:0000:0001.
One subtlety: RFC 5952's rules are recommendations for writing addresses. RFC 4291 still accepts other valid forms, such as "::" in place of a single zero group, so "valid" and "recommended" can differ. When a question asks for the shortest correct form, apply all four rules above.
The free mixed set of 20 Network+ questions includes one item that asks for the shortest valid form of a different address. When you can do the three examples above without notes, shorten the IPv6 address in the free Network+ item and read why each wrong form fails.
Identifying IPv6 address types by prefix
| Type | Prefix | How to spot it | Source |
|---|---|---|---|
| Unspecified | ::/128 | All zeros | RFC 4291 |
| Loopback | ::1/128 | All zeros except the last bit | RFC 4291 |
| Link-local | fe80::/10 | First group from fe80 to febf | RFC 4291 |
| Unique local | fc00::/7 | First group starts with fc or fd | RFC 4193 |
| Multicast | ff00::/8 | First group starts with ff | RFC 4291 |
| Global unicast allocations | Currently allocated from 2000::/3 | First hexadecimal digit 2 or 3; check special-purpose reservations before assuming public routability | IANA IPv6 Address Space |
| Documentation | 2001:db8::/32 | Reserved for examples, never for real networks | RFC 3849 |
The ranges in the "how to spot it" column come straight from the prefix bits:
- fe80::/10 fixes the first 10 bits as 1111 1110 10. The last 6 bits of the first group can be anything, so the first group runs from 1111 1110 1000 0000 (fe80) to 1111 1110 1011 1111 (febf).
- fc00::/7 fixes the first 7 bits as 1111 110. The eighth bit can be 0 or 1, giving fc or fd as the first two hex digits.
A quick check: fe80::1c2b:3aff:fe4d:5e6f is link-local; fd12:3456:789a:1::25 is unique local; ff02::1 is multicast; 2001:db8:4:5::10 has a global unicast format but sits in the documentation prefix.
How many /64 subnets fit in a /48
Subnet math in IPv6 counts subnets, not hosts. Take 2001:db8:4c00::/48:
- From /48 to /64 there are 64 − 48 = 16 subnet bits.
- 2^16 = 65,536 possible /64 subnets.
- They run from 2001:db8:4c00:0000::/64 to 2001:db8:4c00:ffff::/64, because the fourth group, 0000 to ffff, is the subnet ID.
Each /64 then leaves 64 bits for interface IDs, or 2^64 = 18,446,744,073,709,551,616 addresses. A /56 gives 64 − 56 = 8 subnet bits, so 2^8 = 256 /64 subnets. This is why IPv6 plans usually give every segment a /64 instead of sizing subnets by host count, unlike the IPv4 work in the subnetting guide.
SLAAC, DHCPv6, and router advertisements
With SLAAC, defined in RFC 4862, a host builds its own address from information it already has and a prefix that routers advertise, with no extra servers. Routers send those prefixes in router advertisements, part of IPv6 Neighbor Discovery (RFC 4861), which is also how hosts find their routers. Two flags in the advertisement tell hosts whether to use DHCPv6. The M flag ("managed") says addresses are available from DHCPv6. The O flag ("other") says only other settings, such as DNS servers, come from DHCPv6, which RFC 8415 calls stateless DHCP. Neighbor Discovery also takes over the address-resolution job that ARP does in IPv4. The ports and protocols guide summarizes common DHCP, DNS and time-service ports.
Dual stack, tunneling, or NAT64: choosing the compatibility tool
| Situation in the stem | Tool | What it does | Source |
|---|---|---|---|
| Hosts and routers can run both protocols | Dual stack | Each device runs IPv4 and IPv6 side by side | RFC 4213 |
| Two IPv6 networks are joined only by an IPv4 path | Tunneling | IPv6 packets are wrapped in IPv4 headers to cross the IPv4 network | RFC 4213 |
| IPv6-only clients must reach IPv4-only servers | NAT64, usually with DNS64 | A translator shares public IPv4 addresses among IPv6-only clients, and DNS64 builds AAAA records from A records | RFC 6146, RFC 6147 |
A worked NAT64 example: an IPv6-only laptop looks up a server whose only record is A 192.0.2.33. DNS64 answers with an AAAA record built from the well-known prefix 64:ff9b::/96 that RFC 6146 uses. Converting 192.0.2.33 to hex gives c0, 00, 02, and 21, so the synthesized address is 64:ff9b::c000:221. The laptop sends IPv6 to that address, and the NAT64 translator converts it to IPv4 toward 192.0.2.33.
Address exhaustion, the other 1.8 sub-point, is the reason all three tools exist: IPv6 has 128-bit addresses against IPv4's 32, and networks will run both for a long time. Where these tools meet cloud designs and modern environments, see the cloud and data center guide.
Trust the source
Official sources
Exam policies can change. Use these primary sources for the most current details.
- CompTIA Network+ N10-009 Exam Objectives, Version 4.0CompTIA↗
- RFC 4291: IP Version 6 Addressing ArchitectureIETF↗
- RFC 5952: A Recommendation for IPv6 Address Text RepresentationIETF↗
- RFC 4193: Unique Local IPv6 Unicast AddressesIETF↗
- RFC 3849: IPv6 Address Prefix Reserved for DocumentationIETF↗
- RFC 4862: IPv6 Stateless Address AutoconfigurationIETF↗
- RFC 4861: Neighbor Discovery for IP version 6IETF↗
- RFC 8415: Dynamic Host Configuration Protocol for IPv6 (DHCPv6)IETF↗
- RFC 4213: Basic Transition Mechanisms for IPv6 Hosts and RoutersIETF↗
- RFC 6146: Stateful NAT64IETF↗
- RFC 6147: DNS64IETF↗
- IPv6 Address SpaceIANA↗