21 IPv6 Addressing
IPv6 exists to solve IPv4 address exhaustion and modernize IP without changing its core purpose: end-to-end layer-3 addressing and packet delivery. It expands addresses from 32 to 128 bits, yielding an effectively inexhaustible space, while maintaining familiar concepts like prefixes and routing. Although IPv4 remains prevalent, IPv6 adoption continues to rise, and engineers must be fluent in both. IPv6 uses hexadecimal notation, is grouped into eight 16-bit hextets, and typically employs /64 prefixes for simplicity.
The chapter reviews hexadecimal fundamentals and shows how IPv6 addresses are written and abbreviated by removing leading zeros and compressing contiguous zero hextets with a double colon (used once), with helpful conventions from RFC 5952. It outlines the IPv6 header at a high level (fixed 40 bytes, Traffic Class/Flow Label, Next Header, Hop Limit, and 128-bit source/destination) and explains identifying prefixes, which is straightforward for /64 networks. On Cisco IOS, enabling ipv6 unicast-routing is required, and interfaces are addressed with ipv6 address address/prefix-length; IPv6 allows multiple addresses per interface and auto-creates a link-local address. Modified EUI-64 can build the 64-bit interface ID from a MAC by splitting it, inserting fffe, and flipping the seventh bit, providing deterministic host portions for both global and link-local addresses.
IPv6 address types include global unicast (public, typically allocated as a /48 global routing prefix with /64 subnets), unique local (fd00::/8, private, with a randomly generated 40-bit global ID to minimize overlap), link-local (fe80::/64, required on each interface and limited to the local segment), multicast (ff00::/8 with scopes such as ff02 for link-local; no broadcast exists, so ff02::1 serves “all nodes”), and anycast (a unicast address configured on multiple nodes, delivered to the nearest instance and widely used by Internet services). The chapter also notes special addresses: the unspecified :: (often seen in routes like ::/0) and the loopback ::1 for local testing.
The five RIRs. AFRINIC serves Africa. APNIC serves the Asia-Pacific region. ARIN serves Canada, the United States, parts of the Caribbean, and Antarctica. LACNIC serves most of the Caribbean and all of Latin America. RIPE NCC serves Europe, West Asia, Central Asia, and Russia.
The format of the IPv6 header. The fields are Version, Traffic Class, Flow Label, Payload Length, Next Header, Hop Limit, Source Address, and Destination Address. The header is 40 bytes in size.
An IPv6 address written in hexadecimal and binary. The prefix length is /64, meaning that the first half (64 bits) of the address is the network portion, and the second half (64 bits) is the host portion.
A router with three connected IPv6 networks. ipv6 unicast-routing allows the router to forward IPv6 packets. ipv6 address configures an IPv6 address on each interface. Modified EUI-64 is used to automatically generate the host portion of G0/2’s IPv6 address.
Generating a 64-bit interface identifier using Modified EUI-64. 1) Divide the MAC address in half and 2) insert “fffe” in the middle to make it 64 bits. Then, 3) invert the seventh bit—the third bit of the second hex digit.
IPv6 address types: global unicast, unique local, link-local, multicast, and anycast.
The structure of an IPv6 global unicast address. The first 48 bits are the global routing prefix, assigned to the enterprise by the ISP. The next 16 bits are the subnet identifier, which the enterprise can use to make various subnets. The remaining 64 bits are the interface identifier—the host portion of the address.
The structure of an IPv6 unique local address. After the prefix “fd”, there is a 40-bit global ID, which should be randomly generated. The following 16 bits are the subnet identifier, and the remaining 64 bits are the interface identifier.
Link-local addresses can only be used for communication between hosts connected to the same link (segment). R1–R2 and R2–R3 communication can be sourced from/destined for each other’s LLA, but R1–R3 communication cannot.
IPv6 multicast scopes from the perspective of PC1. Link-local multicast remains within the local link. Site-local multicast may be forwarded within the local site. Organization-local multicast may be forwarded within the organization. Global multicast has no boundaries, and may be forwarded over the Internet.
Different routing/addressing methodologies. Unicast is one-to-one, broadcast is one-to-all, multicast is one-to-multiple, and anycast is one-to-one-of-multiple.
Summary
- IPv4 address exhaustion—running out of IPv4 addresses—is a major problem in our era of unprecedented connectivity; IPv6 is the long-term solution.
- IPv4 addresses are 32 bits in length, providing 232 (over 4 billion) addresses, but IPv6 addresses are 128 bits in length, providing 2128 (over 340 undecillion) addresses.
- To convert a binary number to hexadecimal: 1) split the number into four-bit groups, 2) convert each four-bit group to decimal, 3) convert each decimal number to hexadecimal.
- To convert a hexadecimal number to binary: 1) split up the hexadecimal digits, 2) convert each hexadecimal digit to decimal, 3) convert each decimal digit to binary.
- The IPv6 header is 40 bits in length and consists of eight fields: Version, Traffic Class, Flow Label, Payload Length, Next Header, Hop Limit, Source, Destination.
- IPv6 addresses are divided into eight groups of 16 bits (usually called hextets) and written in hexadecimal, with a colon between each group.
- For simplicity, IPv6 addresses typically use /64 prefix lengths—the first 64 bits are the network portion, and the last 64 bits are the host portion.
- IPv6 addresses can be abbreviated by removing leading zeros from each hextet, and by abbreviating two or more consecutive all-zero hextets with a double colon (::).
- A network prefix is a combination of a network address and prefix length. If a host has IPv4 address 192.168.1.10/24, the prefix is 192.168.1.0/24. If a host has IPv6 address 2001:db8:1:2:a:b:c:d/64, the prefix is 2001:db8:1:2::/64.
- Many IPv6 configuration and verification commands are similar to IPv4 equivalents: ipv6 address, ipv6 route, show ipv6 interface brief, show ipv6 route.
- When configuring IPv6 on a Cisco router, you should first enable IPv6 routing with the ipv6 unicast-routing command. IPv6 routing is not enabled by default.
- You can manually assign an IPv6 address to an interface with ipv6 address address/prefix-length. Unlike IPv4, IPv6 prefix lengths are configured with slash notation, not dotted-decimal netmasks.
- Even if you configure a full (or partially-abbreviated) IPv6 address, IOS will display the fully-abbreviated address in the output of show commands.
- If you configure an IPv4 address on an interface that already has an IPv4 address, the new address will overwrite the old one. If you do the same in IPv6, the new address will not overwrite the old one; the interface will have multiple addresses.
- Modified Extended Unique Identifier 64 (Modified EUI-64) is a method of automatically generating a 64-bit interface identifier (host portion of the address) by adding 16 bits (0xfffe) to the interface’s 48-bit MAC address.
- Use ipv6 address prefix eui-64 to configure an IPv6 with Modified EUI-64.
- To convert a MAC address to a Modified EUI-64 interface ID: 1) divide the MAC address in half, 2) insert “fffe” in the middle, 3) invert the seventh bit.
- IPv6 global unicast addresses are globally unique addresses used for communication over the public Internet. The global unicast range was originally defined as 2000::/3, but now includes any address not specifically reserved for other purposes.
- Global unicast addresses consist of a 48-bit global routing prefix (assigned by an RIR or ISP), a 16-bit subnet identifier (used to make subnets), and a 64-bit interface identifier (the host portion of the address).
- The IPv4 equivalent of a global unicast address is a public IPv4 address. Public IPv4 addresses include all addresses that are not part of the reserved private or other special-purpose ranges.
- IPv6 unique local addresses (ULAs) are private addresses; they do not have to be globally unique, and enterprises are free to use them in their internal networks. However, they cannot be used for communication over the Internet.
- The ULA range is defined as fc00::/7, but is divided into two /8 ranges: fc00::/8 (reserved), and fd00:/8 (the active ranges for ULAs).
- After the “fd” prefix, a ULA has a 40-bit global ID which should be randomly generated to avoid overlap with other enterprises. The next 16 bits are the subnet identifier, and the last 64 bits are the interface identifier.
- ULAs are equivalent to IPv4 private addresses, in the ranges 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16.
- IPv6 link-local addresses (LLAs) are automatically generated on IPv6-enabled interfaces using Modified EUI-64. The LLA range is fe80::/10, but the following 54 bits should be set to 0, resulting in the fe80::/64 prefix.
- The IPv4 equivalent is the 169.254.0.0/16 range. IPv6-enabled interfaces require an IPv6 LLA, but IPv4-enabled interfaces don’t require an IPv4 LLA.
- You can enable IPv6 on an interface without configuring an IPv6 address with ipv6 enable. In that case, the interface will have only the automatically generated LLA.
- You can manually configure an interface’s LLA with ipv6 address address link-local.
- LLAs can only be used for communication with devices on the same segment.
- IPv6 multicast addresses are from the ff00::/8 range. They are used to provide communication from one host to multiple others. The IPv4 equivalent is the class D range (224.0.0.0–239.255.255.255).
- Several scopes define how far the multicast packets should travel: interface-local (ff01), link-local (ff02), site-local (ff05), organization-local (ff08), global (ff0e).
- Some common link-local IPv6 and IPv4 multicast addresses: all nodes (ff02::1, 224.0.0.1), all routers (ff02::2, 224.0.0.2), all OSPF routers (ff02::5, 224.0.0.5), all OSPF DRs/BDRs (ff02::6, 224.0.0.6), all RIP routers (ff02::9, 224.0.0.9), all EIGRP routers (ff02::a, 224.0.0.10).
- Unicast communication is one-to-one, broadcast is one-to-all, multicast is one-to-multiple, and anycast is one-to-one-of-multiple.
- An anycast address is a unicast address configured on multiple hosts. Packets destined for the address will be delivered to the closest host with the address, as determined by routers’ routing decisions.
- You can specify an IPv6 address as anycast with the ipv6 address address/prefix-length anycast command.
- The unspecified IPv6 address is all zeros, usually written as “::”. It is used in default routes, or when the device doesn’t know its IPv6 address yet. The IPv4 equivalent is 0.0.0.0.
- The loopback IPv6 address is ::1. Messages sent to this address are “looped back” to the local device, without being sent out of an interface. This can be used for testing the device’s network software. The IPv4 equivalent is the 127.0.0.0/8 range.
FAQ
Why was IPv6 created, and what problem does it solve?
IPv6 was created to address IPv4 address exhaustion. IPv4 has a 32-bit space (~4.3 billion addresses), many of which are reserved or inefficiently used. Despite measures like CIDR, private IPv4 addressing, and NAT, the pool has been depleted at Regional Internet Registries. IPv6 uses 128-bit addresses (2^128), providing an enormous address space to support current and future Internet growth.How are IPv6 addresses written and structured?
IPv6 addresses are 128-bit numbers written in hexadecimal as eight groups (hextets) of 16 bits separated by colons (for example, 2001:db8:1234:5678:9abc:def0:1234:5678). A typical host address is shown with a prefix length (for example, /64), where the first 64 bits are the network portion and the last 64 bits are the interface identifier (host portion).How do you abbreviate IPv6 addresses correctly?
- Remove leading zeros within any hextet (00a3 becomes a3).- Replace one contiguous sequence of all-zero hextets with a double colon (::). This can be used only once in an address.
- RFC 5952 guidelines: use lowercase a–f; use :: to shorten the longest run of zero hextets (if tied, compress the leftmost); do not use :: to compress a single all-zero hextet; remove all leading zeros everywhere.
What is an IPv6 prefix and what length is most common?
An IPv6 prefix is the network portion of an address combined with its prefix length (for example, 2001:db8:1:2::/64). In practice, /64 is the standard prefix length for subnets. To find the /64 prefix from a host address, zero the last four hextets (the host portion) and keep the /64.How do you configure IPv6 on Cisco routers, and what must you not forget?
- Enable IPv6 routing globally: ipv6 unicast-routing (required; IPv6 routing is not on by default).- Assign addresses on interfaces: ipv6 address ADDRESS/PREFIX (for example, ipv6 address 2001:db8::1/64).
- Verification examples: show ipv6 interface brief, show ipv6 interface.
- Differences vs IPv4: IPv6 addresses on an interface are additive (do not overwrite each other); remove with no ipv6 address ...; a link-local address is auto-generated when IPv6 is enabled/addressed.
What is Modified EUI-64 and how is an interface ID derived from a MAC address?
Modified EUI-64 automatically builds a 64-bit interface identifier (host portion) from a 48-bit MAC:1) Split the MAC into two halves.
2) Insert fffe in the middle to reach 64 bits.
3) Invert the 7th bit (the Universal/Local bit; the third bit of the second hex digit).
Use it with: ipv6 address PREFIX/64 eui-64. Many devices also use Modified EUI-64 to auto-generate link-local addresses.
What are the main IPv6 address types and their typical ranges?
- Global unicast: Internet-routable; originally 2000::/3 (and, broadly, anything not otherwise reserved). Often assigned as a /48 to organizations, with /64 subnets.- Unique local (ULA): Private, not Internet-routable; fc00::/7 (operationally fd00::/8). Structure: fd + 40-bit random global ID + 16-bit subnet ID + 64-bit interface ID.
- Link-local: Local-segment only; effectively fe80::/64 (fe80::/10 with the next 54 bits zeroed).
- Multicast: ff00::/8 with scopes (for example, ff02 is link-local multicast).
- Anycast: Operational concept (no special range); a unicast address assigned to multiple nodes; traffic is delivered to the nearest instance.
What are IPv6 link-local addresses (LLAs) used for and how are they configured?
LLAs identify interfaces for communication on the local link (same L2 segment) only; they are not routed. They use fe80::/64 and are typically auto-generated (often using Modified EUI-64). Each IPv6-enabled interface must have exactly one LLA. You can configure it manually with ipv6 address fe80::X link-local or enable only an LLA on an interface with ipv6 enable.How does IPv6 use multicast, and what are common link-local multicast groups?
IPv6 multicast uses ff00::/8 with scopes (for example, ff01 interface-local, ff02 link-local, ff05 site-local, ff08 organization-local, ff0e global). Common link-local groups include:- ff02::1 (all nodes)
- ff02::2 (all routers)
- ff02::5 (all OSPF routers)
- ff02::6 (all OSPF DR/BDR)
- ff02::9 (all RIP routers)
- ff02::a (all EIGRP routers)
IPv6 has no broadcast; the “all nodes” multicast (ff02::1) serves that role on a link. View joined groups with show ipv6 interface.
What are the unspecified and loopback IPv6 addresses and when are they used?
- Unspecified: :: (all zeros). Used as a source before a node knows its address; also appears as the destination prefix in default routes (::/0). IPv4 analog is 0.0.0.0.- Loopback: ::1. Traffic to this address is returned to the local stack and never leaves the device. IPv4 analog is 127.0.0.0/8 (commonly 127.0.0.1).
Acing the CCNA Exam, Volume 1 ebook for free