Sub topic 9
IPv6 Addressing Basics
IPv6 is the replacement for IPv4. It uses 128-bit addresses instead of 32-bit ones, which removes the address shortage that led to NAT and private ranges. This chapter assumes you already know IPv4 addressing, subnet masks, default gateways, DHCP and DNS from earlier chapters. It covers address notation, the address types you must recognize for A+ Core 1, and the commands that show IPv6 settings.
Why IPv6 Exists
IPv4 has about 4.3 billion addresses, and they are used up. IPv6 has 2^128 addresses, so every device can have a globally unique address. Three practical differences matter for the exam:
- IPv6 addresses are 128 bits long, written as eight groups of hexadecimal digits.
- IPv6 has no broadcast. It uses multicast and anycast instead.
- A single network interface normally has several IPv6 addresses at once.
Reading an IPv6 Address
An IPv6 address has eight groups, called hextets. Each hextet is four hexadecimal digits (0-9 and a-f), and colons separate the groups. Each hextet is 16 bits, so 8 × 16 = 128 bits.
2001:0db8:0000:0000:0000:ff00:0042:8329Two rules shorten an address:
- Drop leading zeros in any hextet.
0042becomes42, and0000becomes0. - Replace one run of consecutive all-zero hextets with
::.
Applying both rules gives this:
2001:db8::ff00:42:8329You may use :: only once in an address. If you used it twice, you could not tell how many zero groups each one stands for. To expand an address, count the groups that are written. Subtract that count from 8. The :: stands for that many zero hextets.
For example, fe80::1 has two written groups (fe80 and 1), so :: stands for six zero hextets. The full form is fe80:0000:0000:0000:0000:0000:0000:0001.
IPv6 letters are not case sensitive, so FE80::1 and fe80::1 are the same address.
Prefix Length Instead of a Subnet Mask
IPv6 does not use dotted subnet masks. It uses a prefix length written after a slash, as in CIDR notation. The address 2001:db8:abcd:12::5/64 has a 64-bit prefix. The first 64 bits identify the network, and the last 64 bits identify the host (the interface). Most LANs use a /64 prefix.
Address Types
The first bits of an address show its type. The table lists the types you should recognize on sight.
| Type | Prefix | Scope | Purpose |
|---|---|---|---|
| Global unicast | `2000::/3` (starts with 2 or 3) | Internet | Routable public address, similar to a public IPv4 address |
| Link-local | `fe80::/10` | One network segment only | Automatic address used for local communication; never routed |
| Unique local | `fc00::/7` (in practice `fd...`) | Inside an organization | Private address, similar to IPv4 `10.x.x.x` and `192.168.x.x` |
| Multicast | `ff00::/8` | Varies | One sender, a group of receivers |
| Loopback | `::1/128` | The local computer | Equivalent of IPv4 `127.0.0.1` |
| Unspecified | `::/128` | The local computer | "No address yet", used during startup |
The Three Delivery Methods
- Unicast delivers to one specific interface.
- Multicast delivers to every interface that joined a group. It replaces IPv4 broadcast. For example,
ff02::1reaches all nodes on the local link. - Anycast assigns the same address to several devices, and the packet goes to the nearest one. DNS root servers use this approach.
Link-Local Addresses
Every IPv6-enabled interface creates a link-local address on its own, even when no router or DHCP server exists. It begins with fe80. Link-local addresses work only on the local segment, and routers do not forward them. A link-local address is the IPv6 counterpart to IPv4 APIPA (169.254.x.x), but the difference matters: an IPv6 host always has a link-local address, even on a healthy network. Seeing one is normal. In IPv4, seeing an APIPA address signals a DHCP failure.
When you ping a link-local address, Windows needs to know which adapter to use. You add a zone ID after a percent sign, such as fe80::1%12. The number is the interface index.
How a Device Gets an IPv6 Address
There are two main methods.
- SLAAC (Stateless Address Autoconfiguration). The router advertises the network prefix. The host adds its own 64-bit interface identifier to that prefix. No server tracks the lease, which is why it is called stateless. Modern operating systems usually generate a random interface identifier. Some older methods derived it from the network card's MAC address, which exposed the hardware address.
- DHCPv6. A DHCP server hands out addresses and options, as DHCP does for IPv4. It is called stateful when it assigns the address. It can also supply only extra settings such as DNS servers.
The default gateway for IPv6 is learned from router advertisements. On Windows, the gateway is often shown as the router's link-local address, which starts with fe80. This is normal.
IPv6 and DNS
DNS uses AAAA records (pronounced "quad-A") to map a name to an IPv6 address. IPv4 uses A records. A name can have both. A client with both address families chooses between them based on its configuration and what works.
Running IPv4 and IPv6 Together
Most networks run both protocols at once. This setup is called dual stack. Other transition methods exist, including tunneling, which carries IPv6 packets inside IPv4 packets. For the exam, know that dual stack is the most common approach and that the two protocols are independent. A network can have a working IPv4 setup and a broken IPv6 setup, and the reverse is also possible.
Viewing IPv6 Settings in Windows
The same ipconfig /all command from earlier chapters shows IPv6 information.
ipconfig /allLook for these lines in the output:
IPv6 Address: the global address, often with(Preferred)after it.Temporary IPv6 Address: a privacy address that changes over time.Link-local IPv6 Address: thefe80::address.Default Gateway: may list both an IPv6 and an IPv4 gateway.DNS Servers: may list IPv6 servers.
You can also force a ping to use IPv6 and test the local stack:
ping -6 ::1
ping -6 example.comOn Windows, ping6 is not a separate command. Use ping -6. On Linux and macOS, the older ping6 command may exist.
Common Errors and Gotchas
- Using
::twice. An address such as2001::db8::1is invalid. - Confusing link-local with APIPA. A link-local address alone does not mean something is broken. It means the host has no global address. If a host has only a link-local address and no IPv4 address, it cannot reach the internet. If it also has a valid IPv4 address, IPv4 traffic may still work.
- Expecting NAT. IPv6 does not require NAT, because addresses are plentiful. A global address is directly reachable from the internet, so a firewall must protect it. Do not assume that "no NAT" means "no protection".
- Forgetting the brackets in URLs. A web address with a literal IPv6 address uses square brackets, such as
http://[2001:db8::10]:8080/. The brackets keep the port colon from being confused with the address colons. - Reading the prefix as a mask. A /64 is a prefix length, not a dotted mask. There is no
255.255.255.0equivalent.
Quick Comparison With IPv4
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address length | 32 bits | 128 bits |
| Notation | Dotted decimal | Hexadecimal with colons |
| Broadcast | Yes | No (multicast instead) |
| Automatic local address | APIPA, 169.254.0.0/16 | Link-local, fe80::/10 |
| Loopback | 127.0.0.1 | ::1 |
| Private addresses | 10/8, 172.16/12, 192.168/16 | fc00::/7 (fd...) |
| DNS record | A | AAAA |
| Configuration | DHCP or static | SLAAC, DHCPv6 or static |
Practice
Exercise
Shorten the address 2001:0db8:0000:0000:0000:0000:0000:0001 as far as the rules allow.
Show answer
2001:db8::1. Leading zeros are dropped from each hextet, and the run of five all-zero hextets is replaced by a single ::.
Exercise
A technician sees that a Windows computer has the address fe80::4a2b:11ff:fe9c:73d1 and no other IPv6 address. What type of address is this, and what does it tell you?
Show answer
It is a link-local address. The computer created it automatically and can talk only to devices on the same segment. It has no global IPv6 address, so it has not received a router advertisement or a DHCPv6 lease.
Exercise
Which IPv6 address is the equivalent of the IPv4 loopback address 127.0.0.1, and which command tests it on Windows?
Show answer
::1 is the loopback address. Run ping -6 ::1 to test it.