WintelGuy.com
IPv6 Addressing Cheat Sheet

This page outlines basic information about IPv6 address representation, different address types and formats.

IPv6 set of protocols and standards was developed by the Internet Engineering Task Force (IETF) as a replacement for the currently used IPv4 version. Most noticeable difference between the versions is that IPv6 uses 128-bit addresses (16 bytes) comparing to 32 bit (4 bytes) for IPv4. As a result, IPv6 offers much larger addressees space and allows efficient and hierarchically structured addressing and routing. Other improved IPV6 futures are automatic configuration, quality of service (QoS), and security.

IPv6 Address Representation

There are three conventional forms for representing IPv6 addresses as text strings:

  • Preferred form – address is represented by eight 16-bit groups in hexadecimal form divided by colons: x:x:x:x:x:x:x:x

Where “x”s represent from one to four hexadecimal digits. Leading zeroes can be omitted, but there must be at least one digit present in each group.

Examples:

2001:db8:0:0:1:23b8:0:298c

fe80:0:0:0:2cc5:6ac9:3f76:bb55

fc00:0:0:0:0:0:0:0

0:0:0:0:0:0:0:1

  • Compressed form - uses "::" (known as double-colon) to indicate one or more groups of 16 bits of zeroes. The "::" can only appear once in an address. The "::" can also be used to compress leading or trailing zeros in an address.

Examples:

2001:db8::1:23b8:0:298c

fe80::2cc5:6ac9:3f76:bb55

fc00::

::1

  • Alternative form - for dealing with mixed IPv4 and IPv6 environments: x:x:x:x:x:x:y.y.y.y Where “x”s represent hexadecimal values of the six high-order groups of the address and “y”s are decimal values of the low-order 8-bit pieces of the address in standard IPv4 representation.

Examples:

0:0:0:0:0:0:192.168.2.10

0:0:0:0:0:ffff:10.0.5.1

::192.168.2.10

::ffff:10.0.5.1

[RFC5952] provides detailed recommendations for IPv6 address text representation. Some of them are listed below:

  • Leading zeros must be suppressed.

  • The use of the symbol "::" must be used to its maximum capability.

  • The symbol "::" must not be used to shorten just one 16-bit 0 field.

  • When there is an alternative choice in the placement of a "::", the longest run of consecutive 16-bit 0 fields must be shortened. When the length of the consecutive 16-bit 0 fields are equal, the first sequence of zero bits must be shortened.

  • The characters "a", "b", "c", "d", "e", and "f" in an IPv6 address must be represented in lowercase.

Classless Inter-Domain Routing (CIDR) notation for IPv6 address prefixes is similar to IPv4:
address/prefix_length

Examples:

2001:0db8:0000:0000:ab50:0000:0000:0000/64

2001:db8:0:0:ab50:0:0:0/64

2001:db8:0:0:ab50::/64

0:0:0:0:0:0:0:1/128

::1/128


Notes:

  • Trailing zeros within any 16-bit group of the address must not be dropped.

  • A subnet mask is not used for IPv6. Only the prefix length notation is supported.

IPv6 Address Types

There are three types of IPv6 addresses: Unicast, Anycast, and Multicast.

There are no broadcast addresses in IPv6, their function being superseded by multicast addresses.

Scope:

Every IPv6 address other than the unspecified address has a specific scope; that is, a topological span within which the address may be used as a unique identifier for an interface or set of interfaces. In other words, the scope is the the portion of the IPv6 internetwork over which the address is unique.

The scope of an address is encoded as part of the address.

Unicast:

A unicast address identifies a single interface. A packet sent to a unicast address is delivered to the interface identified by that address.

The IPv6 Unicast space encompasses the entire IPv6 address space with the exception of the ff00::/8 range.

There are several types of unicast IPv6 adresses:

  • Global Unicast (range of 2000::/3)

  • Unique Local Unicast, also called Local IPv6 Addresses (range fc00::/7) [RFC4193]

  • Link-Local Unicast (range of fe80::/10)

There are also some special purposes subtypes of Global Unicast, such as IPv6 addressees with embedded IPv4 addresses (range of 0000::/8)

Notes:

  • Currently only 2000::/3 is been allocated by the IANA for the purpose of Global Unicast. In the future other unassigned portions of the IPv6 address space might be allocated for the purpose of Global Unicast as well.

  • Site-Local addresses (range of fec0::/10) were originally designed to be used for addressing inside of a site without the need for a global prefix. Site-local addresses are now deprecated as defined in [RFC3879]. However, existing implementations and deployments may continue to use this prefix.

Two scopes are defined for unicast addresses [RFC4007]:

  • Link-local scope, for uniquely identifying interfaces within (i.e., attached to) a single link only.

  • Global scope, for uniquely identifying interfaces anywhere in the Internet.

All Unicast addresses, except those from the range of 0000::/8, have the general structure composed of 64-bit subnet prefix and 64-bit Interface identifier.


64 bits

64 bits

subnet prefix

interface ID

Interface ID is an interface identifier constructed in Modified EUI-64 format.

Modified EUI-64 format-based interface identifiers may have universal scope when derived from a universal token (e.g., IEEE 802 48-bit MAC or IEEE EUI-64 identifiers) or may have local scope where a global token is not available (e.g., serial links, tunnel end-points) or where global tokens are undesirable (e.g., temporary tokens for privacy [RFC4941]).

IEEE EUI-64 identifiers are transformed to the Modified EUI-64 format by inverting the “u” bit (bit #7 - universal/local bit in IEEE EUI-64 terminology). In the resulting Modified EUI-64 format, the "u" bit is set to one (1) to indicate universal scope, and it is set to zero (0) to indicate local scope.

IEEE 48-bit MAC identifiers are transformed to the Modified EUI-64 format by inserting two octets, with hexadecimal values of 0xff and 0xfe, in the middle of 48-bit MAC and inverting the “u” bit.

Example:

MAC address: 00-aa-aa-bb-bb-bb

Interface ID in modified EUI-64 format: 02aa:aaff:febb:bbbb

For manually configured Interface IDs “u” bit should be set to zero (0).

Notes:

  • IPv6 nodes are not required to validate the uniqueness of the interface identifiers created with modified EUI-64 tokens with the "u" bit set to universal (1).

  • By default, Windows Vista and Windows Server 2008 assign a permanent, randomly generated value to Interface ID.

All Global Unicast addresses (except the range of 0000::/8) have the following format:


n bits

64-n bits

64 bits

global routing prefix

subnet ID

interface ID

Where:

global routing prefix is a value assigned to a site.

subnet ID is an identifier of a link withing the site.

interface ID is an interface identifier constructed in Modified EUI-64 format described earlier.

The global routing prefix is designed to be structured hierarchically globally by the regional Internet registry (RIRs) and ISPs. The subnet ID field is designed to be structured hierarchically locally by site administrators.

[RFC3177] recommends the following general rules for the allocations of the boundary between the public and the private topology:

  • /48 in the general case – home network subscribers, small and large enterprises (except for very large subscribers).

  • /47, or slightly shorter, or multiple /48 for very large subscribers.

  • /64 when it is known that one and only one subnet is needed by design (mobile networks).

  • /128 when it is absolutely known that one and only one device is connecting (a single PC).

Example:

Format of the Global Unicast address under the 2000::/3 prefix with /48 allocation:


3 bits

45 bits

16 bits

64 bits

001

global routing prefix

subnet ID

interface ID

With 16 bits allocated to subnet ID organizations can create up to 65536 internal subnets or multiple levels of addressing hierarchy and routing infrastructure for one or multiple sites.

Unique Local Unicast addresses (range of fc00::/7) [RFC4193] are designed to be globally unique and intended to be used for local communications within a site or a groups of sites. They are not expected to be routable globally, however they are routable within a site or between sites. The scope of the Unique Local Unicast addresses is, by default, global.

Unique Local Unicast addresses have the following format:


7 bits

1 bit

40 bits

16 bits

64 bits

1111 110

L flag

global ID

subnet ID

interface ID

Where:

1111110 - 7-bit prefix fc00::/7 identifies Unique Local Unicast addresses.

L = 1 indicates that the prefix is locally assigned. L = 0 setting may be defined in the future.

global ID - globally unique prefix. When L = 1, prefix is self-generated using pseudo-random algorithm.

subnet ID – identifies a subnet within a site.

interface ID – interface identifier in Modified EUI-64 format described earlier.

Link-Local Unicast addresses (range of fe80::/10) are used for addressing on a single link for purposes such as automatic address configuration, neighbour discovery, or when no routers are present. Routers must not forward any packets with Link-Local source or destination addresses to other links.

IPv6 link-local addresses are equivalent to the IPv4 link-local addresses 169.254.0.0/16 [RFC3927] also know as IPv4 Automatic Private IP Addressing (APIPA) addresses.

Link-Local addresses have the following format:


10 bits

54 bits

64 bits

1111 1110 10

0000...0000

interface ID

Where:

1111111010 -10-bit prefix fe80::/10 identifies Link-Local Unicast addresses.

Interface ID – interface identifier in Modified EUI-64 format described earlier.

Anycast:

An anycast address identifies a set of interfaces (typically belonging to different nodes). A packet sent to an anycast address is delivered to one of the interfaces identified by that address (the "nearest" one, according to the routing protocols' measure of distance). At present, anycast addresses are only used as destination addresses and are only assigned to routers.

Anycast addresses are allocated from the unicast address space (of any scope), are not syntactically distinguishable from unicast addresses, and have the same scope properties as unicast addresses.

The predefined Subnet-Router anycast address is constructed from the unicast address for a given interface with the bits in the subnet prefix fixed at their appropriate values and the remaining bits set to 0. All router interfaces attached to a subnet are assigned the Subnet-Router anycast address for that subnet.


64 bits

64 bits

subnet prefix

0000...0000

Multicast:

A multicast address identifies a set of interfaces (typically belonging to different nodes). A packet sent to a multicast address is delivered to all interfaces identified by that address.

IPv6 multicast addresses are distinguished from unicast addresses by the value of the high-order octet of the addresses: a value of 0xff (binary 11111111) identifies an address as a multicast address (address range of ff00::/8); any other value identifies an address as a unicast address.

For multicast addresses, there are fourteen possible scopes, ranging from interface-local to global (including link-local).

Multicast addresses can have one of the following formats:

Base operational format defined in [RFC4291]


8 bits

4 bits

4 bits

112 bits

1111 1111

flags

scope

group ID

Extended format that incorporates unicast prefix information (Unicast-Prefix-based IPv6 Multicast address) defined in [RFC3306]. (flags field is equal "0011")


8 bits

4 bits

4 bits

8 bits

8 bits

64 bits

32 bits

1111 1111

flags

scope

reserved

plen

network prefix

group ID

Modified unicast-prefix-based address format with encoded Rendezvous Point (RP) Address defined in [RFC3956]. (flags field is equal "0111")


8 bits

4 bits

4 bits

4 bits

4 bits

8 bits

64 bits

32 bits

1111 1111

flags

scope

reserved

RIID

plen

network prefix

group ID

Where:

11111111 - 8-bit prefix ff00::/8 identifies Multicast addresses.

flags is a set of four flags:


0

R

P

T

T - Transient flag.

T = 0 indicates a permanently-assigned (“well-known”) multicast address, assigned by IANA.

T = 1 indicates a non-permanently-assigned (“transient” or “dynamically” assigned) multicast address.

P - Prefix flag [RFC3306].

P = 0 indicates a multicast address that is not assigned on the network prefix (i.e. structured according to the Base format)

P = 1 indicates a multicast address that is assigned based on the network prefix (i.e. structured according to the Extended format) If P = 1, T must be set to 1.

R - Rendezvous Point Address flag [RFC3956].

R = 1 indicates a multicast address that embeds the address on the Rendezvous Point (RP). Then P must be set to 1, and consequently T must be set to 1. In this case, the RIID field is embedding the RP interface ID.

R = 0 indicates a multicast address that does not embed the address of the RP and follows the semantics defined in [RFC4291] and [RFC3306].

Scope is a 4-bit multicast scope value used to limit the scope of the multicast group. The values are as follows:

0 reserved

1 Interface-Local scope - spans only a single interface on a node and is useful only for loopback transmission of multicast.

2 Link-Local scope - spans the same topological region as the corresponding unicast scope.

3 reserved

4 Admin-Local scope - is the smallest scope that must be administratively configured, i.e., not automatically derived from physical connectivity or other, non-multicast-related configuration.

5 Site-Local scope - is intended to span a single site.

6 (unassigned)

7 (unassigned)

8 Organization-Local scope - is intended to span multiple sites belonging to a single organization.

9 (unassigned)

A (unassigned)

B (unassigned)

C (unassigned)

D (unassigned)

E Global scope

F reserved


Scopes labeled "(unassigned)" are available for administrators to define additional multicast regions.

Routers must not forward any multicast packets beyond of the scope indicated by the scope field in the destination multicast address.

Nodes must not originate a packet to a multicast address whose scope field contains the reserved value 0; if such a packet is received, it must be silently dropped. Nodes should not originate a packet to a multicast address whose scope field contains the reserved value F; if such a packet is sent or received, it must be treated the same as packets destined to a global (scope E) multicast address.

The reserved field must be zero.

plen indicates the actual number of bits in the network prefix field that identifies the subnet when flag P = 1.

network prefix identifies the network prefix of the unicast subnet owning the multicast address (when P = 1).

Group ID identifies the multicast group, either permanent or transient, within the given scope.

Group IDs for permanent multicast addresses are allocated by IANA in the range of 0x00000001 to 0x3fffffff and must have flag T = 0 and flag P = 0

Permanent IPv6 Multicast Group Identifiers (Permanent Group IDs) are allocated in the range 0x40000000 to 0x7fffffff.

All dynamically allocated IPv6 multicast addresses must have flag T = 1. The high-order bit of the Group ID of the dynamically allocated IPv6 multicast address will be the same as the T flag.

Group IDs for IPv6 multicast addresses allocated by a server or self-selected by a host must fall in the range 0x80000000 to 0xffffffff.

Solicited-Node multicast addresses are dedicated to identify the solicited-node during neighbour discovery. A Solicited-Node multicast address is formed by taking the low-order 24 bits of an address (unicast or anycast) and appending those bits to the prefix ff02:0:0:0:0:1:ff00::/104 resulting in a multicast address in the range:


From:

ff02

:

0

:

0

:

0

:

0

:

1

:

ff00

:

0

To:

ff02

:

0

:

0

:

0

:

0

:

1

:

ffff

:

ffff


Source-Specific Multicast Addresses (SSM) are Unicast-Prefix-based IPv6 Multicast addresses with the flag P =0, plen = 0, and network prefix = 0. Therefore, SSM multicast addresses are derived from the ff3x::/96 prefix, where x is a 4-bit multicast scope value.

The "meaning" of a permanently-assigned multicast address is independent of the scope value. Non-permanently-assigned multicast addresses are meaningful only within a given scope.


When sending IPv6 multicast packets on an Ethernet link, the corresponding destination MAC address is 33-33-xx-xx-xx-xx where xx-xx-xx-xx is a direct mapping of the last 32 bits of the IPv6 multicast address.

For example, the address of 33-33-00-00-00-01 corresponds to the link-local scope all-nodes multicast address of ff02::1.

Scope Zones [RFC4007]:

A scope zone, or simply a zone, is a connected region of topology of a given scope.

Zones of the different scopes are represented as follows:

  • Each interface on a node comprises a single zone of interface-local scope (for multicast only).

  • Each link and the interfaces attached to that link comprise a single zone of link-local scope (for both unicast and multicast).

  • There is a single zone of global scope (for both unicast and multicast) comprising all the links and interfaces in the Internet.

  • The boundaries of zones of a scope other than interface-local, link-local, and global must be defined and configured by network administrators.

To distinguish between non-global zones within a node a distinct “zone index” is assigned to each zone of the same scope to which that node is attaches.

Scope zone for a non-global IPv6 address can be represented in the following format:

address%zone_id

Where:

address is a local-use address.

zone_id identifies the zone for the address. zone_id format is implementation dependent and could be, for example, a number representing zone index or an interface name, etc.

Special-Use IPv6 Addresses:

See [RFC5156]

IPv6 Address assignment for a host:

  • At least one Link-Local address for each interface.

  • Assigned (configured) unicast addresses for each interface (for example, one or multiple global unicast addresses).

  • The loopback address (::1) for the loopback interface.

Additionally, each host is listening for traffic on the following multicast addresses:

  • The interface-local scope all-nodes multicast address (ff01::1)

  • The link-local scope all-nodes multicast address (ff02::1)

  • The solicited-node address for each unicast address on each interface

  • The multicast addresses of joined groups on each interface


IPv6 Address assignment for a router:

  • At least one Link-Local address for each interface.

  • Assigned (configured) unicast addresses for each interface (for example, one or multiple global unicast addresses).

  • A Subnet-Router anycast address

  • Additional anycast addresses (optional)

  • The loopback address (::1) for the loopback interface.

Additionally, each router is listening for traffic on the following multicast addresses:

  • The interface-local scope all-nodes multicast address (ff01::1)

  • The interface-local scope all-routers multicast address (ff01::2)

  • The link-local scope all-nodes multicast address (ff02::1)

  • The link-local scope all-routers multicast address (ff02::2)

  • The site-local scope all-routers multicast address (ff05::2)

  • The solicited-node address for each unicast address on each interface

  • The multicast addresses of joined groups on each interface