7 IPv6 Addressing Fundamentals
Learn how IPv6 addresses are structured and written, what their address types and prefixes mean, and how interfaces obtain addresses and network information.
Address structure
IPv6 addresses contain bits, compared with IPv4 addresses, which contain bits. An IPv6 address identifies an interface; and addresses can identify a set of interfaces.
Prefixes and interface identifiers
An IPv6 address is written as eight groups of four hexadecimal digits called hextets. Each represents bits, giving bits in total. For example:
A address is commonly understood as a followed by an . The prefix identifies a network, while the IID identifies an interface within it. The determines where the split occurs. A /64 prefix leaves bits for the IID, although the exact structure depends on the and address use.
Writing and compressing addresses
IPv6 notation permits shorter text forms without changing an address's value. Leading zeros in a may be omitted: 0db8 can become db8, and 0001 can become 1. One consecutive run of all-zero hextets can be replaced by ::. Use :: only once in an address because it represents one or more groups and must be unambiguous.
For the standard compressed form, choose the longest run of zero hextets; if runs are tied, compress the first. The example address can therefore be written as:
A prefix is written as an address followed by / and a decimal . For example, 2001:db8:1234:1::/64 identifies a , while 2001:db8:1234:1::25/64 gives an interface address and its . The same address may have other valid text forms; lowercase hexadecimal and consistent compression make addresses easier to read and compare.
Address types
The three main IPv6 address types describe how an address identifies destinations:
: identifies one interface, and a packet is delivered to that interface. Global and link-local addresses are examples.
: is assigned to multiple interfaces, and a packet is delivered to one of them, typically the one considered nearest according to routing. uses address space, so it cannot be identified from a special text pattern alone.
: identifies a group of interfaces, and a packet is delivered to that group. addresses begin with
ffand fall withinFF00::/8.
IPv6 has no broadcast address. is used for functions that might otherwise rely on broadcast.
Special-purpose addresses
Several IPv6 addresses and prefixes have specific purposes:
::is the unspecified address, used when a node has no usable source address yet.::1is the loopback address and refers to the local device.fe80::/10is the link-local range. Link-local addresses support communication on the same link and are required for normal IPv6 operation on an interface; they are not globally reachable addresses.fc00::/7is the unique local range, intended for private communication within a site or connected sites and not for global Internet routing.2001:db8::/32is reserved for documentation examples, not ordinary public addressing.
Prefix lengths and subnetting
The number after the slash is the count of leftmost prefix bits. IPv6 does not use an IPv4-style dotted-decimal subnet mask. For example, 2001:db8:1234:1::25/64 has a -bit prefix, so its is 2001:db8:1234:1::/64.
A /128 specifies one exact address, while shorter prefixes describe larger blocks. A /64 is the normal subnet size for most IPv6 LANs and is expected by many common address-autoconfiguration mechanisms. Site networks are generally divided by assigning a separate /64 to each LAN, rather than shrinking LAN subnets as is often done in IPv4. Specialized links and address uses can have different prefix lengths.
Interface configuration
An IPv6-capable interface can have more than one address at the same time, such as a link-local address alongside one or more global or unique local addresses. Link-local addresses support communication with neighbors on the same link and are not used as globally reachable addresses.
Common configuration methods include:
: A host learns network prefixes and other information from router advertisements, then forms its own address. Duplicate Address Detection helps check that the address is not already in use.
DHCPv6: A DHCPv6 server can assign addresses and provide other configuration information. DHCPv6 can be used instead of or alongside SLAAC. Routers advertise network information and the default-router role; DHCPv6 does not replace router advertisements for learning the default router.
Manual configuration: An administrator enters an address and , along with any required routing and DNS settings.
In a typical LAN, a router sends that communicate prefixes and guide host configuration. Hosts use the advertised information to configure addresses and determine how to reach destinations outside the local link.