Network Working Group Li Zengxing Internet-Draft: draft-zengxing-ipng-00 Obsoletes: 2460, 1981, 2675 Expires: June 13, 2007 December 13, 2006 Internet Protocol, Version 6 (IPv6) Specification Status of this Memo By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section 6 of BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on June 13, 2007. Copyright Notice Copyright (C) The Internet Society (2006). Abstract This document specifies version 6 of the Internet Protocol (IPv6), also sometimes referred to as IP Next Generation or IPng. This document obsoletes RFC2460, RFC1981 and RFC2675. Li zengxing Expires June 13, 2007 [Page 1] Internet-Draft IPv6 Specification December 2006 Table of Contents 1. Introduction.................................................3 2. Terminology..................................................4 3. IPv6 Header Format...........................................5 4. IPv6 Extension Headers.......................................7 4.1 Extension Headers Format.................................8 4.2 Extension Headers Order.................................11 4.3 Jumbograms Header.......................................12 4.4 Routing Header..........................................14 4.4.1 Hop-by-hop routing type..........................15 4.4.2 Path MTU discovery routing type..................18 4.5 Fragment Header.........................................20 4.6 End Of Header...........................................25 5. Packet Size Issues..........................................25 6. Upper-Layer Protocol Issues.................................27 6.1 Upper-Layer Checksums...................................27 6.2 Maximum Packet Lifetime.................................28 6.3 Maximum Upper-Layer Payload Size........................28 6.4 Responding to Packets Carrying Routing Headers..........29 7. Security Considerations.....................................29 8. IANA Considerations.........................................30 Acknowledgments.................................................31 Authors' Addresses..............................................31 References......................................................31 Changes Since RFC-2460..........................................32 Changes Since RFC-1981..........................................33 Changes Since RFC-2675..........................................33 Full Copyright Statement........................................34 Intellectual Property...........................................34 Li zengxing Expires June 13, 2007 [Page 2] Internet-Draft IPv6 Specification December 2006 1. Introduction IP version 6 (IPv6) is a new version of the Internet Protocol, designed as the successor to IP version 4 (IPv4) [RFC-791]. The changes from IPv4 to IPv6 fall primarily into the following categories: o Expanded Addressing Capabilities IPv6 increases the IP address size from 32 bits to Variable-length max 128 bits, support 32 or 64 or 96 or 128 bits length address and determined by class field. A much greater number of addressable nodes, and simpler auto-configuration of addresses. The address is compatible. o Header Format Simplification Some IPv4 Header fields have been dropped or made optional, to reduce the common-case processing cost of packet handling and to limit the bandwidth cost of the IPv6 Header. o Improved Support for Extensions and Options Changes in the way IP Header options are encoded Extensions allows for more efficient forwarding, less stringent limits on the length of options, and greater flexibility for introducing new extensions in the future. o Support multiple Upper-Layer data packets in an IP packets Multiple Upper-Layer data enable to packet in an IP packet, such as multiple TCP, UDP packets to join in an IP packet. This capability improve efficiency of short data packets' transmittal, such as TCP establish or close connections (length of TCP data is zero), Voice over IP, etc. o Authentication and Privacy Capabilities Extensions to support authentication, data integrity, and (optional) data confidentiality are specified for IPv6. This document specifies the basic IPv6 Header and the general format extension Headers. It also discusses base extension Header of an IPv6 packet and the effects of IPv6 on upper-layer protocols. The format and semantics of IPv6 addresses are specified separately in [ADDRARCH]. The IPv6 version of ICMP, which all IPv6 implementations are required to include, is specified in [ICMPv6]. Li zengxing Expires June 13, 2007 [Page 3] Internet-Draft IPv6 Specification December 2006 2. Terminology node - a device that implements IPv6. router - a node that forwards IPv6 packets not explicitly addressed to itself. host - any node that is not a router. upper layer - a protocol layer immediately above IPv6. Examples are transport protocols such as TCP and UDP, control protocols such as ICMP, routing protocols such as OSPF, and internet or lower-layer protocols being "tunneled" over (i.e., encapsulated in) IPv6 such as IPX, AppleTalk, IPv4 or IPv6 itself. link - a communication facility or medium over which nodes can communicate at the link layer, i.e., the layer immediately below IPv6. Examples are Ethernets (simple or bridged); PPP links; X.25, Frame Relay, or ATM networks; and internet (or higher) layer "tunnels", such as tunnels over IPv4 or IPv6 itself. address - an IPv6-layer node identifier. packet - an IPv6 Header plus payload. unicast - a packet sent to a node. multicast - a packet sent to multiple nodes. anycast - a packet sent to any one of a group of nodes. (Note: recommended that anycast support by upper layer protocol, such as Domain Name Service) MTU - the maximum transmission unit, i.e., maximum packet size in octets, that can be conveyed over a link. path MTU - the minimum link MTU of all the links in a path between a source node and a destination node. Li zengxing Expires June 13, 2007 [Page 4] Internet-Draft IPv6 Specification December 2006 3. IPv6 Header Format +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| Class | Hop Limit | Payload Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . . . Source Address . . . +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . . . Destination Address . . . +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Version 4-bit Internet Protocol version number = 6. See (Note 1). Class 4-bit Address class. Case 0, Address length is 32-Bit for IPv4. Case 1, Address length is 32-Bit Particular. Case 2, Address length is 64-Bit. Case 3, Address length is 64-Bit Particular. Case 4, Address length is 96-Bit. Case 5, Address length is 96-Bit Particular. Case 6, Address length is 128-Bit. Case 7, Address length is 128-Bit Particular. Others are for Reserve. Hop Limit 8-bit unsigned integer. Decremented by 1 by each node that forwards the packet. The packet is discarded if Hop Limit is decremented to zero. Payload Length 16-bit unsigned integer. Length of the IPv6 payload, i.e., the rest of the packet following this IPv6 Header, in octets. If set to zero, indicate this is a Jumbograms packet. (Note that any extension Headers present are considered part of the payload.) Source Address Variable-length field, address of the Source of the packet. Length determined by class field. See (Note 2) and [ADDRARCH]. Li zengxing Expires June 13, 2007 [Page 5] Internet-Draft IPv6 Specification December 2006 Destination Address Variable-length field, address of the intended recipient of the packet (possibly not the ultimate recipient, if a Routing Header is present). Length determined by class field. See (Note 2) and [ADDRARCH]. Note 1: Internet Protocol version number Because of many nodes already implement the old version IPv6 [RFC-2460], maybe need assign a new IP version number by IANA, such as 7. Note 2: Source Address and Destination Address Source Address and Destination Address are variable-length field. The address length is determined by class field as following case: 32-bit length Address if Class = 0, for IPv4; 32-bit length Address if Class = 1, for Particular; 64-bit length Address if Class = 2; 64-bit length Address if Class = 3, for Particular; 96-bit length Address if Class = 4; 96-bit length Address if Class = 5, for Particular; 128-bit length Address if Class = 6; 128-bit length Address if Class = 7, for Particular. Above-mentioned Address is compatible. The Class in the IPv6 Header for particular may be used by a source to requests special handling by the nodes, such as non-default quality of service, multicast, anycast or "real-time" service. The router and hosts receive the packet need to process Extension Headers Particular option and in precedence. The nature of that special handling might be conveyed to the routers by a control protocol, such as a resource reservation protocol, or by information within the packets themselves, e.g., in a routing Header. The details of such control protocols are beyond the scope of this document. Class also be saw as compress flag of address. The max length of Source address and Destination address determine the Address Class. Short address prefixes zero extend to longer address while difference length address communication each other. Li zengxing Expires June 13, 2007 [Page 6] Internet-Draft IPv6 Specification December 2006 For example: 32 bits address prefix zero as a 64 bits address: 192.168.1.1 --> 0.0.0.0.192.168.1.1 32 bits address prefix zero as a 128 bits address: 192.168.1.1 --> 0.0.0.0.0.0.0.0.0.0.0.0.192.168.1.1 64 bits address prefix zero as a 128 bits address. 0.3.1.2.192.168.1.1 --> 0.0.0.0.0.0.0.0.0.3.1.2.192.168.1.1 Short address is benefit to improve transmit efficiency, simple and convenient for user. 128 bits address is too large to user and administration of networks now. We MUST not waste address resource that pertain to future. If address is expend double per year, it enough use for 32 years from 32 bits address to 64 bits address. It is recommended that to use the 64 bits address first, only use the 128 bits address while 64 bits address is exhaust. IPv6 will be Obsoletes before 30 years because of network optimization never final. 4. IPv6 Extension Headers IPv6 Extension Headers are vectors as Table of Contents in the IPv6 packet. The extension headers and data are payload after IPv6 header in packet as flowwing format: +------+-----------+------------ | IPv6 | Extension | |Header| Headers | data | | | | | | +------+-----------+------------ Li zengxing Expires June 13, 2007 [Page 7] Internet-Draft IPv6 Specification December 2006 4.1 Extension Headers Format +---------------+---------------+-------------------------------+ | Header type 1 | Header Flag 1 | Data Length 1 | +---------------+---------------+-------------------------------+ | Header type 2 | Header Flag 2 | Data Length 2 | +---------------+---------------+-------------------------------+ . . . . . . . . . . . . +---------------+---------------+-------------------------------+ | Header type n | Header Flag n | Data Length n | +---------------+---------------+-------------------------------+ | End of Header | End Flag | 0 or CRC or checksum | +---------------+-----------------------------------------------+ . . . Data 1 . . . +---------------------------------------------------------------+ . . . Data 2 . . . +---------------------------------------------------------------+ . . . . . . . . . +---------------------------------------------------------------+ . . . Data n . . . +---------------------------------------------------------------+ Header type 8-bit selector. Identifies the type of Header. It is uses the same values as the IPv4 Protocol field [RFC-3232]. If Header type = 59, then Indicate End Of Header (EOH). Header Flag 8-bit selector. Identifies the Extend attribute of Header, such as Protocol version or addition attribute, etc. Support multiple versions for a Extension Header. It is set to zero if not define for the Header type and Reserve for future protocol if Header type were exhausted 8-bit. Li zengxing Expires June 13, 2007 [Page 8] Internet-Draft IPv6 Specification December 2006 Data length 16-bit unsigned integer. Length of the Extension Header's payload, in octets. This value represents the size of the extension Header data. This field will redefine for EOH header. see (section 4.6). Data Variable-length field. The payload of extension Headers. Length is sum of value of data length field in extension headers. It is split to multiple parts for multiple extension headers. Length of every part is determined by the point extension Header data length field. The Offset of the part is sum of data length of preceding extension Headers from EOH. The first part offset is 0. The second part offset is the value of first extension header data length, the third part offset is sum of value of first and second extension headers data length field. etc. (Note: Boundary Padding do not consider add in data for simple and unification process on difference computer.) In IPv6, optional internet-layer information is encoded in separate Headers that may be placed between the IPv6 Header and the upper-layer Header in a packet. There are a small number of such extension Headers, each identified by a distinct Header type value. As illustrated in these examples, an IPv6 packet may carry zero, one, or more extension Headers, each identified by the Header type field of the Extension Headers array: Li zengxing Expires June 13, 2007 [Page 9] Internet-Draft IPv6 Specification December 2006 +------+--------+--------+------------ | IPv6 | Header | Header | TCP Header |Header| type 1 | type 2 | data | | = TCP | = EOH | | | | | +------+--------+--------+------------ +------+--------+--------+--------+-------------+-------------- | IPv6 | Header | Header | Header | TCP Header | TCP Header |Header| type 1 | type 2 | type 3 | data 1 | data 2 | | = TCP | = TCP | = EOH | | | | | | | | +------+--------+--------+--------+-------------+-------------- +------+--------+--------+--------+-------------+-------------- | IPv6 | Header | Header | Header | TCP Header | UDP Header |Header| type 1 | type 2 | type 3 | data 1 | data 2 | | = TCP | = UDP | = EOH | | | | | | | | +------+--------+--------+--------+-------------+-------------- +------+--------+--------+------+------+--------+--------+--------- | IPv6 | Header | Header |Header|Header|Routing |Fragment|TCP |Header| type 1 | type 2 |type 3|type 4|Header |Header |Header | | = | = |= TCP |= EOH |data 1 |data 2 |data 3 | |Routing |Fragment| | | | | +------+--------+--------+------+------+--------+--------+--------- Except Jumbograms Header, routing Header or other routing correlative header, extension Headers are not examined or processed by any node along a packet's delivery path, until the packet reaches the node (or each nodes of multicast, or anyone node of anycast) identified in the Destination Address field of the IPv6 Header. The contents and semantics of each extension Header arrange not to proceed to the Header type. Therefore, extension Headers must be processed strictly in the order they appear in the packet; a receiver must not, for example, scan through a packet looking for a particular kind of extension Header and process that Header prior to processing all preceding ones. The exception referred to in the preceding paragraph is the routing Header, which carries information that must be examined and processed by every node along a packet's delivery path, including the source and destination nodes. The jumbograms or routing Header, when present, must immediately follow the IPv6 Header. Li zengxing Expires June 13, 2007 [Page 10] Internet-Draft IPv6 Specification December 2006 If, as a result of processing a Header, a node is required to proceed to the Header type but the Header type value after the current Header is unrecognized by the node, it should discard the packet and send an ICMP Parameter Problem message to the source of the packet, with an ICMP Code value of 1 ("unrecognized Header type encountered") and the ICMP Pointer field containing the offset of the unrecognized value within the original packet. The same action should be taken if a node encounters a Header type value of zero after any Header other than an IPv6 Header. 4.2 Extension Headers Order When more than one extension Header is used in a packet, it is recommended that those Headers appear in the following order: 1 Jumbograms Header 2 Routing Header 3 Authentication Header (note 1) 4 Encapsulating Security Payload Header (note 1) 5 Upper-layer Header or Fragment Header 6 End of Header note 1: additional recommendations regarding the relative order of the Authentication and Encapsulating Security Payload Headers are given in [IPESP]. The order 1, 2, 5(Fragment header) and 6 are specified in this document; the others are specified in [IPAUTH], [IPESP] and other document of upper-layer Header respectively. Each extension Header should occur many times except Jumbograms Header, Fragment Header and End of Header. If the upper-layer Header is another IPv6 Header (in the case of IPv6 being tunneled over or encapsulated in IPv6), it may be followed by its own extension Headers, which are separately subject to the same ordering recommendations. If and when other extension Headers are defined, their ordering constraints relative to the above listed Headers MUST be specified. Li zengxing Expires June 13, 2007 [Page 11] Internet-Draft IPv6 Specification December 2006 4.3 Jumbograms Header A "jumbogram" is an IPv6 packet containing a payload longer than 65535 octets. It is for high speed net such as higher than 10 Giga per second and do not recommend support jumbograms on net speed lower than 10 Giga per second. Jumbograms Header indicate by extension Header the flowing parameter: Header type 0 Header flag 0 Data length 4 The Jumbograms Header's data has the following format: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Jumbo length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Jumbo length 32-bit unsigned integer. Length of the IPv6 Jumbo payload, in octets. Excluding the IPv6 Header but including the all extension Headers present. It must be greater than 65535. Jumbograms are relevant only to IPv6 nodes that may be attached to links with a link MTU greater than 65,575 octets, and need not be implemented or understood by IPv6 nodes that do not support attachment to links with such large MTUs. The Payload Length field in the IPv6 Header must be set to zero in every packet that carries the Jumbograms Header. If a node that understands the Jumbograms Header receives a packet whose IPv6 Header carries a Payload Length of zero and first extension header is a Header type value of zero (meaning that Jumbograms Header follows), and whose link-layer framing indicates the presence of octets beyond the IPv6 Header, the node MUST proceed to process the Jumbograms Header in order to determine the actual length of the payload from the Jumbograms Header. The Jumbograms Header MUST not be used in a packet that carries a Fragment Header. Caution: Jumbograms possible bring congestion. It is not recommended use in busyness. Li zengxing Expires June 13, 2007 [Page 12] Internet-Draft IPv6 Specification December 2006 Nodes that understand the Jumbograms Header are required to detect a number of possible format errors, report the error by sending an ICMP Parameter Problem message [ICMPv6] to the packet's source. The following list of errors specifies the values to be used in the Code and Pointer fields of the Parameter Problem message: error: IPv6 Payload Length = 0 and First extension Header type <> Jumbograms Header Code: 0 Pointer: high-order octet of the IPv6 Payload Length error: IPv6 Payload Length != 0 and Jumbograms Header present Code: 0 Pointer: Option Type field of the Jumbo Payload option error: Jumbograms Header present and Jumbo Payload Length < 65,536 Code: 0 Pointer: high-order octet of the Jumbo Payload Length error: Jumbograms Header present and Fragment Header present Code: 0 Pointer: high-order octet of the Fragment Header. A node that does not understand the Jumbograms Header is expected to respond to erroneously-received jumbograms as follows, according to the IPv6 specification: error: IPv6 Payload Length = 0 and First extension Header type = Jumbograms Header Code: 0 Pointer: high-order octet of the IPv6 Payload Length error: IPv6 Payload Length != 0 and Jumbo Payload option present Code: 2 Pointer: Option Type field of the Jumbo Payload option Li zengxing Expires June 13, 2007 [Page 13] Internet-Draft IPv6 Specification December 2006 The Jumbo payload divided to multiple higher-layer Header that data length less then 65535 octets, present by Extension Headers (Table of Contents) in the IPv6 packet, implement by IPv6 level. The higher-layer protocols see jumbograms as a normal packet that data length less then 65535 octets. 4.4 Routing Header Routing Header flag in extension Headers indicator the flowing routing type: Header type 43 Header flag 8-bit identifier of Routing type. Case 0 for hop-by-hop routing type; Case 1 for path MTU discovery ask mode; Case 2 for path MTU discovery answer mode; Case 3 - 255 for reserve. The Routing Header flag 0 is used by an IPv6 source to list one or more intermediate nodes to be "visited" on the way to a packet's destination name as 'hop-by-hop'. This function is very similar to IPv4's Loose Source and Record Route option. The Routing Header flag 1 is used by an IPv6 source to discovery path MTU ask mode. The Routing Header flag 2 is used by an IPv6 source to discovery path MTU answer mode. If, while processing a received packet, a node encounters a Routing Header with an unrecognized Header flag value, the node MUST discard the packet and send an ICMP Packet Parameter Problem message to the packet's Source Address. Li zengxing Expires June 13, 2007 [Page 14] Internet-Draft IPv6 Specification December 2006 4.4.1 Hop-by-hop routing type Hop-by-hop routing type is indicated by extension Header the flowing parameter: Header type 43 Header flag 0 Data length 4 + 16 * n The hop-by-hop Routing Header's data has the following format: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved | Segments Left | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Address[1] + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Address[2] + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . . . . . . . . . +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Address[n] + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Reserved 24-bit reserved field. Initialized to zero for transmission; ignored on reception. Li zengxing Expires June 13, 2007 [Page 15] Internet-Draft IPv6 Specification December 2006 Segments Left 8-bit unsigned integer. Number of route segments remaining, i.e., number of explicitly listed intermediate nodes still to be visited before reaching the final destination. Address[1..n] Vector of 128-bit addresses, numbered 1 to n. Multicast addresses must not appear in a Routing Header of flag 0, or in the IPv6 Destination Address field of a packet carrying a Routing Header of flag 0. Hop-by-hop routing type is not examined or processed until it reaches the node identified in the Destination Address field of the IPv6 Header. In that node, dispatching on the Header type field of the immediately preceding Header causes the Routing Header module to be invoked. the required behavior of the node depends on the value of the Segments Left field, as follows: If Segments Left is zero, the node must ignore the Routing Header and proceed to process the Header type in the packet. If Segments Left is non-zero, the node must discard the packet and send an ICMP Parameter Problem, Code 0, message to the packet's Source Address, pointing to the unrecognized Routing Type. If, after processing a Routing Header of a received packet, an intermediate node determines that the packet is to be forwarded onto a link whose link MTU is less than the size of the packet, the node must discard the packet and send an ICMP Packet Too Big message to the packet's Source Address. As an example of the effects of the above algorithm, consider the case of a source node S sending a packet to destination node D, using a Routing Header to cause the packet to be routed via intermediate nodes I1, I2, and I3. The values of the relevant IPv6 Header and Routing Header fields on each segment of the delivery path would be as follows: Li zengxing Expires June 13, 2007 [Page 16] Internet-Draft IPv6 Specification December 2006 As the packet travels from S to I1: Source Address = S Data Length = 52 Destination Address = I1 Segments Left = 3 Address[1] = I2 Address[2] = I3 Address[3] = D As the packet travels from I1 to I2: Source Address = S Data Length = 52 Destination Address = I2 Segments Left = 2 Address[1] = I1 Address[2] = I3 Address[3] = D Calculate count of address[] (52-4)/16 = 3 As the packet travels from I2 to I3: Source Address = S Data Length = 52 Destination Address = I3 Segments Left = 1 Address[1] = I1 Address[2] = I2 Address[3] = D Calculate count of address[] (52-4)/16 = 3 As the packet travels from I3 to D: Source Address = S Data Length = 52 Destination Address = D Segments Left = 0 Address[1] = I1 Address[2] = I2 Address[3] = I3 Calculate count of address[] (52-4)/16 = 3 Li zengxing Expires June 13, 2007 [Page 17] Internet-Draft IPv6 Specification December 2006 4.4.2 Path MTU discovery routing type Path MTU discovery routing type is identified by extension Header the flowing parameter: Header type 43 Header flag 1 for ask mode, 2 for answer mode. Data length 4 The path MTU discovery Routing Header's data has the following format: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MTU Size | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ MTU Size 32-bit unsigned integer. Number of Path MTU size in octet. When a node (name as A) want to send a large packet(packet length greater than IPv6 minimum link MTU 1280 octets) to another node (name as B) that it unknown path MTU, the source node A need to send a IPv6 minimum link MTU (1280 octets) or shorter packet to destination node B first, and carry a Path MTU discovery routing type extension Header on it, and set 1 to Header flag for ask mode, field MTU size initialize the (known) MTU of the first hop in the path. Every node en route compare the value of MTU size for ask mode, If the value of MTU size is too large to be forwarded by some node along the path, that node will change it to a suitable value. The node B receive the ask mode packet, and replies an answer mode (Header flag set to 2) Path MTU discovery routing type packet to node A. Every node never changed the value of filed MTU size of answer mode. When node A receives the answer mode packet, it gets the unidirectional path MTU. The path MTU value could be stored with the corresponding entry in the path MTU cache. What is unknown path MTU? It means no entry found in the path MTU cache as following cases: Case 1, when a node First send a packet to another node. Case 2, when a path MTU value has not been updated for a while (on the order of 10 minutes), the entry MUST be deleted from path MTU cache to purging stale path MTU information. Li zengxing Expires June 13, 2007 [Page 18] Internet-Draft IPv6 Specification December 2006 Case 3, when ICMPv6 Packet Too Big messages received[ICMPv6], the entry MUST be deleted from the path MTU cache. Case 4, when ICMPv6 Destination Unreachable Messages received [ICMPv6], the entry MUST be deleted from the path MTU cache. While upon case appear and a packet want to send to the destination, an implementation of path MTU discovery could be perform. Li zengxing Expires June 13, 2007 [Page 19] Internet-Draft IPv6 Specification December 2006 4.5 Fragment Header The Fragment Header is used by an IPv6 source to send a packet larger than would fit in the path MTU to its destination. (Note: unlike IPv4, fragmentation in IPv6 is performed only by source nodes, not by routers along a packet's delivery path) The Fragment Header is identified by extension Header the flowing parameter: Header type 44 Header flag 0 Data length n (Length of payload of fragment) The Fragment Header data has the following format: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Fragment Offset |Res|M| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identification | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . . . . . Payload of fragment . . . . . +---------------------------------------------------------------+ Fragment Offset 29-bit unsigned integer. The offset of the data of this fragment, in 8-octet. Denote to the start of the Fragmentable Part of the original packet. Res 2-bit reserved field. Initialized to zero for transmission; ignored on reception. M flag 1 = more fragments; 0 = last fragment. Identification 32 bits. See description below. Payload of fragment Variable-length field. The payload of fragment Header. Length is determined by fragment extension Header data length field subtract 8. In order to send a packet that is too large to fit in the MTU of the path to its destination, a source node may divide the packet into fragments and send each fragment as a separate packet, to be reassembled at the receiver. Li zengxing Expires June 13, 2007 [Page 20] Internet-Draft IPv6 Specification December 2006 For every packet that is to be fragmented, the source node generates an Identification value. The Identification must be different than that of any other fragmented packet sent recently* with the same Source Address and Destination Address. If hop-by-hop Routing Header is present, the Destination Address of concern is that of the final destination. The initial, large, unfragmented packet is referred to as the "original packet", and it is considered to consist of two parts, as illustrated: * "recently" means within the maximum likely lifetime of a packet, including transit time from source to destination and time spent awaiting reassembly with other fragments of the same packet. However, it is not required that a source node know the maximum packet lifetime. Rather, it is assumed that the requirement can be met by maintaining the Identification value as a simple, 32-bit, "wrap-around" counter, incremented each time a packet must be fragmented. It is an implementation choice whether to maintain a single counter for the node or multiple counters, e.g., one for each of the node's possible source addresses, or one for each active (source address, destination address) combination. Original packet is separate into unfragmentable part and fragmentable part. The Unfragmentable Part consists of the IPv6 Header plus any extension Headers that must be processed by nodes en route to the destination, that is, all Headers up to and including the Routing Header and payload of Routing header if present. The Fragmentable Part consists of the rest of the packet, that is, any extension Headers that need be processed only by the final destination node(s), plus the upper-layer Header and data. The Fragmentable Part of the original packet is divided into fragments, each, except possibly the last ("rightmost") one, being an integer multiple of 8 octets long. The fragments are transmitted in separate "fragment packets" as illustrated: Li zengxing Expires June 13, 2007 [Page 21] Internet-Draft IPv6 Specification December 2006 original packet: +--------------+------------+------+--------------+-------------+ |Unfragmentable|fragmentable|End of|Unfragmentable|fragmentable | | Header | Header |Header|Header's Data |Header's data| +--------------+------------+------+--------------+-------------+ fragment packets: +--------------+--------+------+--------------+------------------+ |Unfragmentable|Fragment|End of|Unfragmentable|fragmentable | | Header |Header 1|Header|Header's Data |Header and data 1 | +--------------+--------+------+--------------+------------------+ +--------------+--------+------+--------------+------------------+ |Unfragmentable|Fragment|End of|Unfragmentable| fragmentable | | Header |Header 2|Header|Header's Data | data 2 | +--------------+--------+------+--------------+------------------+ o o o +--------------+--------+------+--------------+------------+ |Unfragmentable|Fragment|End of|Unfragmentable|fragmentable| | Header |Header n|Header| Data |data n | +--------------+--------+------+--------------+------------+ Each fragment packet is composed of: (1) IPv6 header with the Payload Length of the original IPv6 Header changed to contain the length of this fragment packet only (excluding the length of the IPv6 Header itself). If original is a Jumbograms and the fragment is not a Jumbograms, the Jumbograms header is removed from extension headers. (2) The Unfragmentable headers of the original packet. (3) The Fragment Header. (4) End of header. (5) Data of unfragmentable headers. (6) Data of Fragment header as flowwing: Li zengxing Expires June 13, 2007 [Page 22] Internet-Draft IPv6 Specification December 2006 (6.1) A Fragment Offset containing the offset of the fragment, in 8-octet units, relative to the start of the Fragmentable Part of the original packet. The Fragment Offset of the first ("leftmost") fragment is 0. (6.2) An M flag value of 0 if the fragment is the last one ("rightmost"), else an M flag value of 1. (6.3) The Identification value generated for the original packet. (6.4) Payload of the fragment, composed of fragmentable extension headers, End of Header and fragmentable data if it is first fragment (or forefront multi fragment packets if many extension headers overburden in first fragments packet), else fragmentable data. The lengths of the fragments must be chosen such that the resulting fragment packets fit within the path MTU to the packets' destination(s). At the destination, fragment packets are reassembled into their original packet as above illustrated. The following rules govern reassembly: An original packet is reassembled only from fragment packets that have the same Source Address, Destination Address, and Fragment Identification. Packet reassembly include IPv6 header length recompute, Extension Headers reassembly and data reassembly. IPv6 header length value compute by sum of length of extension headers and length of data. If it is a Jumbograms, IPv6 header length is value of 0, a Jumbograms header is add in front of extension headers if there is not a Jumbograms header, the Jumbo length is changed to the length of the Jumbo data. The extension headers are reassembled by unfragmentable headers and fragmentable headers (Include End of header) in payload of first fragments (or forefront multi fragments if many extension headers overburden in first fragments packet). The Fragment Header is not present in the final reassembled packet. The data is reassembled by unfragmentable data and fragmentable data. Unfragmentable data reasembly from Unfragmentable data of first fragment. Fragmentable data reassembly by payload of fragments (exclude the fragmentable headers and End of header). Li zengxing Expires June 13, 2007 [Page 23] Internet-Draft IPv6 Specification December 2006 The following error conditions may arise when reassembling fragmented packets: If insufficient fragments are received to complete reassembly of a packet within 60 seconds of the reception of the first-arriving fragment of that packet, reassembly of that packet must be abandoned and all the fragments that have been received for that packet must be discarded. If the first fragment (i.e., the one with a Fragment Offset of zero) has been received, an ICMP Time Exceeded -- Fragment Reassembly Time Exceeded message should be sent to the source of that fragment. If the length of a fragment, as derived from the fragment packet's Payload Length field, is not a multiple of 8 octets and the M flag of that fragment is 1, then that fragment must be discarded and an ICMP Parameter Problem, Code 0, message should be sent to the source of the fragment, pointing to the Payload Length field of the fragment packet. If the length and offset of a fragment are such that the Payload Length of the packet reassembled from that fragment would exceed 4 Giga octets, then that fragment must be discarded and an ICMP Parameter Problem, Code 0, message should be sent to the source of the fragment, pointing to the Fragment Offset field of the fragment packet. The following conditions are not expected to occur, but are not considered errors if they do: The number and content of the Headers preceding the Fragment Header of different fragments of the same original packet may differ. Whatever Headers are present, preceding the Fragment Header in each fragment packet, are processed when the packets arrive, prior to queuing the fragments for reassembly. Only those Headers in the Offset zero fragment packet are retained in the reassembled packet. Li zengxing Expires June 13, 2007 [Page 24] Internet-Draft IPv6 Specification December 2006 4.6 End Of Header (EOH) The value 59 in the Header type field of IPv6 extension Headers indicates that here is End of Header and Begin of Data. If EOH Header flag = 0, then data Length = 0 If EOH Header flag = 1, then data Length = checksum of Headers. If EOH Header flag = 2, then data Length = CRC16 of Headers. CRC16 is 16-bit cyclic redundancy checks. If EOH Header flag = 3, then data Length = 4 Data = CRC32 of IPv6 packet as flowwing format: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CRC32 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ CRC32 is 32-bit cyclic redundancy checks. Hop limit field is regarded as zero when compute checksum or CRC. CRC or checksum is produced by source node and only verify by destination node, never verify by routers en route. 5. Packet Size Issues IPv6 requires that every link in the internet have an MTU of 1280 octets or greater. On any link that cannot convey a 1280-octet packet in one piece, link-specific fragmentation and reassembly must be provided at a layer below IPv6. Links that have a configurable MTU must be configured to have an MTU of at least 1280 octets; it is recommended that they be configured with an MTU of 1500 octets or greater, to accommodate possible encapsulations (i.e., tunneling) without incurring IPv6-layer fragmentation. From each link to which a node is directly attached, the node must be able to accept packets as large as that link's MTU. Li zengxing Expires June 13, 2007 [Page 25] Internet-Draft IPv6 Specification December 2006 It is strongly recommended that IPv6 nodes implement Path MTU Discovery , in order to discover and take advantage of path MTUs greater than 1280 octets. However, a minimal IPv6 implementation (e.g., in a boot ROM) may simply restrict itself to sending packets no larger than 1280 octets, and omit implementation of Path MTU Discovery. In order to send a packet larger than a path's MTU, a node may use the IPv6 Fragment Header to fragment the packet at the source and have it reassembled at the destination(s). However, the use of such fragmentation is discouraged in any application that is able to adjust its packets to fit the measured path MTU (i.e., down to 1280 octets). A node must be able to accept a fragmented packet that, after reassembly, is as large as 1500 octets. A node is permitted to accept fragmented packets that reassemble to more than 1500 octets. An upper-layer protocol or application that depends on IPv6 fragmentation to send packets larger than the MTU of a path should not send packets larger than 1500 octets unless it has assurance that the destination is capable of reassembling packets of that larger size. In response to an IPv6 packet that is sent to an IPv4 destination (i.e., a packet that undergoes translation from IPv6 to IPv4), the originating IPv6 node may receive an ICMP Packet Too Big message reporting a Next-Hop MTU less than 1280. In that case, the IPv6 node is not required to reduce the size of subsequent packets to less than 1280, but must include a Fragment Header in those packets so that the IPv6-to-IPv4 translating router can obtain a suitable Identification value to use in resulting IPv4 fragments. Note that this means the payload may have to be reduced to 1236 octets (1280 minus 36 for the IPv6 Header and 8 for the Fragment Header), and smaller still if additional extension Headers are used. Li zengxing Expires June 13, 2007 [Page 26] Internet-Draft IPv6 Specification December 2006 6. Upper-Layer Protocol Issues 6.1 Upper-Layer Checksums Any transport or other upper-layer protocol that includes the addresses from the IP Header in its checksum computation must be modified for use over IPv6, to include the 128-bit IPv6 addresses instead of 32-bit IPv4 addresses. In particular, the following illustration shows the TCP and UDP "pseudo-Header" for IPv6: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Source Address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Destination Address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Header type | Header Flag | Data Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ o If the IPv6 packet contains a hop-by-hop Routing Header, the destination Address used in the pseudo-Header is that of the final destination. At the originating node, that address will be in the last element of the hop-by-hop Routing Header; at the recipient(s), that address will be in the Destination Address field of the IPv6 Header. o The data Length in the pseudo-Header is the length of the upper-layer Header and data (e.g., TCP Header plus TCP data). Some upper-layer protocols carry their own length information (e.g., the Length field in the UDP Header); for such protocols, that is the length used in the pseudo-Header. Other protocols (such as TCP) do not carry their own length information, in which case the length used in the pseudo-Header is the data Length from the IPv6 extension Header. Li zengxing Expires June 13, 2007 [Page 27] Internet-Draft IPv6 Specification December 2006 o Unlike IPv4, when UDP packets are originated by an IPv6 node, the UDP checksum is not optional. That is, whenever originating a UDP packet, an IPv6 node must compute a UDP checksum over the packet and the pseudo-Header, and, if that computation yields a result of zero, it must be changed to hex FFFF for placement in the UDP Header. IPv6 receivers must discard UDP packets containing a zero checksum, and should log the error. The IPv6 version of ICMP [ICMPv6] includes the above pseudo-Header in its checksum computation; this is a change from the IPv4 version of ICMP, which does not include a pseudo-Header in its checksum. The reason for the change is to protect ICMP from misdelivery or corruption of those fields of the IPv6 Header on which it depends, which, unlike IPv4, are not covered by an internet-layer checksum. 6.2 Maximum Packet Lifetime Unlike IPv4, IPv6 nodes are not required to enforce maximum packet lifetime. That is the reason the IPv4 "Time to Live" field was renamed "Hop Limit" in IPv6. In practice, very few, if any, IPv4 implementations conform to the requirement that they limit packet lifetime, so this is not a change in practice. Any upper-layer protocol that relies on the internet layer (whether IPv4 or IPv6) to limit packet lifetime ought to be upgraded to provide its own mechanisms for detecting and discarding obsolete packets. 6.3 Maximum Upper-Layer Payload Size When computing the maximum payload size available for upper-layer data, an upper-layer protocol must take into account the larger size of the IPv6 Header relative to the IPv4 Header. For example, in IPv4, TCP's MSS option is computed as the maximum packet size (a default value or a value learned through Path MTU Discovery) minus 40 octets (20 octets for the minimum-length IPv4 Header and 20 octets for the minimum-length TCP Header). When using TCP over IPv6, the MSS must be computed as the maximum packet size minus 40 octets, because the minimum-length IPv6 Header (i.e., an IPv6 Header 64-bit address with no extension Headers) is 20 octets same as a minimum-length IPv4 Header. Li zengxing Expires June 13, 2007 [Page 28] Internet-Draft IPv6 Specification December 2006 6.4 Responding to Packets Carrying hop-by-hop Routing Header When an upper-layer protocol sends one or more packets in response to a received packet that included a hop-by-hop Routing Header, the response packet(s) must not include a hop-by-hop Routing Header that was automatically derived by "reversing" the received hop-by-hop Routing Header UNLESS the integrity and authenticity of the received Source Address and hop-by-hop Routing Header have been verified (e.g., via the use of an Authentication Header in the received packet). In other words, only the following kinds of packets are permitted in response to a received packet bearing a hop-by-hop Routing Header: o Response packets that do not carry hop-by-hop Routing Headers. o Response packets that carry hop-by-hop Routing Headers that were NOT derived by reversing the hop-by-hop Routing Header of the received packet (for example, a hop-by-hop Routing Header supplied by local configuration). o Response packets that carry hop-by-hop Routing Header that were derived by reversing the hop-by-hop Routing Header of the received packet IF AND ONLY IF the integrity and authenticity of the Source Address and hop-by-hop Routing Header from the received packet have been verified by the responder. 7. Security Considerations The security features of IPv6 are described in the Security Architecture for the Internet Protocol [RFC-4301]. Li zengxing Expires June 13, 2007 [Page 29] Internet-Draft IPv6 Specification December 2006 8. IANA Considerations This document defines a number of new field types and values where future assignments will be managed by the IANA. The following registries will been created by the IANA: IPv6 Header Format (section 3) Internet Protocol version number (section 3) Because of many nodes already implement the old version IPv6 [RFC-2460], maybe need assign a new IP version number, such as 7 for this document experimentation. Address class (section 3) Extension Headers Format (section 4.1) Jumbograms Header type and header flag (section 4.3) Routing Header type and header flag (section 4.4) Hop-by-hop routing type and header flag (section 4.4.1) Path MTU discovery routing type and header flag (section 4.4.2) Fragment Header and header flag (section 4.5) End Of Header and header flag (section 4.6) Here give some new header type and header flag assign recommended: Header Header Protocol type flag 0 0 Jumbograms packet 41 Packet over IPv6 41 0 IPv4 over IPv6 41 1 IPv6 over IPv6 43 Routing family 43 0 Hop-by-hop routing type 43 1 Path MTU discovry ask mode 43 2 Path MTU discovry answer mode 44 0 Fragment 50 0 Encapsulating Security Payload 51 0 Authentication 58 0 Internet Control Message Protocol (ICMPv6) 59 End of Header(EOH) 59 0 EOH Data length set to zero 59 1 EOH Data length set to checksum of Headers 59 2 EOH Data Length set to CRC16 of Headers 59 3 EOH Data length set to 4 for CRC32 IPv6 packet. 6 0 TCP Transmission Control [RFC793,JBP] 17 0 UDP User Datagram [RFC768,JBP] 46 0 RSVP Reservation Protocol [Bob Braden] 92 0 MTP Multicast Transport Protocol [SXA] Li zengxing Expires June 13, 2007 [Page 30] Internet-Draft IPv6 Specification December 2006 Acknowledgments The authors gratefully acknowledge the IPng working group, and the Internet Community At Large. Authors' Addresses Li Zengxing Block 24 North, Kezhi Road West, Hi-Tech Garden, Nanshan Shenzhen China Post code: 518057 Phone: +86 755 61307840 Email: gdlzx@163.com References [RFC-791] Postel, J., "Internet Protocol", STD 5, RFC 791, September 1981. [RFC-4301] Kent, S. and K. Seo, "Security Architecture for the Internet Protocol", RFC 4301, December 2005. [IPAUTH] Kent, S., "IP Authentication Header", RFC 4302, December 2005. [IPESP] Kent, S., "IP Encapsulating Security Payload (ESP)", RFC 4303, December 2005. [ICMPv6] Conta, A., Deering, S., and M. Gupta, "Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification", RFC 4443, March 2006. [ADDRARCH] Hinden, R. and S. Deering, "IP Version 6 Addressing Architecture", RFC 4291, February 2006. [RFC-1981] McCann, J., Mogul, J. and S. Deering, "Path MTU Discovery for IP version 6", RFC 1981, August 1996. [RFC3232] Reynolds, J., "Assigned Numbers: RFC 1700 is Replaced by an On-line Database", RFC 3232, January 2002. [RFC-768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, August 1980. Li zengxing Expires June 13, 2007 [Page 31] Internet-Draft IPv6 Specification December 2006 [RFC-3828] Larzon, L-A., Degermark, M., Pink, S., Jonsson, L-E., and G. Fairhurst, "The Lightweight User Datagram Protocol (UDP-Lite)", RFC 3828, July 2004. [Multicast] Park, J-S., Shin, M-K., and H-J. Kim, "A Method for Generating Link-Scoped IPv6 Multicast Addresses", RFC 4489, April 2006. [RFC-2675] Borman, D., Deering, S., and R. Hinden, "IPv6 Jumbograms", RFC 2675, August 1999. [RFC-2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", RFC 2460, December 1998. CHANGES SINCE RFC-2460 This memo has the following changes from RFC-2460. 01) A simpler Header format is recommended for IPv6. Traffic Class, Flow Label and Header type field was drop from IPv6 Header, IP address is changed from 128 bits to Variable-length field max 128 bits. 02) Drop all of Traffic Class and Flow Label description, replace by Particular Class description. 03) Extension Headers as table of content in IP packet is present to support multiple Extension Headers data in an IPv6 packet, and simplify upper-layer protocol process. Every relational extension Header format. (Note: Some other RFC or draft need to update 'Next Header' and 'Hdr Ext Len' field to 'header type' and 'data length', and need to update header to new format.) 04) Hop-by-hop option and Destination Option Header was Drop. -------------------------------------------------------- Li zengxing Expires June 13, 2007 [Page 32] Internet-Draft IPv6 Specification December 2006 CHANGES SINCE RFC-1981 01) Path MTU discovery function Include in section 4.4.2 Path MTU discovery routing type. 02) A new routing type Header is present to discovery Path MTU in one packet cycle, instead of several iterations of the packet-sent/Packet-Too-Big-message-received cycle may occur before the Path MTU Discovery process ends. CHANGES SINCE RFC-2675 01) Include in section 4.3 Jumbograms Header. 02) Keep upper-layer protocol not to change to support Jumbograms, IPv6 split Jumbograms to multiple extension Headers that data length less then 65535 for upper-layer protocol. Li zengxing Expires June 13, 2007 [Page 33] Internet-Draft IPv6 Specification December 2006 Full Copyright Statement Copyright (C) The Internet Society (2006). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Intellectual Property The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf- ipr@ietf.org. Li zengxing Expires June 13, 2007 [Page 34]