In Chapter 24 you learned about the simple IPv4 header format. Headers are used by protocols to provide information about source and destination addresses, protocols, or the payload encapsulated by the datagram. It is typical that one protocol's packet is sent as the payload of another protocol. For example, the IP datagram is usually sent across most LANs encapsulated in an Ethernet frame. At the destination, the Ethernet portion of the frame is stripped off and the IP packet information is revealed. The IP information is then removed by the protocol stack, and the TCP (or other protocol) information is then removed before the actual data is reassembled and sent to an application. A few of the IPv4 fields were never put to any practical use. And some of those fields no longer exist in the IPv6 header. In Figure 35.1 you can see the fields that make up the IPv6 header. The fields for IPv6, as shown in Figure 35.1, are as listed here:
Figure 35.1. The IPv6 header is vastly different from the IPv4 header.
This section describes just the initial IPv6 header format. In the next section you will learn about how IPv6 can include additional headers that extend the traditional header to provide information about additional services for the IP protocol. IPv6 Extension HeadersIn general, most protocols have header information followed by a payload that contains the actual data to be transmitted from one point to another. Some protocols include a trailer that usually is used to provide some type of integrity check, such as CRC, to ensure that the frame or datagram has arrived at the destination without corruption. Still other protocols, and we're talking about IPv6 here, allow for additional headers to follow the initial IPv6 header, to describe certain aspects of the datagram. These headers are not required, but one or more can be placed into the datagram. These additional extension headers are placed directly after the IPv6 header, where the payload section is usually located. The payload that follows the IPv6 header, or the extension headers, will be a header for the encapsulated upper-layer protocol being transported by the IPv6 datagram. It is interesting to note that among the following headers, if the hop-by-hop header is used, it must follow the IPv6 header as the first additional header. Other extension headers don't have to be in any particular order, but the RFCs do suggest that certain headers be placed in a certain order. Note Although the extension headers don't necessarily have to be placed in any particular order (except for the hop-by-hop header, described in the following text), any node that needs to look at the extension headers is required to do so in the order in which they appear in the datagram. A node cannot simply look through the headers trying to find a specific header. The field Next Header is used to indicate whether another header follows the current header, after the initial IPv6 header. Yet if the next header is not one that the receiving node recognizes, the node should discard the datagram and send an ICMP message to the source indicating that there was a problem with the packet. In IPv6, the ICMP code for this is 1, which in text format means "unrecognized Next Header Field Header type encountered." This ICMP message is used in many of the IPv6 procedures. It is important to note that an IPv6 datagram doesn't have to have any extension headers. They are used only when the feature is implemented in the IPv6 hardware (or software) routing mechanism. The extension headers that can follow the IPv6 header include these:
The preceding list is described in the recommended order suggested by the RFC. This can change depending on a few circumstances. For example, if the Destination Options header should be read not just by the node specified by the destination address found in the initial IPv6 header, but also by the other destinations listed in the Routing header, then the Destination Options header should be placed immediately after the Hop-by-Hop header, followed by the Routing header. The Options Type Field for Hop-by-Hop and Destination OptionsIf the Destination Options header should be examined only by the final destination node, it should be placed just before the upper-layer header. The Options Type field for Hop-by-Hop and Destination Options is an 8-bit field. However, it should be interpreted by bit values, not by byte values. Table 35.1 lists the first two highest-order options type bits. These bits specify what should be done if a node does not understand the option.
The third-highest-ordered bit used is either zero or one. If the bit has a value of zero, the data contained in the option cannot be changed by a node it passes through on the way to its eventual destination. If the bit has a value of one, a node can change data in the extension header. The Next Header field is used by all options. It simply specifies what the next option (following the current option) will be. These option type numbers are based on those described for IPv4. These numbers were originally defined in RFC 1700, and later RFCs. However, the RFC process was not sufficient to keep up with newer protocols and services that were being developed, so an online database now exists at the Web site www.iana.org. You can use this database to determine what type of protocol or option the Next Header field indicates. |