IPv6 Addressing and Format
IPv4 was never designed for billions of always-on devices, and NAT only postponed the problem. IPv6 solves it with a 128-bit address written as eight groups of four hexadecimal digits. Read this lesson slowly — the compression rules are pure marks on the exam, and getting them wrong is the fastest way to lose an address question.
Why IPv6?
IPv4 provides about 4.3 billion addresses (232). That seemed endless in 1981, when networked computers were rare. It is not. The explosion of PCs, smartphones, tablets, servers, sensors, and cloud instances consumed the free pool; IANA handed out its last IPv4 blocks in 2011. The address registries and carriers have been running on reclaimed and recycled space ever since.
The industry stretched IPv4 with two big hacks. NAT (network address translation) lets thousands of private hosts share one public address by rewriting source ports, which is why a whole home can appear as one IP on the Internet. CIDR (classless addressing) made allocation more efficient than the old classful scheme. Both helped, but neither gives the Internet the thing it actually needs: an end-to-end, globally unique address for every interface.
IPv6 is not just “IPv4 with bigger numbers”. It removes the header checksum, drops in-router fragmentation, adds built-in support for address autoconfiguration (SLAAC, Lesson 16), and makes a link-local address mandatory on every interface. Those changes make routing faster and host configuration simpler. For CCNA you focus on the addressing and the control protocols, but knowing why the format looks the way it does makes both easy to remember.
IPv4
32 bits — about 4.3 billion addresses. Address exhaustion forced NAT and CIDR onto the network.
IPv6
128 bits — about 3.4 × 1038 addresses. End-to-end addressing returns, and NAT becomes unnecessary.
Written as
Eight hextets of four hexadecimal digits, separated by colons: 2001:db8::1.
The 128-bit address and hextets
A bit holds one 0 or 1. IPv4 has 32 bits, so it has 232 values. IPv6 has 128 bits, so it has 2128 values. Writing 128 ones and zeros by hand is unusable, so the address is grouped in hextets (also called fields or groups): each hextet is 16 bits shown as four hexadecimal digits. Eight hextets × 16 bits = 128 bits. Hexadecimal uses 0–9 and A–F, where A = 10 and F = 15.
The same address written in full is 2001:0db8:0000:0000:0000:ff00:0042:8329. The boundary between the network prefix and the interface identifier is set by the prefix length, not by a fixed split.
A few formatting facts to lock in:
- Hex digits are not case-sensitive:
2001:DB8equals2001:0db8. Cisco IOS prints lowercase. - The colons are the only separators. There are always eight hextets in the full form.
- Each hextet is exactly four hex digits in the full form — zero-padded on the left.
- The address has no subnet mask field; the boundary is written as a prefix length after a slash, e.g.
/64.
The two compression rules
Even four digits per group is a lot to type. RFC 4291 defines two ways to shorten an address. You may apply both at once, but each has a strict limit that the exam loves to test.
Within any hextet, remove the leading zeros.
0db8 becomes db8, 0042 becomes 42, and 0000 becomes 0. Trailing zeros are never removed: ff00 stays ff00, not ff.::.A single consecutive run of all-zero hextets may be replaced by a double colon. The double colon may appear only once in an address, because two occurrences would make the address ambiguous — the reader could not tell how many zero hextets belong in each gap.
Work through the example above. Start with the full address:
2001:0db8:0000:0000:0000:ff00:0042:8329 ! apply rule 1: strip leading zeros from each hextet 2001:db8:0:0:0:ff00:42:8329 ! apply rule 2: replace the run of zero hextets with :: 2001:db8::ff00:42:8329
Notice that ff00 keeps its trailing zeros — only leading zeros vanish. Notice also that the run 0:0:0 became a single ::. This compressed form is what you will see in every show command output.
:: may be used once only. An answer containing two double colons is always wrong. (2) Leading zeros are dropped, but trailing zeros are kept: 2001:0db8::0042 must become 2001:db8::42 — and ff00 is never shortened to ff.Expanding an address back
The reverse operation is equally likely to appear: given a compressed address, write the full form. Count the hextets you can see, then pad the :: with enough zero hextets to reach a total of eight. Finally, left-pad each hextet back to four digits.
| Step | Result | Why |
|---|---|---|
| Visible hextets | 2001, db8, 1 | Three shown; the :: hides the rest. |
| Count needed | 8 − 3 = 5 | Five zero hextets replace the ::. |
| Substituted | 2001:db8:0:0:0:0:0:1 | Five zeros inserted. |
| Fully padded | 2001:0db8:0000:0000:0000:0000:0000:0001 | Each hextet left-padded to four digits. |
If no :: is present, you simply left-pad each hextet and you are done. If there is a ::, the number of hidden hextets is always at least one — a :: that replaces zero hextets is invalid — and you solve for the remainder by subtraction. Practice until this is automatic.
Prefix length and the two halves
IPv6 has no dotted-decimal subnet mask. The network portion is expressed as a prefix length — a slash and a number of network bits, exactly like CIDR in IPv4. A /64 means the first 64 bits (the first four hextets) are the network, and the last 64 bits (the last four hextets) are the interface identifier.
| Prefix | Network bits | Common meaning |
|---|---|---|
/32 | 2 hextets | Typical allocation to a large ISP from a registry (see Lesson 15). |
/48 | 3 hextets | Typical allocation to one customer site or enterprise. |
/64 | 4 hextets | The standard LAN prefix; one per subnet. SLAAC requires /64. |
/128 | all 128 bits | A single host address (equivalent to IPv4 /32). |
In a /64, an ISP that has a /48 can carve out 65,536 individual LANs, each enormous enough to number every device a site will ever own. This abundance is the whole point of IPv6: there is no reason to be stingy, so hosts get globally unique addresses and NAT disappears from the design.
IPv6 compared with IPv4
Two rows in the comparison deserve a second look. First, IPv6 has no broadcast. Where IPv4 used a network broadcast to reach everyone, IPv6 uses well-known multicast groups such as the all-nodes address ff02::1 (Lesson 14). Second, removing the header checksum is not carelessness: the link layer and the transport layer already detect errors, so re-checking every hop wasted cycles. Dropping it lets routers process packets faster.
| Property | IPv4 | IPv6 |
|---|---|---|
| Address size | 32 bits | 128 bits |
| Notation | Four dotted-decimal octets, e.g. 192.0.2.1 | Eight hex hextets, e.g. 2001:db8::1 |
| Header size | 20 bytes minimum | 40 bytes fixed |
| Header checksum | Yes | No (removed) |
| Subnet mask | Dotted decimal or CIDR | Prefix length only (e.g. /64) |
| Broadcast | Yes | No — uses multicast instead |
| Address config | Manual or DHCP | Manual, SLAAC, or DHCPv6 |
| NAT | Commonly required | Not needed for address conservation |
| Minimum MTU | 576 bytes | 1280 bytes |
Review
Check what you have learned with these review questions.
Sources & references
- Hinden, R. & Deering, S. RFC 4291: IP Version 6 Addressing Architecture (2006) — hextet notation, compression rules, address types. rfc-editor.org/rfc/rfc4291.
- Deering, S. & Hinden, R. RFC 8200: Internet Protocol, Version 6 (IPv6) Specification (2017) — 128-bit address and fixed 40-byte header. rfc-editor.org/rfc/rfc8200.
- Kawamura, S. & Kawashima, M. RFC 5952: A Recommendation for IPv6 Address Text Representation (2010) — canonical lowercase and compression. rfc-editor.org/rfc/rfc5952.
- IANA. IPv6 Address Space registry. iana.org.
- Cisco. CCNA (200-301) Exam Topics, Network Fundamentals — compare and contrast IPv4 and IPv6 addressing. cisco.com.
Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.