Part 1 of this series explained differences between IPv4 header and IPv6 header. This time we will take a look at extension header, which is new in IPv6.
In IPv4, information regarding various additional services provided at the IP layer is incorporated in the Options field of the header. Because of this, the length of the header changes according to the situation.
On the other hand, IPv6 makes a clear distinction between extension header and basic header, and places the extension header behind the basic header. Basic header has a fixed length of 40 bytes, and every IPv6 packet has that. Extension header is an option. It woné÷ be attached if additional services are not used. Intermediate devices (for example a router) that handle the packet must process the basic header, but except for some special cases, they doné÷ need to process the extension header. Only the destination node process the information contained in the extension header. Routers can process packets more efficiently since they know that they only need to look at basic header and its length is always the same.
Extension headers are divided into several categories depending on the type of function they serve. When multiple additional services are used, extension headers that correspond to different services are placed one after another.
Figure below shows the structure of IPv6 basic header, which was originally shown in Figure 2 of the previous article. Here you can see an 8-bit field named Next Header. This field specifies whether extension header exists or not. When extension header is not used, basic header contains all the IP layer information. It will be followed by a header for a higher layer, either TCP header or UDP header, and the Next Header field shows which one will follow. When extension header is used, the Next Header field shows which type of extension header will follow.
Figure Structure of IPv6 basic header
Each extension header also contains the Next Header field, and it specifies which extension header will follow. A terminal node that received the packet that contains extension header will process extension headers according to their order of placement.
Types of extension headers
There are six types of extension headers; Hop-by-Hop Option, Destination Option, Routing, Fragment, Authentication, and ESP (Encapsulating Security Payload). When using multiple extension headers, it is recommended to place them in this order.
- Hop-by-Hop Option
We mentioned earlier that normally only the terminal node process extension header. The only exception to this rule is the Hop-by-Hop Option header. This header, as the name suggests, specifies a process that must be performed every time the packet goes through a router. It is possible to specify any type of processing. An example of the use of this header is the Jumbogram option (RFC2675). The Payload Length field (specifies the length of the packet excluding the IPv6 header) in IPv6 basic header is 16 bits, so it can only specify up to 65536 octets. When it is necessary to send a packet that is larger than this size, Jumbogram Option allows you to specify the length of the packet in the extension header.
- Destination Option
The Destination Option header is used to specify a process that needs to be performed by the destination node. It is possible to specify any type of processing. We already mentioned that only the destination node normally process IPv6s extension header. In that sense, other extension headers such as the Fragment header can also be called the Destination Option header. However, the Destination Option header is different from other headers in that it can specify different kinds of processing.
- Routing
The Routing header is used to specify routing path. For example, it is possible to specify which Internet service provider to use, and secure performance for specific purposes. Source node used the Routing header to list addresses of routers that the packet must go through. Addresses specified in this list will be used as Destination Addresses of this IPv6 packet in the order of the listing, and the packet will be sent from one router to another accordingly.
- Fragment
The Fragment header is used when the source of IPv6 packet needs to send a packet larger than Path MTU, and tells how to reconstruct the packet from its fragments. MTU (Maximum Transmission Unit) refers to the size of the largest packet transmittable over particular path. In a network like Internet, a narrow bandwidth path between the source and the destination causes a significant problem. Trying to send a large packet thorough a narrow path will only result in an overflow. In IPv4, each router on the path of the packet can divide the packet according to the value of MTU set for each interface. However, this process places heavy burden on the router. Therefore, in IPv6, only the source node divides packets.
IPv6s source node will perform Path MTU Discovery, which finds the narrowest bandwidth in a particular path, and adjusts each packet size according to that bandwidth before sending them. Looking at it from a different perspective, if there is a broad bandwidth path from the source to the destination, the source will be able to send large packets.
If the source application is adopting this mechanism, it will be sending out optimally sized data, and there will be no need for a processing at the IP layer. However, if the application is not using this mechanism, it will be pouring out packets that are larger than the MTU found by Path MTU Discovery. In this case, these packets will be divided at the IP layer of the source node, and the Fragment header will be used.
- Authentication and ESP
IPsec is a security mechanism used at the IP layer. All IPv6 node must have IPsec implementation. However, implementation and utilization is a different story, and whether IPsec will be actually used in the communication or not will depend on time and circumstances. When IPsec is used, the Authentication header used for the packet authentication and securing the consistency of data, and the ESP header used for specifying the information relating to data encryption, will be incorporated as extension headers. IPsec is defined as a mechanism that can coexist with IPv4. However, in IPv4, information is placed in Options field.
Lighter processing burden and higher flexibility
As we have seen in this article, IPv6 is adopting a system that separates additional services from basic services and puts them in extension headers, and further categorizes extension headers by its function. By doing so, it is lightening the burden placed on routers, and establishing a system that allows flexible addition of functions that are not even conceived at the present time.
この記事のトラックバックURL
http://www.ipv6style.jp/trackback/514


