Linux Kernel Architecture

(Jacob Rumans) #1

Chapter 12: Networks


Overview and Innovations


In 1998 a new standard named IPv6 was defined^23 and is now supported by the Linux kernel in produc-
tion quality. A full implementation of the protocol is located in thenet/ipv6directory. The modular and
open structure of the network layer means that IPv6 can make use of the existing, mature infrastructure.
As many aspects of IPv6 are similar to IPv4, a brief overview will suffice at this point.

A key change in IPv6 is a completely new packet format that uses 128-byte IP addresses, and is therefore
easier and faster to process. The structure of an IPv6 packet is shown in Figure 12-21.

Version Traffic Class Flow Label
Payload length Next Header Hop Limit

Source address

Destination address

Payload

Figure 12-21: Structure of an IPv6 packet.

The structure is much simpler than that in IPv4. There are only eight header fields instead of 14. Of
particular note is the absence of the fragmentation field. Although IPv6 also supports the splitting of
packet data into smaller units, the corresponding information is held in an extension header pointed to
by thenext headerfield. Support for a variable number of extension headers makes it easier to introduce
new features.

The changes between IPv4 and IPv6 have also necessitated modification of the interface via which con-
nections are programmed. Although sockets are still used, many old and familiar functions appear under
a new name to support the new options. However, this is a problem faced by userspace and C libraries
and will be ignored here.

The notation of IP addresses has also changed because of the increase in address length from 32
to 128 bits. Retaining the former notation (tuples of bytes) would have resulted in extremely long
addresses. Preference was therefore given to hexadecimal notation for IPv6 addresses, for example,
FEDC:BA98:7654:3210:FEDC:BA98:7654:3210and1080:0:0:0:8:800:200C:417A. A mixture of IPv4
and IPv6 formats resulting in addresses such as0:0:0:0:0:FFFF:129.144.52.38is also permitted.

Implementation


What route does an IPv6 packet take when it traverses the network layer? On the lower layers, there
is no change as compared with IPv4 because the mechanisms used are independent of the higher-level

(^23) It couldn’t be called IPv5 because the name had already been used to designate the STP protocol, which was defined in an RFC
but never filtered through to a wide public.

Free download pdf