← Lessons

quiz vs the machine

Gold1300

Networking

IPv6 Address Notation

Read and shorten the long hexadecimal addresses that replace scarce IPv4 space.

5 min read · core · beat Gold to climb

Why IPv6 Exists

The thirty two bit IPv4 space holds only about four billion addresses, which the internet long ago outgrew. IPv6 expands the address to one hundred twenty eight bits, an effectively unlimited supply.

The Written Form

An IPv6 address is eight groups of four hexadecimal digits separated by colons. Because writing all of that is tedious, two rules shorten it:

  • Leading zeros in a group may be dropped.
  • One run of consecutive all zero groups may be replaced by a double colon, used at most once per address so the length stays unambiguous.

So a long form with many zero groups collapses to a compact form, and a reader can expand it by restoring the missing zero groups.

Address Structure

  • The leading bits form a prefix identifying the network, written with a slash length like a CIDR prefix.
  • The remaining bits form the interface identifier for the host.
  • A typical site receives a generous prefix, ending the address scarcity that forced heavy network address translation in IPv4.

Special Forms

  • The loopback is all zeros ending in one.
  • Link local addresses begin with a reserved prefix and are valid only on the local segment.

Key idea

IPv6 uses one hundred twenty eight bit addresses written as eight hexadecimal groups, shortened by dropping leading zeros and collapsing one run of zero groups with a double colon.

Check yourself

Answer to earn rating on the learn ladder.

1. How many bits is an IPv6 address?

2. How many times may the double colon shorthand appear in one address?