Unix Support

2.1. Notation

The most obvious way in which IPv6 differs from IPv4 is in the size of the addresses. IPv6 addresses are 128 bits long, or four times the size of IPv4 addreses. The theoretical number of IPv6 addresses, about 3 × 1038, is almost unimaginably large.

IPv6 addresses are written as groups of four hexadecimal digits separated by colons. For instance the full address of my workstation is 2001:0630:0200:8100:02C0:4FFF:FE68:12CB. Leading zeros in a group are allowed to be dropped, upper and lower case are equivalent, and :: means, "pad with zeroes here". Thus my address could also be written 2001:630:200:8100:2c0:4fff:fe68:12cb and FE80:0000:0000:0000:02C0:4FFF:FE68:12CB can also be written fe80::2c0:4fff:fe68:12cb

As in IPv4, ranges of addresses can be described by suffixing a / followed by the number of fixed bits in the address, so 3FFE::/16 means the set of addresses which begin with 3FFE.

2.2. Address space

As with IPv4, IPv6 addresses are big-endian, i.e. the most-significant part of the address is at the start. Almost all IPv6 addresses are global unicast addresses. The exceptions are the unspecified and loopback addresses, multicast addresses, and link- and site-local addresses. Some of the ranges of addresses currently in use are:

:: Unspecified address
::1 Loopback address
2001::/16 "Sub-TLA" (RFC 2450) normal addresses
2002::/16 "6to4" (RFC 3056) automatic tunnels
3FFE::/16 "6bone" (RFC 2471) testing addresses
FE80::/10 Link-local addresses
FEC0::/10 Site-local addresses
FF00::/8 Multicast addresses

There are other ranges of addresses assigned, but you're unlikely to run into them. Note that in IPv6, there are no broadcast addresses. Where something like a broadcast is needed, multicasts are used instead. For instance, there's a "link-scope all-hosts multicast" address, ff02::1, which corresponds to the IPv4 subnet-local broadcast address, 255.255.255.255.

2.3. Interface IDs

One of the interesting things about IPv6 is that, for the most part, individual addresses don't have to be assigned. For all the types of unicast address in the table above, the whole of the bottom 64 bits of the address is devoted to identifying a particular machine within a subnet. This part is known as the interface ID, and is commonly derived from a host's Ethernet MAC address. Thus, my machine, whose MAC address is 00-C0-4F-68-12-CB, can generate a reliably-unique interface ID of 02C0:4FFF:FE68:12CB. Combining that with the link-local prefix gets me a link-local address of FE80::02C0:4FFF:FE68:12CB, and combining it with the subnet prefix of the CS staff network gets me a global address of 2001:630:200:8100:02C0:4FFF:FE68:12CB. Note that it's not compulsory to use an interface ID derived from an Ethernet address. As long as the global/local bit (::0200:0000:0000:0000) isn't set, it's permitted to invent one's own interface ID, just as in IPv4.


Prev Home Next
IPv6 for sysadmins   IPv6 over Ethernet (and other links)

The title of this document is: IPv6 addressing (RFC 2373)
URL: http://www-uxsup.csx.cam.ac.uk/courses/moved.ipv6_basics/x13.html