Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Internet Protocol Version 6 Basics

Internet Protocol Version 6 (IPv6)The IP Next Generation


Technical white paper

Table of contents
Internet Protocol Version 6 Features ................................................................................................2
Header format simplification ......................................................................................................2
Adequate address space ...........................................................................................................2
Hierarchical address structure .....................................................................................................2
Automatic address configuration .................................................................................................2
Built-in security ..........................................................................................................................3
QoS support .............................................................................................................................3
Enhanced neighbor discovery mechanism ....................................................................................3
Flexible extension headers .........................................................................................................3
Introduction to IPv6 Address ...........................................................................................................3
IPv6 address format...................................................................................................................3
IPv6 address classification..........................................................................................................4
Unicast address ........................................................................................................................5
Multicast address ......................................................................................................................5
Interface identifier in IEEE EUI-64 format ......................................................................................6
Introduction to IPv6 Neighbor Discovery Protocol .............................................................................6
Address resolution.....................................................................................................................7
Neighbor reachability detection .................................................................................................7
Duplicate address detection .......................................................................................................8
Router/prefix discovery and address autoconfiguration .................................................................8
Redirection ...............................................................................................................................9
IPv6 PMTU Discovery ....................................................................................................................9
Introduction to IPv6 DNS .............................................................................................................10
Protocols and standards ..............................................................................................................10

Internet Protocol Version 6 Features


Header format simplification
Internet Protocol Version 6 (IPv6) cuts down some IPv4 header fields or move them to IPv6 extension headers to
reduce the load of basic IPv6 headers, thus making IPv6 packet handling simple and improving the forwarding
efficiency. Although the IPv6 address size is four times that of IPv4 addresses, the size of basic IPv6 headers is
40 bytes and is only twice that of IPv4 headers (excluding the Options field).

Figure 1: Comparison between IPv4 packet header format and basic IPv6 packet header format
0

3
Ver

7
HL

15
ToS

Identification
TTL

23
Total length
F

Protocol

31 0

11

Ver Traffic class

Fragment offset

15

23

31

Flow label

Payload length

Hop limit

Header checksum

Source address (32 bits)

Source address (128 bits)

Destination address (32 bits)


Options

Padding

IPv4 header
Destination address (128 bits)

Basic IPv6 header

Adequate address space


The source and destination IPv6 addresses are both 128 bits (16 bytes) long. IPv6 can provide 3.4 x 10^38
addresses to completely meet the requirements of hierarchical address division as well as allocation of public and
private addresses.

Hierarchical address structure


IPv6 adopts a hierarchical address structure to speed route lookup and reduce the system resource occupied by the
IPv6 routing table by means of route aggregation.

Automatic address configuration


To simplify the host configuration, IPv6 supports stateful and stateless address configuration.

Stateful address configuration means that a host acquires an IPv6 address and related information from a server
(for example, DHCP server).

Stateless address configuration means that a host automatically configures an IPv6 address and related information
on the basis of its own link-layer address and the prefix information advertised by a router.

In addition, a host can generate a link-local address on basis of its own link-layer address and the default prefix
(FE80::/64) to communicate with other hosts on the link.

Built-in security
IPv6 uses Internet Protocol Security (IPsec) as its standard extension header to provide end-to-end security.
This feature provides a standard for network security solutions and improves the interoperability between different
IPv6 applications.

QoS support
The Flow Label field in the IPv6 header allows the device to label packets in a flow and provide special handling for
these packets.

Enhanced neighbor discovery mechanism


The IPv6 neighbor discovery protocol is a group of Internet control message protocol version 6 (ICMPv6) messages
that manages the information exchange between neighbor nodes on the same link. The group of ICMPv6 messages
takes the place of an Address Resolution Protocol (ARP) message, Internet Control Message Protocol version 4
(ICMPv4) router discovery message, and ICMPv4 redirection message to provide a series of other functions.

Flexible extension headers


IPv6 cancels the Options field in IPv4 packets but introduces multiple extension headers. In this way, IPv6 enhances
the flexibility greatly to provide scalability for IP while improving the handling efficiency. The Options field in IPv4
packets contains 40 bytes at most, while the size of IPv6 extension headers is restricted by that of IPv6 packets.

Introduction to IPv6 Address


IPv6 address format
An IPv6 address is represented as a series of 16-bit hexadecimals, separated by colons. An IPv6 address is divided
into eight groups, and the 16 bits of each group are represented by four hexadecimal numbers which are separated
by colons, for example, 2001:0000:130F:0000:0000:09C0:876A:130B.
To simplify the representation of IPv6 addresses, zeros in IPv6 addresses can be handled as follows:

Leading zeros in each group can be removed. For example, the above-mentioned address can be represented in
shorter format as 2001:0:130F:0:0:9C0:876A:130B.

If an IPv6 address contains two or more consecutive groups of zeros, they can be replaced by the

double-colon :: option. For example, the above-mentioned address can be represented in the shortest
format as 2001:0:130F::9C0:876A:130B.

Caution:
The double-colon :: option can be used only once in an IPv6 address. Otherwise, the device is unable to determine
how many zeros double-colons represent when converting them to zeros to restore a 128-bit IPv6 address.
An IPv6 address consists of two parts: address prefix and interface ID. The address prefix and the interface ID are
respectively equivalent to the network ID and the host ID in an IPv4 address.
An IPv6 address prefix is written in IPv6-address/prefix-length notation, where IPv6-address is an IPv6 address in any
of the notations and prefix-length is a decimal number indicating how many bits from the utmost left of an IPv6
address are the address prefix.

IPv6 address classification


IPv6 addresses fall into three types: unicast address, multicast address, and anycast address.

Unicast address: An identifier for a single interface, similar to an IPv4 unicast address. A packet sent to a unicast
address is delivered to the interface identified by that address.

Multicast address: An identifier for a set of interfaces (typically belonging to different nodes), similar to an IPv4
multicast address. A packet sent to a multicast address is delivered to all interfaces identified by that address.

Anycast address: An identifier for 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).

ffi Note:
There are no broadcast addresses in IPv6. Their function is superseded by
multicast addresses.

The type of an IPv6 address is designated by the first several bits called format prefix. Table 1 lists the mappings
between address types and format prefixes.

Table 1: Mapping between address types and format prefixes


Type

Unicast
address

Format prefix (binary)

IPv6 prefix ID

Unassigned address

00...0 (128 bits)

::/128

Loopback address

00...1 (128 bits)

::1/128

Link-local address

1111111010

FE80::/10

Site-local address

1111111011

FEC0::/10

other forms

11111111

FF00::/8

Global unicast address

Multicast address

Anycast address

Anycast addresses are taken from the unicast address space and are not syntactically
distinguishable from unicast addresses.

Unicast address
There are several forms of unicast address assignment in IPv6, including aggregatable global unicast address,
link-local address, and site-local address.

The aggregatable global unicast address, equivalent to an IPv4 public address, is provided for network service

providers. The structure of such a type of address allows efficient route prefix aggregation to restrict the number of
global routing entries.

The link-local address is used for communication between link-local nodes in neighbor discovery and stateless
autoconfiguration. Routers must not forward any packets with link-local source or destination addresses to
other links.

IPv6 unicast site-local addresses are similar to private IPv4 addresses. Routers must not forward any packets with
site-local source or destination addresses outside of the site (equivalent to a private network).

Loopback address: The unicast address 0:0:0:0:0:0:0:1 (represented in the shortest format as ::1) is called the

loopback address and may never be assigned to any physical interface. Like the loopback address in IPv4, it may
be used by a node to send an IPv6 packet to itself.

Unassigned address: The unicast address :: is called the unassigned address and may not be assigned to any
node. Before acquiring a valid IPv6 address, a node may fill this address in the source address field of an IPv6
packet, but may not use it as a destination IPv6 address.

Multicast address
IPv6 multicast addresses listed in Table 2 are reserved for special purpose.

Table 2: Reserved IPv6 multicast addresses


Address

Application

FF01::1

Node-local scope all-nodes multicast address

FF02::1

Link-local scope all-nodes multicast address

FF01::2

Node-local scope all-routers multicast address

FF02::2

Link-local scope all-routers multicast address

FF05::2

Site-local scope all-routers multicast address

Besides these, there is another type of multicast address: solicited-node address. A solicited-node multicast address is
used to acquire the link-layer addresses of neighbor nodes on the same link and is also used for duplicate address
detection (DAD). Each IPv6 unicast or anycast address has one corresponding solicited-node address. The format of a
solicited-node multicast address is as follows:
FF02:0:0:0:0:1:FFXX:XXXX
Where, FF02:0:0:0:0:1 FF is permanent and consists of 104 bits, and XX:XXXX is the last 24 bits of an IPv6 unicast
or anycast address.

Interface identifier in IEEE EUI-64 format


Interface identifiers in IPv6 unicast addresses are used to identify interfaces on a link and they are required to be
unique on that link. Interface identifiers in IPv6 unicast addresses are currently required to be 64 bits long. An
interface identifier in Institute of Electrical and Electronics Engineers (IEEE) EUI-64 format is derived from the link-layer
address of that interface. While, interface identifiers in IPv6 addresses are 64 bits long, MAC addresses are 48 bits
long. Therefore, the hexadecimal number FFFE needs to be inserted in the middle of MAC addresses (behind the
24 high-order bits). To ensure that the interface identifier obtained from a MAC address is unique, it is necessary to
set the universal/local (U/L) bit (the seventh high-order bit) to 1. Thus, an interface identifier in IEEE EUI-64 format
is obtained.
Figure 2: Convert a MAC address into an EUI-64 address
MAC address:

0012-3400-ABCD

Represented in binary:

Insert FFFE:

Set U/L bit:

0000000000010010

0000001000010010

0000000000010010

0011010000000000

1010101111001101

0011010011111111

1111111000000000

1010101111001101

0011010011111111

EUI-64 address:

1111111000000000

1010101111001101

0212 :34FF:FE00:ABCD

Introduction to IPv6 Neighbor Discovery Protocol


IPv6 Neighbor Discovery Protocol (NDP) uses five types of ICMPv6 messages to implement the
following functions:

Address resolution
Neighbor reachability detection
Duplicate address detection
Router/prefix discovery and address autoconfiguration
Redirection
Table 3 lists the types and functions of ICMPv6 messages used by the NDP.

Table 3: Types and functions of ICMPv6 messages

ICMPv6 message

Number

Function
Used to acquire the link-layer address of a neighbor

Neighbor
solicitation (NS)
message

135

Neighbor
advertisement (NA)
message

136

Router solicitation
(RS) message

133

After started, a node sends an RS message to request the router for an address prefix

Router
advertisement (RA)
message

134

Used to respond to an RS message

Redirect message

137

Used to verify whether the neighbor is reachable


Used to perform a duplicate address detection
Used to respond to an NS message
When the link layer changes, the local node initiates an NA message to notify neighbor

nodes of the node information change.

and other configuration information for the purpose of autoconfiguration.

With the RA message suppression disabled, the router regularly sends an RA message

containing information such as prefix information options and flag bits.

When a certain condition is satisfied, the default gateway sends a redirect message to

the source host so that the host can reselect a correct next hop router to forward packets.

The NDP mainly provides the following functions:

Address resolution
Similar to the ARP function in IPv4, a node acquires the link-layer addresses of neighbor nodes on the same link
through NS and NA messages. Figure 3 shows how node A acquires the link-layer address of node B.

Figure 3: Address resolution

Host A

Host B

ICMP type = 135 NS


Src = A
Dst = solicited-node multicast address of B
Data = link layer address of A
NA ICMP type = 136
Src = B
Dst = A
Data = link layer address of B

The address resolution procedure is as follows:


1. Node A multicasts an NS message. The source address of the NS message is the IPv6 address of an interface of
node A and the destination address is the solicited-node multicast address of node B. The NS message contains
the link-layer address of node A.
2. After receiving the NS message, node B judges whether the destination address of the packet corresponds to the
solicited-node multicast address. If yes, node B unicasts an NA message containing its link-layer address.
3. Node A acquires the link-layer address of node B from the NA message.

Neighbor reachability detection


After node A acquires the link-layer address of its neighbor node B, node A can verify whether node B is
reachable according to NS and NA messages.
1. Node A sends an NS message whose destination address is the IPv6 address of node B.
2. If node A receives an NA message from node B, node A considers that node B is reachable. Otherwise, node B
is unreachable.

Duplicate address detection


After node A acquires an IPv6 address, it will perform duplicate address detection (DAD) to determine whether the
address is being used by other nodes (similar to the gratuitous ARP function of IPv4). DAD is accomplished through
NS and NA messages. Figure 4 shows the DAD procedure.

Figure 4: Duplicate address detection

Host A

Host B

ICMP type = 135 NS


Src = ::
Dst = FF02::1:FF00:1
Data = 2000::1
NA ICMP type = 136
Src = 2000::1
Dst = FF02::1
Target address = 2000::1

The DAD procedure is as follows:


1. Node A sends an NS message whose source address is the unassigned address :: and destination address is the
corresponding solicited-node multicast address of the IPv6 address to be detected. The NS message contains the
IPv6 address.
2. If node B uses this IPv6 address, node B returns an NA message. The NA message contains the IPv6 address
of node B.
3. Node A learns that the IPv6 address is being used by node B after receiving the NA message from node B.
Otherwise, node B is not using the IPv6 address and node A can use it.

Router/prefix discovery and address autoconfiguration


Router/prefix discovery means that a node locates the neighboring routers, and learns the prefix of the network
where the host is located, and other configuration parameters from the received RA message. Stateless address
autoconfiguration means that a node automatically configures an IPv6 address according to the information obtained
through router/prefix discovery.
The router/prefix discovery is implemented through RS and RA messages. The router/prefix discovery procedure is
as follows:
1. After started, a node sends an RS message to request the router for the address prefix and other configuration
information for the purpose of autoconfiguration.
2. The router returns an RA message containing information such as prefix information option. (The router also
regularly sends an RA message.)
3. The node automatically configures an IPv6 address and other information for its interface according to the
address prefix and other configuration parameters in the RA message.

ffi Note:
In addition to an address prefix, the prefix information option also contains
the preferred lifetime and valid lifetime of the address prefix. After receiving
a periodic RA message, the node updates the preferred lifetime and valid
lifetime of the address prefix accordingly.
An automatically generated address is applicable within the valid lifetime
and will be removed when the valid lifetime times out.

Redirection
When a host is started, its routing table may contain only the default route to the gateway. When certain conditions
are satisfied, the gateway sends an ICMPv6 redirect message to the source host so that the host can select a better
next hop to forward packets (similar to the ICMP redirection function in IPv4).
The gateway will send an IPv6 ICMP redirect message when the following conditions are satisfied:

The receiving interface is the forwarding interface.


The selected route itself is not created or modified by an IPv6 ICMP redirect message.
The selected route is not the default route.
The forwarded IPv6 packet does not contain any routing header.

IPv6 PMTU Discovery


The links that a packet passes from the source to the destination may have different maximum transmission units
(MTUs). In IPv6, when the packet size exceeds the link MTU, the packet will be fragmented at the source end, so as to
reduce the processing pressure of the forwarding device and utilize network resources rationally.
The path MTU (PMTU) discovery mechanism is to find the minimum MTU of all links in the path from the source to the
destination. Figure 5 shows the working procedure of the PMTU discovery.

Figure 5: Working procedure of the PMTU discovery

MTU = 1500

Source

MTU = 1500

MTU = 1350

MTU = 1400

Packet with MTU = 1500


ICMP error: packet too big ;
use MTU = 1350
Packet with MTU = 1350
Packet received

The working procedure of the PMTU discovery is as follows:


1. The source host uses its MTU to fragment packets and then sends them to the destination host.
2. If the MTU supported by the forwarding interface is less than the packet size, the forwarding device will discard
the packet and return an ICMPv6 error packet containing the interface MTU to the source host.
3. After receiving the ICMPv6 error packet, the source host uses the returned MTU to fragment the packet again and
then sends it.
4. Step 2 to step 3 are repeated until the destination host receives the packet. In this way, the minimum MTU of all
links in the path from the source host to the destination host is determined.

Introduction to IPv6 DNS


In the IPv6 network, a Domain Name System (DNS) supporting IPv6 converts domain names into IPv6 addresses,
instead of IPv4 addresses.
However, just like an IPv4 DNS, an IPv6 DNS also covers static domain name resolution and dynamic domain name
resolution. The function and implementation of these two types of domain name resolution are the same as those of an
IPv4 DNS.
Usually, the DNS server connecting IPv4 and IPv6 networks not only contain A records (IPv4 addresses), but also
AAAA records (IPv6 addresses). The DNS server can convert domain names into IPv4 addresses or IPv6 addresses. In
this way, the DNS server implements the functions of both IPv6 DNS and IPv4 DNS.

Protocols and standards


Protocols and standards related to IPv6 include:

RFC 1881: IPv6 Address Allocation Management


RFC 1887: An Architecture for IPv6 Unicast Address Allocation
RFC 1981: Path MTU Discovery for IP version 6
RFC 2375: IPv6 Multicast Address Assignments
RFC 2460: Internet Protocol, Version 6 (IPv6) Specification
RFC 2461: Neighbor Discovery for IP Version 6 (IPv6)
RFC 2462: IPv6 Stateless Address Autoconfiguration
RFC 2463: Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification
RFC 2464: Transmission of IPv6 Packets over Ethernet Networks
RFC 2526: Reserved IPv6 Subnet Anycast Addresses
RFC 3307: Allocation Guidelines for IPv6 Multicast Addresses
RFC 3513: Internet Protocol Version 6 (IPv6) Addressing Architecture
RFC 3596: DNS Extensions to Support IP Version 6
Leverage the new generation IPv6 to increase your IP address size from the 32 bits, supported by legacy IPv4, to a
much more scalable 128 bits. Visit: www.hp.com/networking

Copyright 2011 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. The
only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services.
Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or
omissions contained herein.
4AA3-5764ENW, Created August 2011

You might also like