oreilly.comSafari Books Online.Conferences.


Enabling IPv6 in Linux

by Ibrahim Haddad

Most of today's Internet uses IPv4, or Internet Protocol version 4, which has proven to be robust, easily implemented and interoperable, and has stood the test of scaling to the size of today's Internet by using different mechanisms such as NAT. However, the initial design of IPv4 did not take into consideration several issues that are of importance today and suffers from problems in various areas: address space limitations, inefficient routing, lack of support for security, lack of autoconfiguration, lack of QoS support, and poor mobility support.

The Internet Engineering Task Force (IETF) had two options. The first option was to fix IPv4 and risk the continued degradation of the Internet model, which would lead to more complex and volatile network services, lower performance, and less robust, less secure, and less manageable networks.

The second option was to replace IPv4 with a newer version and enable simple and stable network services, higher performance, and more robust, secure, and manageable networks. They wanted to avoid doing changes now to IPv4 and then repeat the same exercise a few years later on. Therefore, they made the decision to design a new protocol. As a result, the IETF defined IPv6 to fix the problems in IPv4 and to add many improvements for future networks.

The design philosophy of IPv6 is a scalable protocol that provides a large address space with a simple structure, an original end-to-end environment, a NAT-free network, fast processing, and many features needed by current and future applications. Migrating from IPv4 to IPv6, and IPv6 deployment should not be expensive. IPv6 should inter-operate with IPv4 and provide tools and mechanisms needed by hosts running different IP versions to communicate with each other, and to enable applications to work with both IP versions.

IPv6 Features

IPv6 was designed with enhanced features compared to IPv4. Its major features are:

Large Address Space

IPv6 provides a 128-bit address field. This extended address space is very essential, as IP addresses will be assigned to mobile phones, home appliances, motor vehicles, and other equipment. In addition, with such a huge address space, we can create multi-level hierarchies of addresses, simplifying routing problems — requiring simpler routing algorithms and less space needed for routing tables.

New Types of Addresses

IPv6 introduces the concept of scoped addresses and defines three types of addresses: unicast (global, link local, site local), multicast, and anycast.

  • An IPv6 unicast address identifies a single interface. A packet sent to a unicast address is delivered to the interface identified by that address. Three types of unicast addresses exist:

    1. A global unicast address is used for point-to-point communication.

    2. A link local unicast address allows packets to traverse on only one link or segment. Routers will not forward packets with link local unicast addresses.

    3. A site local unicast address limits the scope of packet delivery to your intranet. The edge router connecting your internal network to the external network will not forward packets with site local unicast addresses to the external network.

  • An IPv6 multicast address delivers copies of one source packet to recipients. In the IPv6 multicast address, you can specify multicast scope, which can be node-local, link-local, site-local, or global.

  • An IPv6 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. Anycast differs from multicast in that it delivers a message to any one of the nodes in a group. When one node — often the nearest node in the group — receives the message, anycast is finished.


IPv6 provides hosts with the ability to configure themselves automatically without the use of a stateful configuration protocol. A host can also use router discovery to determine the addresses of routers, additional addresses, and other configuration parameters. This feature allows hosts to discover automatically all the information they need to connect to the Internet, without any human intervention.

New Streamlined Header Format

IPv6 has a new 40-bytes header (as shown in Figure 1) with the following fields:

  • Version, 4 bits that identify the version of the Internet Protocol.
  • Traffic class, 8 bits that identify different classes or priorities.
  • Flow label, 20 bits used by a source node to identify packets that belong to the same flow.
  • Payload length, 16 bits containing the length of the IPv6 payload.
  • Next header, 8 bits that indicate to the router which extension header to expect next. If there are no more extension headers, the next header field indicates the upper layer header.
  • Hop limit, indicating the maximum number of hops allowed.
  • Source address, 128 bits containing the address of the source node sending the packet.
  • Destination address, 128 bits containing the final destination node address for the packet.

IPv6 Header
Figure 1. The IPv6 header.

In addition, IPv6 is much more flexible in its support of options through extension headers. Extension headers encode optional Internet-layer information. They are placed between the IPv6 header and the upper layer header in a packet and are chained together using the next header field in the IPv6 header. There are six different extension headers: Hop-by-hop Options, Destination Options, Routing, Fragment, Authentication, and Encapsulated Security. The next header field indicates to the router which extension header to expect next. If there are no more extension headers, the next header field indicates the upper-layer header (TCP header, UDP header, ICMPv6 header, an encapsulated IP packet, or other items).

Better Network Management

IPv6 provides enhancements that allow better network management such as network renumbering, which make it simpler to move a whole network to a new ISP by reconfiguring the router with the new routing prefix from the new ISP.

Improved Mobility Support

Mobility support in IPv6 allows transparent routing of IPv6 packets to mobile nodes, taking advantage of the design of a new version of IP.

Support for IPsec

The IETF has mandated support for Internet Protocol Security (Ipsec) with IPv6 so it will not be an optional extension, as was the case with IPv4.


The IETF has specified two approaches, integrated services and differentiated services, to provide guaranteed and selectable Quality of Service (QoS) over the Internet. In addition, IPv6 provides flow labels that can be used to provide QoS by identifying the packets as belonging to a flow. These labels can be used in conjunction with a hop-by-hop routing extension header (allowing predefined routes) and the priority field (allowing for QoS). The flow label also serves as a key in the router cache to reduce the amount of processing. When a router first receives a datagram, it can cache the flow label and next hop so as to save time when the next datagram arrives with the same flow label. This technique reduces router processing time considerably.

As a result, IPv6 is feature-rich, fixing many of the problems of IPv4 and adding much new functionality. To read more on these features, please refer to my IPv6 Essentials article.

Pages: 1, 2

Next Pagearrow

Linux Online Certification

Linux/Unix System Administration Certificate Series
Linux/Unix System Administration Certificate Series — This course series targets both beginning and intermediate Linux/Unix users who want to acquire advanced system administration skills, and to back those skills up with a Certificate from the University of Illinois Office of Continuing Education.

Enroll today!

Linux Resources
  • Linux Online
  • The Linux FAQ
  • Linux Kernel Archives
  • Kernel Traffic

  • Sponsored by: