BUY THIS BOOK

Safari Books Online

What is this?

Looking to Reprint this content?


IPv6 Essentials
IPv6 Essentials

By Silvia Hagen

Cover | Table of Contents | Colophon


Table of Contents

Chapter 1: IPv6 Versus IPv4
IPv6 is sometimes called the Next Generation Internet Protocol, or IPng. Even though the Internet is seen as a relatively new technology, the protocols and technologies that make it work were developed in the 1970s and 1980s. The current Internet and all our corporate and private intranets use IPv4. Now, with IPv6, the first major upgrade of the Internet protocol suite is on the horizon or maybe even closer. Close enough, anyway, to start taking it seriously.
The effort to develop a successor protocol to IPv4 was started in the early 1990s by the Internet Engineering Task Force (IETF). Several parallel efforts began simultaneously, all trying to solve the foreseen address space limitation as well as provide additional functionality. The IETF started the IPng area in 1993 to investigate the different proposals and to make recommendations for further procedures.
The IPng area directors of the IETF recommended the creation of IPv6 at the Toronto IETF meeting in 1994. Their recommendation is specified in RFC 1752, "The Recommendation for the IP Next Generation Protocol." The Directors formed an Address Lifetime Expectation (ALE) working group, whose job was to determine whether the expected lifetime for IPv4 would allow the development of a protocol with new functionality or if the remaining time would only allow for developing an address space solution. In 1994, the ALE working group projected the IPv4 address exhaustion to occur sometime between 2005 and 2011, based on the statistics that were available at that time.
For those of you who are interested in the different proposals, here's some more information about it (from RFC 1752). There were four main proposals called CNAT, IP Encaps, Nimrod, and Simple CLNP. Three more proposals followed: the P Internet Protocol (PIP), the Simple Internet Protocol (SIP), and TP/IX. After the March 1992 San Diego IETF meeting, Simple CLNP evolved into TCP and UDP with Bigger Addresses (TUBA) and IP Encaps evolved into IP Address Encapsulation (IPAE). IPAE merged with PIP and SIP and called itself Simple Internet Protocol Plus (SIPP). The TP/IX working group changed its name to Common Architecture for the Internet (CATNIP). The main proposals were now CATNIP, TUBA, and SIPP. For a short discussion of the proposals, refer to RFC 1752.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
The History of IPv6
The effort to develop a successor protocol to IPv4 was started in the early 1990s by the Internet Engineering Task Force (IETF). Several parallel efforts began simultaneously, all trying to solve the foreseen address space limitation as well as provide additional functionality. The IETF started the IPng area in 1993 to investigate the different proposals and to make recommendations for further procedures.
The IPng area directors of the IETF recommended the creation of IPv6 at the Toronto IETF meeting in 1994. Their recommendation is specified in RFC 1752, "The Recommendation for the IP Next Generation Protocol." The Directors formed an Address Lifetime Expectation (ALE) working group, whose job was to determine whether the expected lifetime for IPv4 would allow the development of a protocol with new functionality or if the remaining time would only allow for developing an address space solution. In 1994, the ALE working group projected the IPv4 address exhaustion to occur sometime between 2005 and 2011, based on the statistics that were available at that time.
For those of you who are interested in the different proposals, here's some more information about it (from RFC 1752). There were four main proposals called CNAT, IP Encaps, Nimrod, and Simple CLNP. Three more proposals followed: the P Internet Protocol (PIP), the Simple Internet Protocol (SIP), and TP/IX. After the March 1992 San Diego IETF meeting, Simple CLNP evolved into TCP and UDP with Bigger Addresses (TUBA) and IP Encaps evolved into IP Address Encapsulation (IPAE). IPAE merged with PIP and SIP and called itself Simple Internet Protocol Plus (SIPP). The TP/IX working group changed its name to Common Architecture for the Internet (CATNIP). The main proposals were now CATNIP, TUBA, and SIPP. For a short discussion of the proposals, refer to RFC 1752.
CATNIP is specified in RFC 1707, TUBA in RFC 1347, RFC 1526, and RFC 1561, and SIPP in RFC 1710.
The Internet Engineering Steering Group approved the IPv6 recommendation and drafted a Proposed Standard on November 17, 1994. The core set of IPv6 protocols became an IETF Draft Standard on August 10, 1998.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Overview of Functionality
IPv6 is one of the most significant network and technology upgrades in history. It will slowly grow into your existing IPv4 infrastructure and positively impact your network. Reading this book will prepare you for the next step of networking technology evolution. IPv6 product development and implementation efforts are already underway all over the world. IPv6 is designed as an evolutionary step from IPv4. It is a natural increment to IPv4, can be installed as a normal software upgrade in most Internet devices, and is interoperable with the current IPv4. IPv6 is designed to run well on high performance networks like Gigabit Ethernet, ATM, and others, as well as low bandwidth networks (e.g., wireless). In addition, it provides a platform for new Internet functionality that will be required in the near future, such as extended addressing, better security, and quality of service (QoS) features.
IPv6 includes transition and interoperability mechanisms that are designed to allow users to adopt and deploy IPv6 step by step as needed and to provide direct interoperability between IPv4 and IPv6 hosts. The transition to a new version of the Internet Protocol (IP) must be incremental, with few or no critical interdependencies, if it is to succeed. The IPv6 transition allows users to upgrade their hosts to IPv6 and network operators to deploy IPv6 in routers with very little coordination between the two groups.
The main changes from IPv4 to IPv6 can be summarized as follows:
Expanded addressing capability and autoconfiguration mechanisms
The address size for IPv6 has been increased to 128 bits. This solves the problem of the limited address space of IPv4 and offers a deeper addressing hierarchy and simpler configuration. There will come a day when you will hardly remember how it felt to have only 32 bits in an IP address. Network administrators will love the autoconfiguration mechanisms built into the protocol. Multicast routing has been improved, with the multicast address being extended by a scope field. And a new address type has been introduced, called Anycast address, which can send a message to the nearest single member of a group.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Transition Aspects
Is IPv6 worth all the migration and upgrade headaches? Will it ever become the IP of the future? Can't IPv4 extensions offer all that functionality? After all, we have Network Address Translation (NAT) to solve address space problems and IPSEC to provide security.
The 128-bit address space is the most obvious feature of the new protocol, but it is not the only important change. The IPv6 package includes important features such as higher scalability, better data integrity, QoS features, autoconfiguration mechanisms that make it manageable even for high numbers of dynamically connecting devices, improved routing aggregation in the backbone, and improved multicast routing.
Extensions for IPv4 that have been widely deployed, such as NAT, should be viewed as good solutions but only for limited short-term scenarios. In the long term, nothing can replace IPv6's features for inherent secure end-to-end connectivity. Multimedia and interactive, transaction-oriented network applications require high levels of connectivity that can only be provided by IPv6. In the future, an unforeseeable number of new devices may want to connect to our networks, including devices such as Personal Digital Assistants (PDAs), mobile phones, smart set-top boxes with integrated web browsers, home entertainment systems, coffee machines, refrigerators, and car devices. The list is endless. Only IPv6, with its extended address space and advanced autoconfiguration and mobility features, can manage such devices. There is no comparable alternative technology in sight.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
IPv6 Alive
There are already a surprising number of global test networks and even commercial networks running over IPv6. I discuss some interesting examples in the next sections. In order to describe what they are doing, I use some IPv6-specific terms that are probably not familiar to you yet. They are all explained in this book.
In February 2002 over 120 production networks have been allocated IPv6 address prefixes. For a current list, refer to http://www.dfn.de/service/ipv6/ipv6aggis.html.
The 6Bone started out as a network of IPv6 islands working over the existing IPv4 infrastructure of the Internet by tunneling IPv6 packets in IPv4 packets. The tunnels were mainly statically configured point-to-point links. The 6Bone became a reality in early 1996 as a result of an initiative of several research institutes. The first tunnels were established between the IPv6 laboratories of G6 in France, UNI-C in Denmark, and WIDE in Japan.

Section 1.4.1.1: Structure of the 6Bone

The 6Bone is structured as a hierarchical network of two or more layers. The top layer consists of a set of backbone transit providers, called pseudo Top Level Aggregators (pTLAs), which use BGP4+ as a routing protocol. The bottom layer is comprised of leaf sites connected via the 6Bone. Zero or more intermediate layers, called pseudo Next Level Aggregators (pNLAs), interconnect leaf sites and the pTLA backbone networks.

Section 1.4.1.2: Addressing

IPv6 unicast addressing of node interfaces (for both end systems and routers) is based on RFC 2374, which covers the Aggregatable Global Unicast address format. 6Bone backbone networks play the role of experimental TLAs, called pseudo TLAs (pTLAs), and assign address space to pseudo NLAs (pNLAs) and leaf sites. The prefix assigned to the 6Bone is
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 2: The Structure of the IPv6 Protocol
This chapter explains the structure of the IPv6 header and compares it to the IPv4 header. It also discusses Extension headers, which are new in IPv6.
The header structure of an IPv6 packet is specified in RFC 2460. The header has a fixed length of 40 bytes. The two fields for source and destination addresses each use 16 bytes (128 bits), so there are only 8 bytes for general header information.
In IPv6, five fields from the IPv4 header have been removed:
  • Header Length
  • Identification
  • Flags
  • Fragment Offset
  • Header Checksum
The Header Length field was removed because it is not needed in a header with a fixed length. In IPv4 the minimum header length is 20 bytes, but if options are added, it can be extended in 4-byte increments up to 60 bytes. Therefore, with IPv4, the information about the total length of the header is important. In IPv6 options are defined by Extension headers (covered later in this chapter).
The Identification field, the Flags field, and the Fragment Offset field handle fragmentation of a packet in the IPv4 header. Fragmentation happens if a large packet has to be sent over a network that only supports smaller packet sizes. In that case, the IPv4 router splits the packet into smaller slices and forwards multiple packets. The destination host collects the packets and reassembles them. If only one packet is missing or has an error, the whole transmission has to be redone; this is very inefficient. In IPv6, a host learns the Path Maximum Transmission Unit (MTU) size through a procedure called Path MTU Discovery. If a sending IPv6 host wants to fragment a packet, it will use an Extension header to do so. IPv6 routers along the path of a packet do not provide fragmentation, as they did with IPv4. So the Identification, Flags, and Fragment Offset fields were removed from the IPv6 header and will be inserted as an Extension header, if needed. Extension headers are explained later in this chapter.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
General Header Structure
In IPv6, five fields from the IPv4 header have been removed:
  • Header Length
  • Identification
  • Flags
  • Fragment Offset
  • Header Checksum
The Header Length field was removed because it is not needed in a header with a fixed length. In IPv4 the minimum header length is 20 bytes, but if options are added, it can be extended in 4-byte increments up to 60 bytes. Therefore, with IPv4, the information about the total length of the header is important. In IPv6 options are defined by Extension headers (covered later in this chapter).
The Identification field, the Flags field, and the Fragment Offset field handle fragmentation of a packet in the IPv4 header. Fragmentation happens if a large packet has to be sent over a network that only supports smaller packet sizes. In that case, the IPv4 router splits the packet into smaller slices and forwards multiple packets. The destination host collects the packets and reassembles them. If only one packet is missing or has an error, the whole transmission has to be redone; this is very inefficient. In IPv6, a host learns the Path Maximum Transmission Unit (MTU) size through a procedure called Path MTU Discovery. If a sending IPv6 host wants to fragment a packet, it will use an Extension header to do so. IPv6 routers along the path of a packet do not provide fragmentation, as they did with IPv4. So the Identification, Flags, and Fragment Offset fields were removed from the IPv6 header and will be inserted as an Extension header, if needed. Extension headers are explained later in this chapter.
Path MTU Discovery is explained in Chapter 4.
The Header Checksum field was removed to improve processing speed. If routers do not have to check and update checksums, processing becomes much faster. Checksumming is done at the media access level, too, and the risk for undetected errors and misrouted packets is minimal. There is a checksum field at the transport layer (UDP and TCP). IP is a best-effort delivery protocol; it is the responsibility of upper layer protocols to insure integrity.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
The Fields in the IPv6 Header
By becoming familiar with the fields of the IPv6 header, you will better understand how IPv6 works.
For a detailed description of all the fields in an IPv4 header, refer to Novell's Guide to Troubleshooting TCP/IP (John Wiley & Sons) by Silvia Hagen and Stephanie Lewis.
Figure 2-1 provides an overview of the IPv6 header. The fields are discussed in detail in the following paragraphs.
Figure 2-1: Fields in the IPv6 header
Figure 2-1 shows that even though the header has a total size of 40 bytes, which is twice as long as a default IPv4 header, it has actually been streamlined because most of the header is taken by the two 16-byte IPv6 addresses. That leaves only 8 bytes for other header information.
This is a 4-bit field and contains the version of the protocol. In the case of IPv6, the number is 6. The version number 5 could not be used because it had already been assigned an experimental stream protocol (ST2, RFC 1819).
This field replaces the Type of Service field in IPv4. This field facilitates the handling of real-time data and any other data that requires special handling. This field can be used by sending nodes and forwarding routers to identify and distinguish between different classes or priorities of IPv6 packets.
RFC 2474, "Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers," explains how the Traffic Class field in IPv6 can be used. RFC 2474 uses the term DS Field to refer to the Type of Service field in the IPv4 header, as well as to the Traffic Class field in the IPv6 header.
This field distinguishes packets that require the same treatment, in order to facilitate the handling of real-time traffic. A sending host can label sequences of packets with a set of options. Routers keep track of flows and can process packets belonging to the same flow more efficiently because they do not have to reprocess each packet's header. A flow is uniquely identified by the flow label and the address of the source node. Nodes that do not support the functions of the Flow Label field are required to pass the field unchanged when forwarding a packet and to ignore the field when receiving a packet. All packets belonging to the same flow must have the same source and destination IP address.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Extension Headers
The IPv4 header can be extended from a minimum of 20 bytes to 60 bytes in order to specify options such as Security Options, Source Routing, or Timestamping. This capacity has rarely been used because it causes a performance hit. For example, IPv4 hardware forwarding implementations have to pass the packet containing options to the main processor (software handling).
The simpler a packet header, the faster the processing. IPv6 has a new way to deal with options that has substantially improved processing. It handles options in additional headers called Extension headers.
The current IPv6 specification (RFC 2460) defines six Extension headers:
  • Hop-by-Hop Options header
  • Routing header
  • Fragment header
  • Destination Options header
  • Authentication header
  • Encrypted Security Payload header
There can be zero, one, or more than one Extension header between the IPv6 header and the upper-layer protocol header. Each Extension header is identified by the Next Header field in the preceding header. The Extension headers are examined or processed only by the node identified in the Destination Address field of the IPv6 header. If the address in the Destination Address field is a multicast address, the Extension headers are examined and processed by all the nodes belonging to that multicast group. Extension headers must be strictly processed in the order they appear in the packet header.
There is an exception to the above rule: only the destination node will process an Extension header. If the Extension header is a Hop-by-Hop Options header, the information it carries must be examined and processed by every node along the path of the packet. The Hop-by-Hop Options header, if present, must immediately follow the IPv6 header. It is indicated by the value zero in the Next Header field of the IPv6 header (see Table 2-1, earlier in this chapter).
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 3: IPv6 Addressing
An IPv4 address has 32 bits and is familiar. An IPv6 address has 128 bits and looks wild. Extending the address space was one of the driving reasons to develop IPv6, along with optimization of routing tables, especially on the Internet. This chapter will help you become familiar with the extended address space and will also explain how IPv6 addressing works and why it has been designed the way it is. The IPv6 addressing architecture is defined in RFC 2373, which obsoletes RFC 1884.
IPv4 knows unicast, broadcast, and multicast addresses. With IPv6, the broadcast address is not used anymore; multicast addresses are used instead. This is good news because broadcasts are a problem in most networks. The anycast address, a new type of address introduced with RFC 1546, is now used with IPv6.
An IPv6 address can be classified into one of three categories:
Unicast
A unicast address uniquely identifies an interface of an IPv6 node. A packet sent to a unicast address is delivered to the interface identified by that address.
Multicast
A multicast address identifies a group of IPv6 interfaces. A packet sent to a multicast address is processed by all members of the multicast group.
Anycast
An anycast address is assigned to multiple interfaces (usually on multiple nodes). A packet sent to an anycast address is delivered to only one of these interfaces, usually the nearest one.
IPv6 addresses are assigned to interfaces, as in IPv4, not to nodes, as in OSI, so each interface of a node needs at least one unicast address. A single interface can also be assigned multiple IPv6 addresses of any type (unicast, multicast, anycast). A node can therefore be identified by the address of any of its interfaces. It is also possible to assign one unicast address to multiple interfaces for load-sharing reasons, but if you do this, you need to make sure that the hardware and the drivers support it. With IPv6, all zeros and ones are legal values for any field in an address.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Address Types
IPv4 knows unicast, broadcast, and multicast addresses. With IPv6, the broadcast address is not used anymore; multicast addresses are used instead. This is good news because broadcasts are a problem in most networks. The anycast address, a new type of address introduced with RFC 1546, is now used with IPv6.
An IPv6 address can be classified into one of three categories:
Unicast
A unicast address uniquely identifies an interface of an IPv6 node. A packet sent to a unicast address is delivered to the interface identified by that address.
Multicast
A multicast address identifies a group of IPv6 interfaces. A packet sent to a multicast address is processed by all members of the multicast group.
Anycast
An anycast address is assigned to multiple interfaces (usually on multiple nodes). A packet sent to an anycast address is delivered to only one of these interfaces, usually the nearest one.
IPv6 addresses are assigned to interfaces, as in IPv4, not to nodes, as in OSI, so each interface of a node needs at least one unicast address. A single interface can also be assigned multiple IPv6 addresses of any type (unicast, multicast, anycast). A node can therefore be identified by the address of any of its interfaces. It is also possible to assign one unicast address to multiple interfaces for load-sharing reasons, but if you do this, you need to make sure that the hardware and the drivers support it. With IPv6, all zeros and ones are legal values for any field in an address.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Address Notation
An IPv6 address has 128 bits, or 16 bytes. The address is divided into eight, 16-bit hexidecimal blocks, separated by colons. For example:
FE80:0000:0000:0000:0202:B3FF:FE1E:8329
To make life easier, some abbreviations are possible. For instance, leading zeros in a 16-bit block can be skipped. The example address now looks like:
FE80:0:0:0:202:B3FF:FE1E:8329
A double colon can replace consecutive zeros, or leading or trailing zeros, within the address. If we apply this rule, our address looks as follows:
FE80::202:B3FF:FE1E:8329
Note that the double colon can appear only once in an address. The reason for this rule is that the computer always uses a full 128-bit binary representation of the address, even if the displayed address is simplified. When the computer finds a double colon, it expands it with as many zeros as are needed to get 128 bits. If an address had two double colons, the computer would not know how many zeros to add for each. So the IPv6 address CAFF:CA01:0000:0056:0000:ABCD:EF12:1234 can be represented in the following ways (note the two possible positions for the double colon):
  • CAFF:CA01:0000:0056:0000:ABCD:EF12:1234
  • CAFF:CA01::56:0:ABCD:EF12:1234
  • CAFF:CA01:0:56::ABCD:EF12:1234
In environments where IPv4 and IPv6 nodes are mixed, another convenient form of IPv6 address notation is to put the values of an IPv4 address into the four low-order byte pieces of the address. An IPv4 address of 192.168.0.2 can be represented by x:x:x:x:x:x:192.168.0.2 and an address of 0:0:0:0:0:0:192.168.0.2 can be written as ::192.168.0.2. If you prefer, you can also write ::C0A8:2.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Prefix Notation
The notation for prefixes has also been specified in RFC 2373. A format prefix is the high-order bits of an IP address used to identify the subnet or a specific type of address (refer to Table 3-2). In newer drafts, it is called the global routing prefix. The prefix notation is very similar to the way IPv4 addresses are written in Classless Interdomain Routing (CIDR) notation, and it is also commonly used for subnetted IPv4 addresses. The notation appends the prefix length, written as a number of bits with a slash, which leads to the following format:
IPv6 address/prefix length
The prefix length specifies how many left-most bits of the address specify the prefix. This is another way of noting a subnet mask. Remember, a subnet mask specifies the bits of the IPv4 address that belong to the network ID. The prefix is used to identify the subnet that an interface belongs to and is used by routers for forwarding. The following example explains how the prefix is interpreted. Consider the IPv6 prefix notation 2E78:DA53:12::/40. To understand this address, let's convert the hex into binary as shown in Table 3-1.
Table 3-1: Understanding prefix notation
Hex notation
Binary notation
Number of bits
2E 78
DA 53
12
00101110 01111000
11011010 01010011
00010010
16 bits
16 bits
8 bits, total 40 bits
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Format Prefixes
RFC 2373 lists a number of format prefixes (also called global routing prefixes) that are used to identify special addresses, such as link-local addresses or multicast addresses. Table 3-2 outlines the initial assignment of reserved prefixes. The major part of the address space (over 80 percent) is unassigned, which leaves room for future assignments.
Table 3-2: List of assigned prefixes
Allocation
Prefix binary
Prefix hex
Fraction of address space
Reserved
0000 0000
::0/128
1/256
Reserved for NSAP allocation
Reserved for IPX allocation (deprecated in later draft)
0000 001
0000 010
1/128
1/128
Aggregatable global unicast addresses
001
1/8
Link-local unicast addresses
Site-local unicast addresses
1111 1110 10
1111 1110 11
FE80::/10
FEC0::/10
1/1024
1/1024
Multicast addresses
1111 1111
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Address Privacy
The privacy of autoconfigured IPv6 addresses using the interface identifier is a major issue in the IETF. If an IPv6 address is built using the MAC identifier, your Internet access could be traced because this identifier is unique to your interface. Part of the concern is the result of a misunderstanding. An IPv6 node can have an address based on the interface identifier, but this is not a requirement. As an alternative, the IPv6 device can have an address like the ones currently used with IPv4, static and manually configured or dynamically assigned by a DHCP server. In early 2001, RFC 3041, "Privacy Extensions for Stateless Address Autoconfiguration in IPv6," was published; it introduces a new kind of address, available only in IPv6, that contains a random number in place of the factory-assigned serial number. This address can also change over time. An Internet device that is a target for IP communication—for instance, a web or FTP server—needs a unique and stable IP address. But a host running a browser or an FTP client does not need to have the same address every time it connects to the Internet. With the address architecture in IPv6, you can choose between two types of addresses:
Unique stable IP addresses
Assigned through manual configuration, a DHCP server, or autoconfiguration using the interface identifier
Temporary transient IP addresses
Assigned using a random number in place of the interface identifier
With IPv4, organizations often use IP addresses from the private range, as defined in RFC 1918. The addresses reserved for private use should never be forwarded over Internet routers, but should instead be confined to the organization's network. For connection to the Internet, Network Address Translation (NAT) maps internal private addresses to publicly registered IPv4 addresses.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Aggregatable Global Unicast Address
Aggregatable global unicast addresses are identified by the prefix 001, as shown earlier, in Table 3-2. The initial address specification defined provider-based addresses; the name has been changed to aggregatable global unicast address. The name change reflects the addition of an ISP-independent means of aggregation called exchange-based aggregation .
The prefix is followed by five components, as shown in Figure 3-3.
Figure 3-3: Format of the aggregatable global unicast address
The format prefix 001 is assigned to the aggregatable global unicast address range. The top-level aggregation identifier (TLA) contains the highest level of routing information about the address. Its size of 13 bits limits the number of top-level routes to 8192. In the earlier specification, the TLA was the provider-based identifier. It was assigned to the American Registry for Internet Numbers (ARIN) in North America, Réseau IP Européens (RIPE) Network Coordination Center in Europe, and Asia Pacific Network Information Center (APNIC). With this change in the specification, the commercial touch of the TLA has been removed and the focus is now on routing optimization; the TLA does not need to be a provider. At the core of the Internet, the routing tables need just one route entry per TLA, so the 13-bit TLA is large enough.
Providers and exchange points use the next-level aggregation identifier (NLA). These network access providers are usually public, and they will further structure the address space assigned by the TLA with route topology optimization as a priority.
The site-level aggregation identifier (SLA) is the address space assigned to organizations, used for internal network structure. It can be subnetted further within the organization. The last part of the address is used for the 64-bit interface identifier, as discussed earlier in this chapter.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Anycast Address
As already mentioned, anycast addresses are in the same address range as aggregatable global unicast addresses, and each participating interface must be configured as having an anycast address. Within the region where the interfaces containing the same anycast addresses are, each host must be advertised as a separate entry in the routing tables. If the anycast interfaces have no definable region, each anycast entry (in the worst case) has to be propagated throughout the Internet, which obviously does not scale. It is expected, therefore, that support for such global anycast addresses will be either unavailable or very restricted. Until there is more experience gained, the following restrictions are defined in RFC 2373.
  • An anycast address must not be used as the source address of an IPv6 packet.
  • An anycast address must not be assigned to an IPv6 host. It may be assigned only to an IPv6 router.
An expected use of anycast addresses is to identify a set of routers providing access to a particular routing domain. One example is the 6to4 relay anycast address that is specified in RFC 3068 and described in Chapter 10. Another possibility is to configure with a specific anycast address all the routers within a corporate network that provide access to the Internet. Whenever a packet is sent to that anycast address, it will be delivered to the closest router that provides Internet access.
A required anycast address is the subnet-router anycast address , which is defined in RFC 2373 and shown in Figure 3-7.
Figure 3-7: Format of the subnet-router anycast address
Basically, the address is like a regular unicast address with a prefix specifying the subnet and an identifier that is set to all zeros. A packet sent to this address will be delivered to one router on that subnet. All routers are required to support the subnet-router anycast address for subnets to which they have interfaces.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Multicast Address
A multicast address is an identifier for a group of nodes, identified by the high-order byte FF, or 1111 1111 in binary notation (refer to Table 3-2). A node can belong to more than one multicast group. Multicast exists in IPv4, but it has been redefined and improved for IPv6. The multicast address format is shown in Figure 3-9.
Figure 3-9: Format of the multicast address
The first byte identifies the address as a multicast address. The next 4 bits are used for Flags, defined as follows: The first 3 bits of the Flag field must be zero; they are reserved for future use. The last bit of the Flag field indicates whether this address is permanently assigned—i.e., one of the well-known multicast addresses assigned by the IANA—or a temporary multicast address. A value of zero for the last bit defines a well-known address; a value of one indicates a temporary address. The Scope field is used to limit the scope of a multicast address. The possible values are shown in Table 3-5.
Table 3-5: Values for the Scope field
Value
Description
0
Reserved
1
Node-local scope (name changed to interface-local in new draft)
2
Link-local scope
3, 4
Unassigned
5
Site-local scope
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Required Addresses
The standard specifies that each host must assign the following addresses to identify itself:
  • Its link-local address for each interface
  • Any assigned unicast addresses
  • The loopback address
  • The all-nodes multicast address
  • Solicited-node multicast address for each of its assigned unicast and anycast addresses
  • Multicast addresses of all other groups to which the host belongs
A router needs to recognize all of the above plus the following:
  • The subnet-router anycast address for the interfaces for which it is configured to act as a router on each link
  • All anycast addresses with which the router has been configured
  • The all-routers multicast address
  • Multicast addresses of all other groups to which the router belongs
Now that we are familiar with the extended address space and the IPv6 address types, the next chapter introduces the advanced features of ICMPv6, which offer management functionality not known with ICMPv4.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Chapter 4: ICMPv6
If you are familiar with IPv4, the Internet Control Message Protocol (ICMP) for IPv4 is probably a good friend of yours: it gives important information about the health of the network. ICMPv6 is the version that works with IPv6. It reports errors if packets cannot be processed properly and sends informational messages about the status of the network. For example, if a router cannot forward a packet because it is too large to be sent out on another network, it sends back an ICMP message to the originating host. The source host can use this ICMP message to determine a better packet size and then resend the data. ICMP also performs diagnostic functions, such as the well-known ping, which uses ICMP Echo Request and Echo Reply messages to test availability of a node.
ICMPv6 is much more powerful than ICMPv4 and contains new functionality, as described in this chapter. For instance, the Internet Group Management Protocol (IGMP) function that manages multicast group memberships with IPv4 has been incorporated into ICMPv6. The same is true for the Address Resolution Protocol/Reverse Address Resolution Protocol (ARP/RARP) function that is used in IPv4 to map layer 2 addresses to IP addresses (and vice versa). Neighbor discovery (ND) is introduced; it uses ICMPv6 messages in order to determine link-layer addresses for neighbors attached to the same link, to find routers, to keep track of which neighbors are reachable, and to detect changed link-layer addresses. ICMPv6 also supports Mobile IPv6, which is described in Chapter 7. ICMPv6 is part of IPv6 and it must be implemented fully by every IPv6 node. It is defined in RFC 2463 (obsoletes RFC 1885). Neighbor discovery is defined in RFC 2461 (obsoletes RFC 1970).
There are two classes of ICMP messages:
ICMP error messages
Error messages have a zero in the high-order bit of their message Type field. ICMP error message types are therefore in the range 0 to 127.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
General Message Format
There are two classes of ICMP messages:
ICMP error messages
Error messages have a zero in the high-order bit of their message Type field. ICMP error message types are therefore in the range 0 to 127.
ICMP informational messages
Informational messages have a one in the high-order bit of their message Type field. ICMP informational message types are therefore in the range 128 to 255.
An IPv6 header and zero or more extension headers precede every ICMPv6 message. The header just preceding the ICMP header has a next header value of 58. This value is different from the value for ICMPv4 (which has the value 1).
The values for the next header field are discussed in Chapter 2.
The following message types are described in RFC 2463:
  • ICMPv6 error messages
    • Destination Unreachable (message type 1)
    • Packet Too Big (message type 2)
    • Time Exceeded (message type 3)
    • Parameter Problem (message type 4)
  • ICMPv6 informational messages
    • Echo Request (message type 128)
    • Echo Reply (message type 129)
For the most current list of ICMPv6 message types, refer to the Internet Assigned Number Authority (IANA) at
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
ICMP Error Messages
Every ICMP message can have a slightly different header depending on the kind of error report or information it carries. The following sections outline the structure of each type of ICMPv6 message.
A Destination Unreachable message is generated if an IP datagram cannot be delivered. A Type field with the value 1 identifies this message. The ICMP message is sent to the source address of the invoking packet. The format of the Destination Unreachable message is shown in Figure 4-2.
Figure 4-2: Format of the Destination Unreachable message
The Type field is set to one, which is the value for the Destination Unreachable message. The Code field supplies more information about the reason why the datagram was not delivered. The possible codes are listed in Table 4-3. The data portion of the ICMP message contains parts of the original message—as much as will fit into the ICMP message.
Table 4-3: Code values of the Destination Unreachable message (type 1)
Code
Description
0
No route to destination
This message is generated if a router cannot forward a packet because it does not have a route in its table for a destination network. This can only happen if the router does not have an entry for a default route.
1
Communication with destination administratively prohibited
This type of message can, for example, be sent by a firewall that cannot forward a packet to a host inside the firewall because of a packet filter. It might also be sent if a node is configured not to accept unauthenticated Echo Requests.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
ICMP Informational Messages
In RFC 2463, two types of informational messages are defined: the Echo Request and the Echo Reply messages. Other ICMP informational messages are used for Path MTU Discovery and neighbor discovery. These messages are discussed at the end of this chapter and defined in RFC 2461, "Neighbor Discovery for IP Version 6," and RFC 1981, "Path MTU Discovery for IP version 6."
The Echo Request and Echo Reply messages are used for one of the most common TCP/IP utilities: Packet INternet Groper (ping). Ping is used to determine if a specified host is available on the network and ready to communicate. The source host issues an Echo Request message to the specified destination. The destination host, if available, responds with an Echo Reply message. In Chapter 11, you can find a screenshot that shows you what an IPv6 ping looks like in the trace file, as well as the command you need to ping over IPv6.
The format of the Echo Request message is shown in Figure 4-6.
Figure 4-6: Format of the Echo Request message
The Type Field is set to 128, the value for the Echo Request. The Code Field is not used for this message and is therefore set to zero. The Identifier and Sequence Number fields are used to match requests with replies. The reply must always contain the same numbers as the request. Whether an identifier and a sequence number are used and what kind of arbitrary data is included in the Echo Request depends on the TCP/IP stack you are using. When you analyze trace files with Echo Request and Echo Reply messages and you are familiar with some stacks, you can determine the TCP/IP stack of the sender by looking at the arbitrary data. You can see an example of this in Figure 4-8, later in this chapter.
The format of the Echo Reply message is very similar to that of the Echo Request, as shown in Figure 4-7.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Processing Rules
There are several rules that govern processing of ICMP packets. They can be found in RFC 2463 and are summarized as follows:
  • If a node receives an ICMPv6 error message of unknown type, it must pass it to the upper layer.
  • If a node receives an ICMPv6 informational message of unknown type, it must be silently discarded.
  • As in ICMPv4, as much as possible of the packet that caused the ICMP error message will be included in the ICMP message body. The ICMP packet should not exceed the minimum IPv6 MTU.
  • If the error message has to be passed to the upper-layer protocol, the protocol type is determined by extracting it from the original packet (present in the body of the ICMPv6 error message). In case the protocol type cannot be found in the body of the ICMPv6 message (because there were too many extension headers present in the original packet and the part of the header that contained the upper-layer protocol type was truncated), the ICMPv6 message is silently discarded.
An ICMPv6 message must not be sent in the following cases:
  • As a result of an ICMPv6 error message.
  • As a result of an ICMPv6 redirect message.
  • As a result of a packet sent to an IPv6 multicast address. There are two exceptions to this rule: the Packet Too Big message that is used for Path MTU discovery and the Parameter Problem with the code value 2 for an unrecognized IPv6 option.
  • As a result of a packet sent as a link-layer multicast (same exceptions as above apply).
  • As a result of a packet sent as a link-layer broadcast (same exceptions as above apply).
  • As a result of a packet whose source address does not uniquely identify a single node. This could be an IPv6 unspecified address, an IPv6 multicast address, or an IPv6 address known to be an anycast address.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
The ICMPv6 Header in a Trace File
After reading through all that dry information, you deserve something different. The following screenshot (Figure 4-8) shows what a ping looks like in the trace file and provides details of many of the fields we have discussed so far.
Figure 4-8: Echo Request in a trace file
The two frames in this trace file were captured when my Windows 2000 host issued a ping command to a Linux host. Note that the source address of the second frame, the Echo Reply, is the same as the destination address in the first frame, the Echo Request. The IPv6 header provides more information. The Version field indicates that this is an IPv6 packet. The Next Header field has the value 58, which is the value for ICMPv6. We can also see source and destination IP address. The prefix fe80: indicates that these two addresses are link-local addresses.
Note the first three fields of the ICMPv6 header. They are the fields that are common for every ICMPv6 message: Type, Code, and Checksum field. The Type field contains the value 128, which is the value for an Echo Request. The Identifier and Sequence Number fields are unique to the Echo Request and Echo Reply message. The Identifier is not used in this case and the sender has set the sequence to 38. It has to be identical in the matching reply that is shown in the following screenshot. The Data field contains arbitrary data that doesn't need to make sense to anyone.
Oh, I almost forgot: I promised to show vendor stack related data in the Echo Request message. What you see here—the alphabet up to the letter w—is what Microsoft uses. Whenever you see this in a trace file, it is a Microsoft stack sending the request. Figure 4-9 shows the Echo Reply in detail.
Figure 4-9: Echo Reply in a trace file
Again, the IPv6 header shows a value of 6 for the IP version and a Next Header value of 58 for ICMPv6. The destination address of the previous frame is now the source address, and the previous source address is now the destination address. The Type field in the ICMPv6 header shows a value of 129, which is the value for an Echo Reply. The Identifier and Sequence Number fields, as well as the Data field, match the ones in the Echo Request.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Neighbor Discovery
Neighbor discovery (ND) is specified in RFC 2461 (obsoletes RFC 1970). The specifications in this RFC relate to different protocols and processes known from IPv4 that have been modified and improved. New functionality has also been added. It combines Address Resolution Protocol (ARP) and ICMP router discovery and Redirect. With IPv4, we have no means to detect whether or not a neighbor is reachable. With the neighbor discovery protocol, a neighbor unreachability detection mechanism has been defined. Duplicate IP address detection has been implemented, too. IPv6 nodes use neighbor discovery for the following purposes:
  • To determine layer 2 addresses of nodes on the same link
  • To find neighboring routers that can forward their packets
  • To keep track of which neighbors are reachable and which are not, and detect changed link-layer addresses
The following improvements over the IPv4 set of protocols can be noted:
  • Router discovery is now part of the base protocol set. With IPv4, the mechanism needs to get the information from the routing table.
  • Router advertisement packets contain link-layer addresses for the router. There is no need for the node receiving a Router Advertisement to send out an additional ARP request (as an IPv4 node would have to do) to get the link-layer address for the router interface. The same is true for ICMPv6 redirect messages; they contain the link-layer address of the new next-hop router interface.
  • Router advertisement packets contain the prefix for a link (subnet information). There is no need to configure subnet masks anymore. They can be learned from the Router Advertisement.
  • Neighbor discovery provides mechanisms to renumber networks easily. New prefixes and addresses can be introduced and old ones can be deprecated and removed.
Additional content appearing in this section has been removed.
Purchase this book now or read it online at Safari to get the whole thing!
Autoconfiguration
Content preview·