You are on page 1of 10

2 IPv6 Addressing

IPv6 Basics, Version 1.2e

T.O.P. BusinessInteractive GmbH

Page 1 of 10

2.1 IPv6 Addressing Subnet Prefix and Interface ID ........................3


2.2 IPv6 Addressing Mathematics.....................................................4
2.3 IPv6 Compression Format ...........................................................5
2.4 IPv6 Address Types (1/2) .............................................................6
2.4 IPv6 Address Types (2/2) .............................................................7
2.5 IPv6 Subnetting and Global Routing...........................................8
2.6 EUI-64 INterface ID .......................................................................9
2.7 Multiple IP Addresses ................................................................ 10

IPv6 Basics, Version 1.2e

T.O.P. BusinessInteractive GmbH

Page 2 of 10

2.1 IPv6 Addressing Subnet Prefix and Interface ID

IPv4 addresses are 32 bits long and are shown in dotted decimal notation. Four decimal
values between 0 and 255 are separated by periods. In addition each IPv4 address has a
corresponding netmask in decimal values like this. IPv6 addresses are 128 bits long and are
shown in hexadecimals as a sequence of eight 16-bit values separated by colons. In IPv6 the
subnet mask is called the prefix.
You are already familiar with the representation of a netmask with the number of bits set
shown after a slash. This format is used for IPv6 addresses as well. A netmask in
hexadecimals is not used in IPv6.The prefix is used to separate the Subnet Prefix from the
Interface Id of an IPv6 address. It has the same function and works the same way as the
network and host part of an IPv4 address.

IPv6 Basics, Version 1.2e

T.O.P. BusinessInteractive GmbH

Page 3 of 10

2.2 IPv6 Addressing Mathematics

In IPv6 we need to be familiar with addresses in hexadecimals. You know hex-values from
Ethernet MAC addresses. Lets have a look at the basic maths that we need. In module 3 of
TCP/IP basics you learned about converting decimal values to binary values and vice versa.
In hexadecimals each position represents a value between 0 and 15. 10 to 15 are shown as
the letters A-F.
If we wanted to convert the first 16 bit section of the IPv6 address shown into the decimal
value 65281, we calculate it as shown in the blue box. Conversion of the same value into a
binary format is just as easy.

IPv6 Basics, Version 1.2e

T.O.P. BusinessInteractive GmbH

Page 4 of 10

2.3 IPv6 Compression Format

IPv6 addresses look cumbersome and confusing at first. To simplify writing and handling for
humans 2 compression formats exist. IPv6 addresses often contain larger strings of zeros. It
is acceptable to drop leading zeros in single 16 bit fields, intermediate zeros can not be
compressed because this would represent the wrong values. 00B3 is wrong in this example.
If 16-bit values of an IPv6 address contain only zeros, then it is fine to compress these 16 bit
fields and shown them as two colons. This compression method is only allowed once in each
address. In this example we cant get back to the original address, because we dont know
where to put the zeros.

IPv6 Basics, Version 1.2e

T.O.P. BusinessInteractive GmbH

Page 5 of 10

2.4 IPv6 Address Types (1/2)

Like IPv4, IPv6 is able to use unicasts to address single hosts and multicasts to address
multiple hosts at once.
A new concept which we cant cover in depth here is the anycast. Imagine one practical use
of an anycast to be an address assigned to more than one host. If you send a packet to an
anycast address, you reach the nearest host with this anycast address. In this example two
hosts any1 and any2 share the same anycast address 2002::4711. If Chris tries to reach this
address, he will reach any1, if Tom wants to reach the same address, he will reach any2.
There is no IPv6 broadcast address like in IPv4. Multicasts are used instead to reduce
network traffic.

IPv6 Basics, Version 1.2e

T.O.P. BusinessInteractive GmbH

Page 6 of 10

2.4 IPv6 Address Types (2/2)

Like IPv4, IPv6 has different types of addresses identified by special prefixes. There is a
single loopback address and a site local address range which has been deprecated. Both of
these are unicast addresses. The unspecified address is never assigned to a node. It
indicates the absence of an IPv6 address.
Instead of site local addresses unique local Ipv6 unicast addresses can be used. They are
self generated but have an extremely high probability of being unique
The concept of a link local address range is also new. Every IPv6 node is assigned a link
local address on each of its interfaces automatically. A link local address is never forwarded
over a local link. This implies that every IPv4 node uses several IPv6 addresses at a time.
Multicast addresses use the prefix FF00::/8. Anycast addresses can be either link-local,
global unicast or site-local addresses.
You may find conflicting statements about which IP addresses will be globally routable and
how site local addresses may be used. In the literature you will find the term aggregateable
global for IP addresses that are given to service providers by regional internet registries.
Since address assignment policies might yet change we will not look at this in detail here.
The aggregateable global ranges currently use the binary prefix 0010. This corresponds to
2 as the first byte of the aggregateable global IP addresses already mentioned. Global route
aggregation is needed to keep internet router routing tables small. We will look at this in the
routing module.

IPv6 Basics, Version 1.2e

T.O.P. BusinessInteractive GmbH

Page 7 of 10

2.5 IPv6 Subnetting and Global Routing

With IPv4 and CIDR (Classless Inter Domain Routing) you are used to VLSM (Variable
Length Subnet Masks). With IPv6 it is normal to use a fixed number of bits for each subnet.
This is true, even if only a small number of addresses is needed - like on a point to point link
for example because so many addresses are available in IPv6.
We have already met the subnet prefix. This is divided into a global routing prefix and a
subnet ID. From the very beginning of IPv6 the Link Local Interface ID was designed to be
autoconfigured. The interface ID can be derived using Extended Unique Identifier EUI-64
addressing. The Interface ID contains the MAC address of the interface network card when
using EUI-64.
The current internet standard Request for Comment RFC3587 publishes an address
structure in which the remaining 64 bits - the first half of the IPv6 address are separated
into a 48 bit global routing prefix and a 16 bit subnet id. The customer can use the 16 subnet
bits to represent his internal network structure.

IPv6 Basics, Version 1.2e

T.O.P. BusinessInteractive GmbH

Page 8 of 10

2.6 EUI-64 INterface ID

We will need a basic understanding of EUI-64 because we will meet it often throughout the
course. So lets build a complete IPv6 address for this prefix using an ethernet MAC address
as an example. The Prefix shown is missing an Interface ID, so let's derive one from the
MAC address using the EUI-64 format.
The upper 3 bytes of a MAC address carry the OUI, the Organizational Unique Identifier that
links to the manufacturer of the card. The lower 3 bytes are assigned by the manufacturer
and are supposed to be unique within his OUI range.
In a first step, the MAC address is split in half and FF:FE is inserted in the middle of the
address to get a 64 bit MAC address. Bit 7 in the first byte of the MAC address carries a flag
that shows if the MAC address is globally unique. In a second step, this is simply reversed
which leads us to our complete IPv6 node address.

IPv6 Basics, Version 1.2e

T.O.P. BusinessInteractive GmbH

Page 9 of 10

2.7 Multiple IP Addresses

In this example the host tweety was assigned a static IPv6 address of fe00::1/64 on his
ethernet interface en0.
The IPv6 protocol stack assigned automatically a second address which is a link local
address. We know this because of the link local prefix FE80. The lower 64 bits of the link
local address were derived from the MAC address using EUI-64. We can see the 7th bit in
the highest MAC address byte has been flipped from 00 to 02.
In addition we can see both of the address compression formats in use, 020d is written as
20d and fe00 - many zeros - 1 is shown as fe00::1 in the command output.

IPv6 Basics, Version 1.2e

T.O.P. BusinessInteractive GmbH

Page 10 of 10

You might also like