IPv6 Address Format and Notation
Learn how IPv6 addresses are structured, written, shortened, expanded, validated, and interpreted, including prefixes, scopes, and common address types.
IPv6 is Internet Protocol version 6. It provides the addressing system used to identify interfaces and deliver IP packets. This lesson explains the IPv6 address format, hexadecimal notation, shortening and expansion rules, prefix lengths, address categories, and practical Cisco IOS use.
Why IPv6 Uses a New Address Format
IPv4 addresses contain 32 bits. IPv4 commonly writes those bits as four decimal octets, such as 192.0.2.10. The IPv4 address space is limited, and the growth of the Internet, mobile devices, cloud services, and connected equipment contributed to IPv4 address exhaustion.
IPv6 uses 128-bit addresses, providing a vastly larger address space. IPv6 addresses are written in hexadecimal rather than IPv4 dotted-decimal notation.
| Characteristic | IPv4 | IPv6 |
|---|---|---|
| Address size in bits | 32 bits | 128 bits |
| Number system | Decimal | Hexadecimal |
| Typical written format | 192.0.2.10 | 2001:db8::10 |
| Group separator | Period (.) | Colon (:) |
| Address-space scale | About 4.3 billion addresses | 2128 possible addresses |
| Broadcast behavior | Supports broadcast | No broadcast; multicast is used instead |
IPv6 Address Structure
An IPv6 address always contains 128 bits. Its normal expanded representation divides those bits into eight groups of 16 bits. Each 16-bit group is called a hextet.
A hextet is written using one to four hexadecimal characters. Hexadecimal is base 16 and uses the characters 0 through 9 and A through F. Uppercase and lowercase letters have the same value, so DB8 and db8 are equivalent.
Colons separate the eight hextets:
2001:0DB8:0000:0000:0000:FF00:0042:8329
| | | | | | | |
16 16 16 16 16 16 16 16 bits
Eight hextets multiplied by 16 bits equals 128 bits. A fully expanded address contains eight groups and 32 hexadecimal digits, not counting the seven colon separators.
Full IPv6 Notation
Full, or expanded, notation shows every hextet with four hexadecimal digits. Leading zeros are retained in this form.
2001:0DB8:0000:0000:0000:FF00:0042:8329
To verify the structure, count the groups separated by colons. There must be eight groups. Then count the hexadecimal digits: eight groups multiplied by four digits equals 32 hexadecimal digits.
IPv6 Shortening Rules
IPv6 has two different shortening techniques. Leading-zero suppression removes zeros at the beginning of an individual hextet. Zero compression replaces a sequence of complete zero hextets with a double colon.
Leading-Zero Suppression
Remove only zeros at the left side of each hextet. Do not remove zeros in the middle or at the right side.
2001:0DB8:0000:0001:0000:0000:0000:0001
2001:DB8:0:1:0:0:0:1
For example, 0042 becomes 42, and 0000 becomes 0. A hextet must still contain one character when it represents zero.
Zero Compression with a Double Colon
A double colon, written as ::, replaces one or more consecutive all-zero hextets. It can be used only once in an IPv6 address because the omitted number of zero hextets must be unambiguous.
2001:0DB8:0000:0000:0000:FF00:0042:8329
2001:DB8::FF00:42:8329
The :: in this example replaces three consecutive zero hextets. The longest consecutive run of all-zero hextets should normally be compressed. If two runs have the same length, the usual convention is to compress the leftmost run.
| Rule | Valid Example | Result | Restriction or Reminder |
|---|---|---|---|
| Remove leading zeros | 0DB8:0042 | DB8:42 | Remove zeros only at the beginning of each hextet. |
| Compress all-zero hextets | 2001:DB8:0:0:0:FF00:42:8329 | 2001:DB8::FF00:42:8329 | The double colon replaces complete zero hextets. |
| Use one double colon | 2001:DB8:0:0:1:0:0:2 | 2001:DB8::1:0:0:2 | Use :: only once; choose the longest run. |
| Expand a compressed address | 2001:DB8::7 | 2001:0DB8:0000:0000:0000:0000:0000:0007 | Restore enough zero hextets to reach exactly eight groups. |
Expanding Abbreviated IPv6 Addresses
- Separate the address at the double colon, if one exists.
- Restore leading zeros in every visible hextet until each has four hexadecimal digits.
- Count the visible hextets.
- Calculate the missing zero hextets as
8 - visible hextets. - Replace
::with that many0000groups. - Confirm that the final result has exactly eight hextets.
For 2001:DB8::7, there are three visible hextets: 2001, DB8, and 7. Therefore, the double colon represents five zero hextets.
2001:DB8::7
2001:0DB8:0000:0000:0000:0000:0000:0007
A double colon can appear at the beginning, middle, or end:
::1
0000:0000:0000:0000:0000:0000:0000:0001
2001:DB8::7
2001:0DB8:0000:0000:0000:0000:0000:0007
2001:DB8:10:20::
2001:0DB8:0010:0020:0000:0000:0000:0000
When :: is at the beginning or end, it still represents enough complete zero hextets to make eight groups.
IPv6 Prefix Length and the Network Boundary
IPv6 uses CIDR-style prefix notation. A slash followed by a number identifies the number of leftmost bits used for the network prefix, for example 2001:DB8:1234:10::25/64.
Valid IPv6 prefix lengths range from /0 through /128. The prefix identifies the network portion, while the remaining bits identify the interface portion.
The common LAN prefix is /64. It uses the first 64 bits, or four hextets, as the network prefix and leaves the lower 64 bits for the interface identifier.
2001:DB8:1234:10::25/64
|----------- 64-bit network prefix -----------| |-- 64-bit interface identifier --|
IPv6 does not use a dotted-decimal subnet mask such as 255.255.255.0. Interpret the slash value directly as a number of leading bits.
Common IPv6 Address Categories
IPv6 delivery types include unicast, multicast, and anycast. Unicast identifies one interface. Multicast delivers traffic to multiple members of a group. Anycast uses one address on multiple interfaces, with routing delivering traffic to the nearest suitable instance.
| Address Type | Typical Prefix or Range | Scope | Primary Use |
|---|---|---|---|
| Global unicast | Commonly 2000::/3 | Global | Publicly routable IPv6 communication. |
| Link-local unicast | FE80::/10 | Local link | Neighbor Discovery, router communication, and other local-link control traffic. |
| Unique local | FC00::/7, commonly FD00::/8 | Private organization | Internal addressing that is not intended for Internet routing. |
| Multicast | FF00::/8 | Defined by multicast scope | One-to-many delivery; IPv6 has no broadcast. |
| Unspecified | ::/128, written :: | None | Indicates no address, such as before a host selects a source address. |
| Loopback | ::1/128 | Local host | Traffic sent to the local IPv6 stack. |
| Documentation prefix | 2001:DB8::/32 | Examples and documentation | Safe example addresses; not intended for production routing. |
Unicast, Multicast, and Anycast
Global unicast addresses are intended for routing across interconnected networks and the public Internet. Addresses in the documentation range 2001:DB8::/32 are used in examples rather than real public deployments.
Link-local unicast addresses are generally formed from FE80::/10. Every IPv6-enabled interface requires a link-local address. These addresses support local control-plane communication, including Neighbor Discovery, and are not routed beyond the local Layer 2 segment.
Unique local addresses provide private internal addressing. They are commonly selected from FD00::/8 and should not be treated as automatically Internet-routable.
Multicast addresses begin with FF. IPv6 does not use broadcast. Multicast groups provide targeted one-to-many delivery instead.
Anycast uses a unicast-format address assigned to multiple interfaces. Routing selects one destination, normally the nearest or best instance according to the routing system.
Special and Reserved IPv6 Addresses
- Unspecified:
::, meaning all 128 bits are zero. It cannot identify a normal destination. - Loopback:
::1, used by a host to address itself. - IPv4-mapped:
::ffff:192.0.2.128is a conceptual notation used by software to represent an IPv4 address in an IPv6-shaped value. The final 32 bits are shown in dotted-decimal form. - Default route:
::/0matches every IPv6 address when no more-specific route exists. - Solicited-node multicast: addresses follow the pattern
FF02::1:FFXX:XXXX, whereXX:XXXXrepresents the lower 24 bits of a unicast or anycast address. Neighbor Discovery uses this multicast concept to resolve a target's link-layer address.
Link-Local Scope and Interface Use
Link-local addresses are valid only on their attached local link. The same link-local value can exist on different interfaces, so a host or management system with multiple interfaces may need an interface or zone identifier to identify the outgoing link.
FE80::1%eth0
The exact zone syntax depends on the operating system or tool. On Cisco IOS, a link-local next hop is commonly associated with an interface in the command context. The important point is that an address alone may not identify the link when the address has link scope.
Address format is separate from address assignment. A device can receive an address through SLAAC, which uses router advertisements; through DHCPv6; or through static configuration. These methods determine how an address is assigned, while the hexadecimal format and prefix length determine how it is written and interpreted.
IPv6 Address Validation and Interpretation
Use the following process to determine whether an IPv6 address is syntactically valid:
- Check that every character is a hexadecimal digit:
0-9orA-F, ignoring letter case. - Check that each visible hextet contains one to four hexadecimal characters.
- Check the use of colons. A fully expanded address has eight hextets and seven single-colon separators.
- If
::appears, verify that it appears exactly once and represents at least one omitted zero hextet. - Expand the address and confirm that it contains exactly eight hextets.
- If a prefix length is included, verify that it is a number from
/0through/128.
Two double-colon sequences, such as 2001:DB8::1::2, are invalid because the address does not reveal how many zero groups each sequence represents. A five-character hextet such as 00000 is invalid because a hextet is limited to 16 bits, or four hexadecimal digits.
| Check | Valid Condition | Common Error |
|---|---|---|
| Hexadecimal characters | Only 0-9 and A-F appear. | Using characters such as G or Z. |
| Hextet size | Each visible group contains one to four hexadecimal digits. | A group contains five digits. |
| Total hextet count after expansion | Exactly eight groups exist. | Too few or too many groups after interpreting ::. |
| Double-colon usage | At most one :: appears. | Using multiple compression points. |
| Prefix-length range | The length is from /0 through /128. | Using an IPv4-style mask or a value above 128. |
Recognizing Types from Leading Prefixes
2001:DB8:100::10: documentation-format global-unicast example.FE80::1: link-local unicast.FD12:3456:789A::1: unique local.FF02::1: multicast.::1: loopback.::: unspecified.
Practical Notation Examples
Reading a Fully Expanded Address
2001:0DB8:0000:0000:0000:FF00:0042:8329
This address has eight hextets, each containing four hexadecimal digits. It therefore contains 32 hexadecimal digits and 128 bits.
Applying Both Shortening Rules
Expanded: 2001:0DB8:0000:0000:0000:FF00:0042:8329
Suppress zeros: 2001:DB8:0:0:0:FF00:42:8329
Compress run: 2001:DB8::FF00:42:8329
The first transformation changes individual hextets. The second replaces the longest run of three all-zero hextets with one double colon.
Interpreting a /64 Address
2001:DB8:1234:10::25/64
The first four hextets, 2001:DB8:1234:10, form the 64-bit network prefix. The remaining 64 bits form the interface identifier.
Cisco IOS IPv6 Configuration and Verification
On a Cisco IOS router, IPv6 forwarding must be enabled before the router forwards IPv6 packets between interfaces.
configure terminal
ipv6 unicast-routing
Assign a global-unicast address to an interface and enable the interface:
interface gigabitEthernet 0/0
ipv6 address 2001:DB8:1234:10::1/64
no shutdown
A manually selected link-local address can be configured separately:
interface gigabitEthernet 0/0
ipv6 address FE80::1 link-local
Useful verification commands include:
show ipv6 interface brief
show ipv6 interface gigabitEthernet 0/0
show ipv6 route
ping ipv6 2001:DB8:1234:10::2
Troubleshooting IPv6 Notation and Scope
Two Double-Colon Sequences
Problem: 2001:DB8::1::2 contains two compression sequences.
Diagnosis: The address cannot be expanded unambiguously because both sequences could represent different numbers of zero hextets.
Resolution: Use :: for only one contiguous zero run and write the other zero hextets explicitly.
Link-Local Destination on the Wrong Interface
Problem: A host cannot reach a neighbor using a valid link-local address.
Diagnosis: Link-local scope does not identify a routed destination, and the system may not know which local interface should send the packet.
Resolution: Specify the outbound interface or zone when required by the operating system or management tool.
Using Link-Local Addresses Across Routers
Problem: A student expects FE80::/10 traffic to cross an enterprise router.
Diagnosis: Link-local addresses are restricted to the local Layer 2 segment.
Resolution: Use a global-unicast or unique-local prefix for traffic that must cross routers.
Five-Character Hextet
Problem: An address contains a group such as 12345.
Diagnosis: A hextet can contain no more than four hexadecimal digits.
Resolution: Correct the group and confirm that the complete address expands to eight hextets.
Searching for an IPv4-Style Subnet Mask
Problem: Someone tries to assign an IPv4-style mask such as 255.255.255.0 to an IPv6 network.
Diagnosis: IPv6 expresses the boundary with a prefix length.
Resolution: Use notation such as /64 and interpret it as 64 leading network bits.
CCNA Exam Notes
- IPv6 addresses contain 128 bits divided into eight 16-bit hextets.
- Hexadecimal letters are case-insensitive.
- Leading-zero suppression applies within individual hextets.
- Zero compression replaces one consecutive run of all-zero hextets and uses
::only once. - Expand an abbreviated address until exactly eight hextets are present.
/64is the common IPv6 LAN prefix and leaves 64 bits for the interface identifier.FE80::/10is link-local,FC00::/7is unique local, andFF00::/8is multicast.::is unspecified,::1is loopback, and::/0is the default route.- IPv6 has no broadcast; multicast provides group delivery.
- A link-local address is not routed beyond its local link and may require an interface or zone identifier.
For related fundamentals, review the Computer Network Explained lesson and the OSI Reference Model. Router interface practice is also relevant when applying IPv6 addresses to a router-on-a-stick configuration.