Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Tutorial on IPv6
By
Bhuvaneswaran Vengainathan
In the mid of 1970s an effort has been made to develop an “integrated services” network
which can provide both voice services as well as data communication services. As a
result ATM network and IP network had been established. Both networks are based on
packet-switching. ATM is a connection oriented service and IP is a connectionless
service. Connection oriented service introduces complexity in the routers, whereas
connectionless service keeps the operation within the network simple and puts the
complexity to the edge of the network. Because of IP's simplicity, all networks (LAN,
WAN etc.) were built based on IP. IP refers to IPv4 (Internet Protocol Version 4). IPv4
provides a best-effort service which makes every effort to deliver the packet successfully
to the destination. When packets are lost due to congestion it does not take any action.
IPv4 uses a limited address space to address the nodes in very large networks. To
overcome some of the drawbacks in the existing IP, a new version of IP has been
introduced. The new version of IP is called IPv6 (Internet Protocol version 6), the Next
Generation Protocol.
This document addresses the features of IPv6 as compared to IPv4, the IPv6 header
format, the formation of IPv6 addresses, the types of IPv6 addresses and the Extension
headers of IPv6.
The changes from IPv4 to IPv6 primarily into the following categories:
• Expanded Addressing Capabilities
IPv6 has 128 bits (16 – bytes) Source and Destination IP Addresses. This is a
change from 32 bits (4 - bytes) IP address to 128 bits IP address. The change is to
address a much greater number of nodes. New type of address is included in IPv6
called an “anycast address”, in which packets addressed to anycast address is
delivered to a single interface (the nearest that is identified by the address).
Source Address
Destination Address
• Flow Label: 20-bit flow label field. This field may be used by the sender to
label a sequence of packets for which the sender desires special handling by
intervening routers, such as real-time service (voice). There may be multiple
active flows from a source to a destination. The flow is uniquely identified by
the combination of a source address and a non-zero flow label. For default
router handling, the field is set to 0.
• Payload Length: 16-bit Payload Length field. This specifies the length of the
IPv6 payload (including extension headers if any) following the basic IPv6
header. The maximum value in this field is 65,535.
• Next Header: 8-bit Next Header field. Indicates the type of the extension
header (if present) or the protocol (such as TCP, UDP or ICMPv6) following
the IPv6 header.
• Hop Limit: 8-bit Hop Limit field. Indicates the maximum number of hops that
a packet can take before being discarded. The maximum value in this field is
255. The value gets decremented by 1 by each node that forwards the packet.
The packet is discarded if the Hop Limit is decremented to zero. This field is
same as that of the Time to Live (TTL) field in IPv4 header.
• Source Address: 128-bit Source Address field. IPv6 address of the originating
host.
• Destination Address: 128-bit Destination Address field. IPv6 address of the
intended recipient of the packet. In most cases the Destination Address is set
to the ultimate Destination Address. If the Routing header is present, the
Destination Address is set to the next router interface in the source route
address list.
3. IPv6 Addresses
IPv6 addresses are 128 bits long, which is four times larger than an IPv4 address.
There are no address classes in IPv6, as we have with IPv4 but the high-order bits of
the128-bit address specifies the type of address.
4
IPv4 addresses are written in dotted decimal notation, where the decimal values are
separated by dots (e.g. 192.168.9.18). The same way IPv6 addresses are written as
eight 16-bits hexadecimal numbers, separated by colons (:)
(e.g. 3ffe:3f2b:f101:f201:4fbc:f201:f3b1:9c5a).
Network prefixes can also be represented by specifying a slash and the number of bits
specify the network (e.g. 3ffe:3f2b:: /8).
These high-order bits are called the format prefix. For example, if high-order 10 bits
are 1111111010, it is a Link Local Use Address.
S1 R1
S2 S3
Figure 5.1: Unicast
• Anycast
An Anycast address identifies multiple interfaces. A packet sent to
an anycast address is delivered to any one of the interfaces identified by that
address (typically the nearest one in terms of routing distance).
S1 R1 R2
Anycast Group
S4
Figure 5.2: Anycast
• Multicast
A Multicast address identifies multiple interfaces. A packet sent
to a multicast address is delivered to all interfaces identified by that address.
S1 R1
S2 S3 S4
Multicast Group
Figure 5.3: Multicast
The Interface Identifier is then formed from the EUI-64 by complementing the
“Universal/Local” (U/L) bit. For example:
Ethernet built-in address is 24-0B-2B-5D-6A-77 would be
26-0B-2B-FF-FE-5D-6A-77
1111111010 0 Interface ID
10-bits n-bits (118-n) bits
7
• Flags: Flags are 4 bits long. The high-order 3 bits are reserved and set to
0. The fourth bit is called as T flag. When T flag set to 0, indicates a
permanently assigned multicast address (well-known). When T flag set to
1, indicates a non- permanently assigned multicast address (transient).
• Scope: Scope is a 4 bit value used to limit the scope of the multicast
group.
8
• Group ID: Group ID is 112 bits long. Group ID identifies the multicast
group.
Scope field values from RFC 1884
Value Scope
0 Reserved
1 Node-Local Scope
2 Link-Local Scope
3 Unassigned
4 Unassigned
5 Site-Local Scope
6 Unassigned
7 Unassigned
8 Organizational-Local Scope
9 Unassigned
A Unassigned
B Unassigned
C Unassigned
D Unassigned
E Global Scope
F Reserved
To query the network nodes efficiently during address resolution, Solicited Node
Address is used. The Address format is FF02:0:0:0:1:FFXX:XXXX, where X’s
are the low-order 24 bits of address (unicast or anycast).
9
Extension headers are processed or examined only by the node identified by the
destination address field of the IPv6 header. One exception is the Hop-by-Hop
Options header that must be examined by every node along packet’s delivery
path.
• Next Header: Next Header is 8-bit long. Identifies the type of the header
immediately following the Hop-by-Hop Options header.
• Hdr Ext Len: Hdr Ext Len is 8-bit long. Specifies the length of Hop-by-
Hop Options header in 8-octet units.
• Options: Three Options for Hop-by-Hop Options header are defined here.
o Pad1 Option
o PadN Option
o Router Alert
Pad1 Option is used to insert one octet of padding into Options area of a header.
0 (8-bits)
10
PadN Option is used to insert two or more octets of padding into Options area of a
header.
For N octets padding, the Option Data Length field contains the value N-2, which
is of zero valued octets.
Router Alert Options are used in situations where an IPv6 packet addressed to
particular destination contains information for special processing by routers along
the path.
Reserved
Address [1]
Address [n]
• Next Header: 8-bit Next Header field. Identifies the type of the header
immediately following the Routing header.
• Hdr Ext Len: 8-bit Hdr Ext Len. Specifies the length of Routing header in
8-octet units. The value of Hdr Ext Len is equal to two times the number
of addresses in source address list of the header. For example, if the
number of addresses is 2 then the value in the Hdr Ext Len will be 4.
• Routing Type: 8-bit Routing Type. The value is 0.
• Segments Left: 8-bit Segments Left. Specifies the number of nodes still to
be visited before reaching the final destination.
• Reserved: 32-bit Reserved field. Initialized to zero on transmission and
ignored on reception.
• Address[1 ..n]: Each Address is 128 bit long. It is the intermediate nodes
addresses that are to be visited on the way to packet’s final destination.
11
Src Address = S
Dest Address = R1 Src Address = S
Segments left = 2 Dest Address = D
Route Addr [1] = R2 Segments Left = 0
Route Addr [2] = D Route Addr [1] = R1
Route Addr [2] = R2
S R1 R2
Src Address = S D
Dest Address = R2 Src Address = S
Segments Left = 1 Dest Address = D
Route Addr [1] = R1 Segments Left = 0
Route Addr [2] = D Route Addr [1] = R1
Route Addr [2] = R2
Identification
• Next Header: 8-bit Next Header field. Identifies the type of the header
immediately following the Fragmentable part of the original header.
• Reserved: 8-bit Reserved field. Initialized to zero on transmission and
ignored on reception.
• Fragment Offset: 13-bit Fragment Offset field. It is relative to the start of
the Fragmentable part of the original packet. The fragment offset value of
the first fragment is 0. The fragment offset value is represented in 8 octet
units
• Res: 2-bit Reserved field. Initialized to zero on transmission and ignored
on reception.
• M flag: 1=more fragments; 0 = last fragment.
• Identification: 32 bit Identification field. A node, on fragmenting an IPv6
packet, generates same identification value for all its fragments.
12
Unfragmentable Data
Path MTU = 1280 Part
References