view Side-By-Side changes
Network Working Group A. Conta(Digital Equipment Corporation)(Cascade Communications Corp.) INTERNET-DRAFT S. Deering (Xerox PARC)FebruaryJune 1996 Generic Packet Tunneling in IPv6 Specificationdraft-ietf-ipngwg-ipv6-tunnel-01.txtdraft-ietf-ipngwg-ipv6-tunnel-02.txt Status of this Memo This document is an Internet Draft. 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. Internet Drafts may be updated, replaced, or obsoleted by other documents at any time. It is not appropriate to use Internet Drafts as reference material or to cite them other than as a "working draft" or "work in progress." To learn the current status of any Internet-Draft, please check the ``1id-abstracts.txt'' listing contained in the Internet- Drafts Shadow Directories on ds.internic.net (US East Coast), nic.nordu.net (Europe), ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim). Distribution of this memo is unlimited. Abstract This document defines the model and generic mechanisms for IPv6tunnelingencapsulation ofvariousInternetor lower layer protocolpackets, such asIPv6, IPv4,IPv6 and IPv4. The model and mechanisms can be applied to other protocol packets as well, such as AppleTalk, IPX,etc.CLNP, or others. Conta & Deering Expires in six months [Page 1] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 1996 Table of Contents Status of this Memo...........................................1 Table of Contents.............................................2 1.Introduction..................................................3Introduction..................................................4 2.Terminology...................................................3Terminology...................................................4 3. Generic IPv6Tunneling........................................7Tunneling........................................6 3.1 IPv6Encapsulation.......................................9Encapsulation.......................................7 3.2 IPv6Decapsulation......................................10Packet Processing in Tunnels........................8 3.3 IPv6Tunnel Protocol Engine.............................11Decapsulation.......................................8 3.4 IPv6Tunnels and Address Formats........................13 3.5 IPv6 Tunnels and IPv6 Autoconfiguration.................13 3.6 IPv6 Tunnels and IPv6 Neighbor Discovery................13Tunnel Protocol Engine..............................9 4. Recursive Encapsulation......................................13 4.1 Limiting RecursiveEncapsulation.......................14Encapsulation.......................13 4.1.1 Tunnel Encapsulation Limit.......................14 4.1.2 Loopback RecursiveEncapsulation.................16Encapsulation.................15 4.1.3 Routing Loop Recursive Encapsulation.............164.1.4 Risk Factors in Recursive Encapsulation..........175.GenericTunnel IPv6Header...................................19Header...........................................16 5.1 Tunnel IPv6 ExtensionHeaders...........................21Headers...........................18 6. IPv6 Tunnel StateVariables..................................23Variables..................................19 6.1 IPv6 TunnelEntry Point Node............................23Entry-Point Node............................20 6.2 IPv6 TunnelExit Point Node.............................23Exit-Point Node.............................20 6.3 IPv6 Tunnel HopLimit...................................24Limit...................................20 6.4 IPv6 Tunnel PacketPriority.............................24Priority.............................21 6.5 IPv6 Tunnel FlowLabel..................................24Label..................................21 6.6 IPv6 Tunnel EncapsulationLimit.........................25Limit.........................21 6.7 IPv6 TunnelMTU.........................................25MTU.........................................22 7. IPv6 Tunnel PacketFragmentation.............................25Size Issues...............................22 7.1 IPv6 Tunnel PacketFragmentation...............................26Fragmentation........................22 7.2 IPv4 Tunnel PacketFragmentation...............................26Fragmentation........................23 8. IPv6 Tunnel Error Reporting andProcessing...................27Processing...................23 8.1 Tunnel ICMPMessages....................................30Messages....................................27 8.2 ICMP Messages for IPv6 OriginalPackets.................31Packets.................29 8.3 ICMP Messages for IPv4 OriginalPackets.................32Packets.................30 8.4 ICMP Messages for Recursive Tunnel Packets..............31 9. OpenIssues..................................................33Issues..................................................31 10.References..................................................34References..................................................32 11.Acknowledgements............................................35Acknowledgments.............................................32 12. SecurityConsiderations.....................................35Considerations.....................................33 Authors'Addresses..............................................35Addresses..............................................33 AppendixA..Inner tunnels.......................................35A.Risk Factors in Recursive Encapsulation..............33 AppendixB..Default tunnels.....................................37 ChangesB.Changes from previousversion...................................38 Fig. 1.................................................8 Fig. 2.................................................8version........................36 Fig.1.................................................6 Fig.2.................................................7 Fig.3.................................................8 Fig.4.................................................9 Fig.5................................................10 Conta & Deering Expires in six months [Page 2] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 1996Fig. 3.................................................9 Fig. 4................................................10 Fig. 5................................................11 Fig. 6................................................13 Fig. 7................................................28 Fig. 8................................................29Fig.6................................................13 Fig.7................................................24 Fig.8................................................26/27 Conta & Deering Expires in six months [Page 3] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 1996 1. Introduction This document specifies a method and generic mechanisms by which a packetmay beis encapsulated and carried as payload within an IPv6 packet. Thetechnique of encapsulating packets withinresulting packet is called an IPv6packets,tunnel packet. The forwarding path between the source and destination of the tunnel packet is calledalso tunneling in IPv6,an IPv6 tunnel. The technique isrecommendedcalled IPv6 tunneling. A typical scenario foruse in various cases of communications. Such a case is when a node, thatIPv6 tunneling isnotthesourcecase in which an intermediate nodeof a packet, wishes to exertexerts explicit routing controlover the packet - such as causing the packet to be forwarded to aby specifying particulardestination on the way to the final destination identified in the original header. Theforwarding paths for selected packets. This control isexertedachieved by prepending to each of thepacket a new IPv6 header, with a new source and destination address (see section 3.1). The tunnelselected original packets IPv6packet is forwardedheaders that identify the forwarding path. In addition to thetunneldescription of generic IPv6header destinationtunneling mechanisms, which is theIPv6 tunnel exit-point node. The IPv6 tunnel exit-point node removes the IPv6 tunnel header, and forwards the IPv6 packet further towards the original IPv6 header destination node (see section 3.2). The sectionsfocus of thisdocument describe generic mechanisms for IPv6 tunneling that apply to tunneling of various Internet or lower layer protocol packets. section 7. and 8. describedocument, specificIPv6 tunnelingmechanisms for tunneling IPv6packetsandrespectivelyIPv4packets.packets are also described herein. 2. Terminologynode a device that implements IPv6. upper-layer a protocol layer immediately above IPv6. Examples are transport protocols such as TCP and UDP, control protocols such as ICMP, and internet or lower-layer protocols being "tunneled" over (i.e., encapsulated in) IPv6 such as IPX, AppleTalk, 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 Conta & Deering Expires in six months [Page 4] INTERNET-DRAFT Tunneling in IPv6 February 22, 1996 "tunnels", such as tunnels over IPv4 or IPv6 itself. interface a node's attachment to a link. address an IPv6-layer identifier for an interface or a set of interfaces. packet an IPv6 header plus payload. link MTU the maximum transmission unit, i.e., maximum packet size in octets, that can be conveyed in one piece over a link. path MTU the minimum link MTU of all the links in a path between a source node and a destination node. prefix-net a network of nodes with identical prefix.original packetan Internet or lower layera packet that undergoesencapsulation in a tunnel packet.encapsulation. original header the header of an original packet. tunnel avirtual linkforwarding path between twonodes,nodes on whichan Internet or lower layer protocol packet travels after the entry pointpackets payloads are original packets. tunnel end-node a nodeencapsulates that packet inwhere a tunnelprotocol packet.begins or ends. tunnel header the header prepended to the original packet during encapsulation. It specifies the tunnel end-points as source and destination. tunnel packet a packet that encapsulates an original packet. Conta & Deering Expires in six months [Page5]4] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 1996 tunnelpacket an original packet encapsulated by prepending tunnel header(s) to the original header(s). tunnel entry pointentry-point the tunnel end-node where an original packet isencapsulated, and where a tunnel packet originates; the source node of a tunnel packet identified in the tunnel header.encapsulated. tunnel exit-point the tunnel end-node where a tunnel packet isdecapsulated, and processed further as original packet based on the original header; the destination node of a tunnel packet, identified in the tunnel header. free-exitdecapsulated. IPv6 tunnel a tunnelthat has an unspecified exit-point address (unspecifiedconfigured as a virtual link between two IPv6address).nodes, on which the encapsulating protocol is IPv6. free-exit tunnel a tunnel for which no specific exit-point was configured. fixed-exit tunnel a tunnelthat hasfor which aspecifiedspecific exit-pointaddress (not the unspecified IPv6 address).was configured. tunnel MTU the Path MTUin the tunnel, i.e.between the tunnelentry point nodeentry-point and the tunnel exit-pointnode.nodes; it includes the tunnel headers. tunnel hop limit the maximum number of hops that a tunnel packetis allowed tocan travelin a tunnel, i.e. betweenfrom the tunnelentry point node andentry-point to the tunnelexit-point node.exit-point. inner tunnel a tunnelwhich serves as one (virtual)that is a hopin(virtual link) of another tunnel. outer tunnel a tunnelin whichcontaining one or morehops are themselvesinner tunnels. recursive tunnelIPv6packet a tunnel packet that has as payload a tunnel packet. recursive tunnel header the tunnel header of a recursive tunnel packet. recursive encapsulation Conta & Deering Expires in six months [Page6]5] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 1996a tunnel IPv6 packet encapsulated within a tunnel IPv6 packet, by prepending IPv6 tunnel header(s) to previously prepended IPv6 tunnel header(s). recursive encapsulation encapsulation of a tunnel packet, i.e.encapsulation of an encapsulated packet. tunnel encapsulation limit the maximum number ofrecursiveencapsulations of a packet.default tunnel a tunnel which is the preferred link (virtual) to the default router.3. IPv6 TunnelingTunneling inIPv6 tunneling is a techniquewhich consists infor establishing a "virtual link" between two IPv6 nodesand using that "link"for transmitting datapackets. The twopackets as payloads of IPv6nodespackets (see Fig.1). From the point of view of theIPv6two nodes, this "virtual link",alsocalledan "IPv6 tunnel",IPv6 tunnel, appears as a"link",link on whichtheIPv6protocolacts like a"link layer" protocol. Consequently the two nodes at the two ends of the IPv6 tunnel exchange an Internet or lower layer protocol packet by encapsulating in and decapsulating from an IPv6 packet, as they would encapsulate in and decapsulate from a link layerlink-layer protocolpacket.The two IPv6 nodeswhich are atplay specific roles. One node encapsulates original packets received from other nodes or from itself and forwards thetwo ends ofresulting tunnel packets through theIPv6 tunnel,tunnel. The other node decapsulates theIPv6received tunnelentry point nodepackets and forwards theIPv6 tunnel exit point node play specific roles: A tunnel entry point node can be seen as anresulting originalpacket source - the source of the IPv6 tunnel packetpackets towards their destination, possibly itself. The encapsulator node is called the tunnelentry point node. An IPv6 tunnel main headerentry-point node, andits extension headers, if any, are processed by the IPv6 layer similarly to processing the headers of an original IPv6 packet. Additionally, an IPv6 tunnel packet resulting from encapsulationit isan IPv6 packet that may be the object of a subsequent IPv6 encapsulation, similar to any original packet. A tunnel exit point node can be seen as an original packet destination -thedestinationsource of theIPv6 tunnel packet is thetunnelexit-point node.packets. Thetunnel exit pointdecapsulator nodeprocessesis called theIPv6 main header and its extension headers, if any, of an IPv6tunnelpacket Conta & Deering Expires in six months [Page 7] INTERNET-DRAFT Tunneling in IPv6 February 22, 1996 destined toexit-point, and itsimilarly to processingis theIPv6 headersdestination ofan original packet destined to it.the tunnel packets. Tunnel from node B to node C<-------------------------------------><----------------------> Tunnel TunnelEntry Point Exit PointEntry-Point Exit-Point Node Node +-+ +-+ +-+ +-+|A|->-//->-|B|=========>=====//========>=========|C|->-//-->-|D||A|-->--//-->--|B|=====>=====//=====>=====|C|-->--//-->--|D| +-+ +-+ +-+ +-+ Original Original Packet Packet Source Destination Node NodeFig. 1.Fig.1 Tunnel An IPv6 tunnel is a unidirectional mechanism - tunnel packet flow takes place in one direction between the IPv6 tunnelentry point nodeentry-point andexit pointexit-point nodes (see Fig.1). Bi-directional tunneling is achieved by merging two unidirectional mechanisms, that is, configuring two tunnels, each in opposite direction to the other - the entry-point node of one tunnel is the Conta & Deering Expires in six months [Page 6] INTERNET-DRAFT Tunneling in IPv6 June 13, 1996 exit-point node of the other tunnel (seeFig. 1).Fig.2). Tunnel fromnodeNode B tonodeNode C<---------------------------------------><------------------------> Tunnel Tunnel OriginalEntry PointEntry-Point Exit-Point Original Packet Node Node Packet Source Destination Node Node +-+ +-+ +-+ +-+ ||-->-//->--| |=========>=====//========>=========| |-->-//-->-||-->--//-->--| |=====>=====//=====>======| |-->--//-->--| | |A| |B| |C| |D| ||--<-//-<--| |=========<=====//========<=========| |--<-//--<-||--<--//--<--| |=====<=====//=====<======| |--<--//--<--| | +-+ +-+ +-+ +-+ Original Original Packet Packet Destination Tunnel Tunnel Source Node Exit-PointEntry PointEntry-Point Node Node Node<-------------------------------------><-------------------------> Tunnel fromnodeNode C tonodeNode BFig. 2. Bidirectional tunneling mechanism effect Conta & Deering Expires in six months [Page 8] INTERNET-DRAFTFig.2 Bi-directional Tunnelingin IPv6 February 22, 1996 A bidirectional tunneling mechanism effect can be achieved by merging two unidirectional mechanisms, by defining two tunnels that are each one in opposite direction to the other - the entry point node of one tunnel is the exit point node of the other tunnel (see Fig. 2). A tunnel entry point node can be the original packet source, and similarly a tunnel exit-point node can be the original packet destination, i.e. the beginning or ending of a tunnel can coincide with the source or destination of an original packet. 3.1Mechanism 3.1 IPv6 EncapsulationTheIPv6 encapsulationof a packetconsistsinof prepending to the originalpacket,packet an IPv6 headerand optionallyand, optionally, a set of IPv6 extensionheaders,headers (see Fig.3), which are collectively called tunnel IPv6headers, as graphically shown below in Fig. 3:headers. TheIPv6encapsulation takes place in an IPv6 tunnelentry pointentry-point node,when transmittingas the result of an original packetthroughbeing forwarded onto thetunnel that begins at that entry point node.virtual link represented by the tunnel. The original packet is processed during forwarding according to the forwarding rules of the protocol of that packet. For instance if the original packet is an: (a) IPv6 packet, the IPv6 original header hop limit is decremented by one. (b) IPv4 packet, the IPv4 original header time to live field (TTL) is decremented by one. At encapsulation, the source field of the tunnel IPv6 header is filled with the IPv6 address of the tunnel entry-point node, and the Conta & Deering Expires in six months [Page 7] INTERNET-DRAFT Tunneling in IPv6 June 13, 1996 destination field with the IPv6 address of the tunnel exit-point. Subsequently, the tunnel packetresultedresulting from encapsulation is sent towards the tunnel exit-point node.The tunnelTunnel extension headersare used to controlshould appear in thepacket's processing (forwarding) throughorder recommended by thetunnel.specifications that define the extension headers, such as [RFC- 1883]. A source of original packets and a tunnel entry-point that encapsulates those packets can be the same node. +----------------------------------//-----+ | Original | | | | Original Packet Payload | | Headers | | +----------------------------------//-----+ < OriginalpacketPacket > | v <Tunnel IPv6headers>Headers> < Original Packet > +---------+ - - - - - +-------------------------//--------------+ | IPv6 | IPv6 | | | | Extension | Original Packet | | Header | Headers | | +---------+ - - - - - +-------------------------//--------------+ < Tunnel IPv6packetPacket >Fig. 3.Fig.3 Encapsulating apacket If the transmitting ofPacket 3.2 Packet Processing in Tunnels The intermediate nodes in theoriginal packet throughtunnel process the IPv6 tunnelispackets according to theresult ofIPv6 protocol. For example, aforwarding operation, the original packettunnel Hop by Hop Options extension header is processedbefore encapsulation according toby each receiving node in the tunnel; a tunnel Routing extension header identifies the intermediate processing nodes, and controls at a finer granularity the forwardingrulespath of theprotocol oftunnel packet through theoriginal header. For instance iftunnel; a tunnel Destination Options extension header is processed at theoriginal packettunnel exit-point node. 3.3 IPv6 Decapsulation Decapsulation isan:graphically shown in Fig.4: Conta & Deering Expires in six months [Page9]8] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 1996(a) IPv6 packet, and it is tunneled as result of an IPv6 forwarding operation, the IPv6 original packet hop limit is decremented by one during forwarding. (b) IPv4 packet, and it is tunneled as result of an IPv4 forwarding operation through an IPv6 tunnel, the IPv4 original packet time to live field (TTL) is decremented by one during forwarding. 3.2 IPv6 Decapsulation The decapsulation is graphically shown below in Fig. 4:+---------+- - - - - -+----------------------------------//-----+ | IPv6 | IPv6 | | | | Extension | Original Packet | | Headers | Headers | | +---------+- - - - - -+----------------------------------//-----+ < Tunnel IPv6packetPacket > | v +----------------------------------//-----+ | Original | | | | Original Packet Payload | | Headers | | +----------------------------------//-----+ < OriginalpacketPacket >Fig. 4.Fig.4 Decapsulating apacket from the tunnel IPv6 headers The IPv6 protocol layer of a tunnel exit-point nodePacket Upon receiving an IPv6 packet destined toonean IPv6 address ofthe node'sa tunnel entry-point node, its IPv6addressesprotocol layer processes thepacket accordingtunnel headers. When processing is complete, control is handed to theIPv6 protocol. Anext protocol engine, which is identified by the Next Header field valueset to a Tunnel Protocol Value (value 41 for IPv6)in theIPv6 header, or thelastIPv6 extensionheaderof the packet identifies the packet asprocessed. If this is set to a tunnelpacket. Upon the completion ofprotocol value, theIPv6tunnel protocollayer processing of a tunnel packet, control is given to the Tunnel Protocol layer. The Tunnel Protocol layer discards theengine discards the tunnel headers and passes the resulting original packet to the Internet or lower layer protocol identified by that value for furtherprocessing - forprocessing. For example, in the case the Next Headervalue 41,field has the IPv6 Tunnel Protocol value, the resulting original packet is passed to the IPv6 protocol layer.Conta & Deering Expires in six months [Page 10] INTERNET-DRAFT Tunneling in IPv6 February 22, 1996 3.3The tunnel exit-point node, which decapsulates the tunnel packets, and the destination node, which receives the resulting original packets can be the same node. 3.4 IPv6 Tunnel Protocol EngineThe packetPacket flow (paths #1-7) through the IPv6 Tunnel Protocol Engine on a node is graphically shown below inFig. 5:Fig.5: Conta & Deering Expires in six months [Page 9] INTERNET-DRAFT Tunneling in IPv6 June 13, 1996 +-----------------------+ +-----------------------------------+ |Upper LayerUpper-Layer Protocols | | IPv6 Tunnel Upper-Layer | | | | | | | | ---<-------------------<------- | | | | | ---->---|------>--------- | | | | | | | | | | | | +-----------------------+ +-----------------------+ | | | | | | | | | | | | v ^ | v ^ v ^ v ^ v ^ Tunnel | | | | | | | | | | | |packets|Packets| | | | +---------------------------------------------+ | | | | | | | | | / / | | | | D E | | v ^ IPv6 | --<-3--/-/--<---- | | | | E N | | | | Layer ---->-4-/-/--->-- | | | | | C C | | v ^ / / | | | | | | A A | | | | 2 1 | | | | | | P P | | v ^ -----<---5---/-/-<---- v ^ v ^ | | S S | | | | | -->---6---/-/-->-- | | | | | | | U U | | v ^ | | / / 6 5 4 3 8 7 | | L L | | | | | | / / | | | | | | | | A A | | v ^ v ^ / / v ^ | | | | | | T T | +---------------------------------------------+ | E E | | | | | | | | | | | | | | | | | v ^ v ^ v ^ v ^ v ^ v ^ Original| | | | | | | | | | | | | | | |packetsPackets | v ^ | +-----------------------+ +-----------------------+ | | | | | | | | | | | | | | | | | | | ---|----|-------<-------- | | | | | --->--------------->------>---- | | | | | |Link LayerLink-Layer Protocols | | IPv6 TunnelLink LayerLink-Layer | +-----------------------+ +-----------------------------------+Fig. 5.Fig.5 Packet Flow-in the IPv6 Tunneling Protocol Engine on a Node The "tunnel-layer" protocol engine acts as both an "upper-layer" and a"link layer": (a) The "tunnel upper-layer" has"link-layer", each with a specific input and output as"input"follows: (u.i) "tunnel upper-layer input" - consists of tunnel IPv6 packetswhichthat are going to be decapsulated. The tunnel packets are incoming through the IPv6 layerfromfrom: (u.i.1) a link-layer - (path#1 in Fig. 5) - or from a tunneling link-layer (the exit-point node of an inner#1, Fig.5) These are tunnelcoincides with the exit-pointpackets destined to this nodeof anand will undergo decapsulation. Conta & Deering Expires in six months [Page11]10] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 1996outer tunnel)(u.i.2) a tunnel link-layer - (path#7 in Fig. 5). The#7, Fig.5) These are tunnel packets that underwent one or more decapsulations on this node, that is, the packets had one or more recursive tunnel headers and one recursive tunnel header was just discarded. This node is the exit-point of both an outer tunnel and one or more of its inner tunnels. For both above cases the resulting original packets are passed back to the IPv6 layer as "tunnellink- layer"link-layer" output for further processing- see (d). (b) The(see b.2). (u.o) "tunnelupper-layer" has as "output"upper-layer output" - consists of tunnel IPv6 packetsresulting from encapsulation of original packets - see (c)that are passed through the IPv6 layer down to: (u.o.1) a link-layer -or(path #2, Fig.5) These packetsresulted from previous encapsulations - when this node is an entry point to an outer tunnelunderwent encapsulation andto an inner tunnel. The "output" tunnel packetsarepassed throughsent towards theIPv6 layer down totunnel exit-point (u.o.2) a tunnel link-layerfor transmission- (path#2 Fig. 5) - or to a#8, Fig.5) These tunnellink-layer for another encapsulation (the entry pointpackets are going to be recursively encapsulated. This nodein an inner tunnel coincides withis theentry pointentry-point nodeinof both an outertunnel) - (path #8 in Fig. 5).tunnel and one or more of its inner tunnel. Implementation Note:the "tunnel upper-layer"The tunnel upper-layer input and outputmaycan be implemented similar to theother upper layer protocolsinput andoutput. (c)output of the other upper-layer protocols. The"tunnel link-layer" hastunnel link-layer input and output are as"input"follows: (l.i) "tunnel link-layer input" - consists of original IPv6 packetswhichthat are going to be encapsulated. The original packets are incoming through the IPv6 layerfromfrom: (l.i.1) an upper-layer(original- (path #4, Fig.5) These are original packetsoriginatedoriginating on thisnode) - (path #4node that undergo encapsulation. The original packet source and tunnel entry-point are the same node. Conta & Deering Expires in six months [Page 11] INTERNET-DRAFT Tunneling inFig. 5)IPv6 June 13, 1996 (l.i.2) a link-layer -or(path #6, Fig.5) These are original packets incoming from alink layer (original packets originateddifferent node that undergo encapsulation on this tunnel entry- point node. (l.i.3) adifferent node)tunnel upper-layer - (path#6 in Fig. 5).#8, Fig.5) These packets are tunnel packets that undergo recursive encapsulation. This node is both the entry- point node of an outer tunnel and one or more of its inner tunnels. The resulting tunnel packets are passed as tunnel upper-layer output packets through the IPv6 layer (see u.o) downto ato: (l.o) "tunnel link-layerfor transmissionoutput" -see (b). (d) The "tunnel link-layer" has as "output"consists of original IPv6 packets resulting fromdecapsulation - see (a) - whichdecapsulation. These packets are passed through the IPv6 layerup toto: (l.o.1) an upper-layer(the- (path #3, Fig.5) These originalpacket ispackets are destined to thisnode) - (path #3 in Fig. 5) - or down tonode. (l.o.2) a link-layer(the- (path #5, Fig.5) These originalpacket ispackets are destined to anothernode, so it is forwarded) - (path #5 in Fig. 5). Implementation Note: the "IPv6 tunnel link layer"node; they are transmitted on a link towards their destination. (l.o.3) a tunnel upper-layer - (path #7, Fig.5) These packets undergo another decapsulation; they were recursive tunnel packets. This node is both the exit- point node of an outer tunnel and one or more inner tunnels. Implementation Note: The tunnel link-layer input and outputmaycan be implemented similar toother link layer protocolsthe input andoutput,output of other link-layer protocols, forinstance byinstance, associating an interface orpseudo- interfacepseudo-interface with the IPv6 tunnel. The selection of the "IPv6 tunnel link" over other links results from the packet forwarding decision taken based on the content of the node's routing table. Conta & Deering Expires in six months [Page 12] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 19963.4 IPv6 Tunnels and Address Formats Although the IPv6 addresses of the two end-nodes of an IPv6 tunnel can be viewed as "virtual link" addresses, they have an IPv6 address format - [RFC-1884]. 3.5 IPv6 Tunnels and IPv6 Autoconfiguration Although the IPv6 addresses of the two end-nodes of an IPv6 tunnel can be viewed as "virtual link" addresses of a pseudo-interface, the IPv6 Autoconfiguration [ADDRCONF] mechanisms do not apply for the pseudo-interface. 3.6 IPv6 Tunnels and IPv6 Neighbor Discovery Although the IPv6 addresses of the two ends of an IPv6 tunnel can be viewed as "virtual link" addresses, the IPv6 Neighbor Discovery mechanisms do not apply.4. Recursive Encapsulation Recursive IPv6 encapsulation is the encapsulation of a tunnel packet. It takes place whenportionsa hop of an IPv6 tunnelare IPv6 tunnels themselves, i.e.is a tunnel. The tunnelcontainscontaining a tunnel is called an outer tunnel. The tunnel contained in the outer tunnel is called an innertunnelstunnel - seeFig. 6.Fig.6. Outer Tunnel <-------------------------------------><--------------><--links--><-virtual link-><--links---> Inner Tunnel Outer Tunnel Outer TunnelEntry Point Exit PointEntry-Point Exit-Point Node Node +-+ +-+ +-+ +-+ +-+ +-+ | | | | | | | | | | | | | |->-//->-| |=>=//=>=| |**>**//**>**| |=>=//=>==||->-//-->-||->-//->-| | | | | | | | | | | | | | +-+ +-+ +-+ +-+ +-+ +-+ Original Inner Tunnel Inner Tunnel Original PacketEntry Point Exit PointEntry-Point Exit-Point Packet Source Node Node Destination Node NodeFig. 6.Fig.6. Recursive Encapsulation Theentry pointentry-point node of an "inner IPv6 tunnel"may receive and Conta & Deering Expires in six months [Page 13] INTERNET-DRAFT Tunneling in IPv6 February 22, 1996 encapsulate packets that arereceives tunnel IPv6 packets encapsulatedat anby the "outer IPv6 tunnel"entry pointentry-point node.TheseThe "inner tunnel entry-point node" treats the receiving tunnel packetsareas original packets and performs encapsulation. The resulting packets are "tunnel packets" for the "inner IPv6tunnel" entry point node, the result of their encapsulation attunnel", and "recursive tunnel packets" for the"inner IPv6 tunnel entry point node" is a "tunnel IPv6 packet" for the "inner IPv6 tunnel", and a "recursive tunnel IPv6 packet" for the "outer"outer IPv6 tunnel". 4.1 Limiting Recursive EncapsulationThere is a practical limit on how many "inner IPv6 tunnels" an "outerA tunnel IPv6tunnel" may have which results frompacket size is limited to the maximumnumber of possibleIPv6encapsulations of a packet.datagram size [RFC 1883]. Each encapsulation adds to the size of a tunnel packet the size of the tunnel IPv6 headers. Consequently,inthecasenumber ofinner tunnels,recursive tunnel headers, and therefore, the number of recursiveencapsulations is practically limited byencapsulations, and furthermore, the number oftunnel"inner IPv6headerstunnels" that an "outer IPv6 tunnel" canbe prepended to the original packet before the resulting tunnel packet hitshave are limited by the maximumIPv6 datagram size [RFC-1883].packet size. The increase in the size of a tunnel IPv6 packet due to repeated recursiveencapsulationencapsulations may require fragmentationat a tunnel entry point node[RFC-1883] - see Conta & Deering Expires in six months [Page 13] INTERNET-DRAFT Tunneling in IPv6 June 13, 1996 section 7.Each nextFurthermore, each fragmentation, due to recursiveencapsulationencapsulation, ofaan already fragmented tunnelIPv6 fragment may resultpacket results in anew fragmentation and thus the additiondoubling ofone more fragment totheprevious existingnumber of fragments.Therefore,Moreover, it ishighlyprobable that oncethethis fragmentationof a tunnel IPv6 packet was triggered,begins, eachnextnew recursive encapsulationmay resultresults in yet additionalfragmentation, and thus IPv6 fragment multiplication. Therefore, it is recommended to keepfragmentation. Therefore limiting recursive encapsulationto a minimum.is recommended. The proposed mechanism forcontrollinglimiting excessive recursive encapsulation is a "tunnel encapsulationlimit" thatlimit", which is carried in an IPv6 Destination Option header. 4.1.1 Tunnel Encapsulation Limit The "Tunnel Encapsulation Limit" destination option header is built only by tunnelentry pointentry-point nodes, it is discarded only by tunnel exit-point nodes, and it is used to carry optional information [RFC- 1883] that need be examined only by tunnelentry pointentry-point nodes.ItThe "Tunnel Encapsulation Limit" destination option header is definedaccording to [RFC-1883]as follows:Conta & Deering Expires in six months [Page 14] INTERNET-DRAFT Tunneling in IPv6 February 22, 1996Option Type Opt Data LenTun Encap LimOpt Data Len 0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0 0 0 0 0 1 0 0| 1 |u_8intTun Encap Lim | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Option Typedecimalvalue 4 - the highest-order two bits - set to 00 -specifyindicate "skip over this option if the option is not recognized".The- the third-highest-order bit - set to 0 -specifiesindicates that the option data in this option does not changeen-routeen route to the packet's destination [RFC-1883]. Opt Data Len value 1 - the data portion of the Option is one byte long.Tun Encap LimOpt Data Value the Tunnel Encapsulation Limit value - 8-bit unsignedinteger (u_8int).integer. To avoid excessive recursive encapsulation, an IPv6 tunnelentryentry- Conta & Deering Expires in six months [Page 14] INTERNET-DRAFT Tunneling in IPv6 June 13, 1996 point node mayprepend, as part of the IPv6 tunnel headers,prepend to a packet undergoing encapsulation a "Tunnel Encapsulation Limit - DestinationExtension Header" -Options" tunnel header with the"Tun Encap Lim - tunnel encapsulation limit" -"Opt Data Value" field set to: (a) a pre-configured value - if the packet has no previous "Tunnel Encapsulation Limit" header - see section 6.6. (b) a value resulting from a pre-existent value - if the packet has a previous "Tunnel Encapsulation Limit"header, theheader. The value from the previous header is copied into the newly prepended "Tunnel Encapsulation Limit" header and then decremented by one. This is an exceptionfromto the rule of processing destination extensionheaders,headers inthatthat, although theentry pointentry-point node is not a destination node,during the encapsulation of a packet,the IPv6 tunneling protocol engine looks ahead during the encapsulation of a packet in the extant tunnel headersof that packetfor the "Tunnel Encapsulation Limit" destination option header. If the Tunnel Encapsulation Limit is decremented to zero, the packet undergoing encapsulation is discarded.Upon discardingWhen thepacket,packet is discarded, a Parameter Problem ICMP message [RFC-1885] is returned to the packetoriginator -originator, which is theParameter Problem ICMPprevious tunnel entry-point. The message pointsintoto the Opt Data Value field within the Tunnel Encapsulation Limit destination header of thepacket,packet. The field pointed toConta & Deering Expires in six months [Page 15] INTERNET-DRAFT Tunneling in IPv6 February 22, 1996 the Tun Encap Lim field, whichhasthea value of one. Two cases of recursive encapsulation that should be avoided are described below: 4.1.2 Loopback Recursive Encapsulation A particular case of recursive encapsulation which must be avoided is the loopback recursive encapsulation. Loopback recursive encapsulation takes place when a tunnel IPv6entry pointentry-point node encapsulates tunnel IPv6 packets originated from itself, and destined to itself. Thismaycan generate an infinite processing loop in theentry pointentry-point node. To avoid suchan infinite processing loop in the tunnel entry point node IPv6 protocol engine, the tunneling engine should not encapsulate packetsa case, it is recommended that an implementation have a mechanism that checks and rejects thepairconfiguration of a tunnelentry pointin Conta & Deering Expires in six months [Page 15] INTERNET-DRAFT Tunneling in IPv6 June 13, 1996 which both the entry-point and exit-point node addresses belong to the sameas the pair of original packet source address and final destination address. To avoid the additional processing in the tunneling protocol engine that the above validation mechanism would require, itnode. It is also recommended that thevalidation be done at tunnel configuration time:encapsulating engine checks for and rejects the encapsulation of anode should not permit configuring tunnelspacket that has the pair of tunnelentry pointentry-point andexit- pointexit-point addressesareidentical with the pair of original packet sourceaddressand final destinationaddress, and both the entry point node and exit-point node addresses belong to the entry point node.addresses. 4.1.3 Routing Loop Recursive Encapsulation In the case of apacketforwarding pathinvolvingwith multiple levels of inner tunnels, a routing loop from an inner tunnel to an outer tunnel is particularly dangerous when the loop includes the outer tunnel entry-point node without including the outer tunnel exit-point. The danger issuchthatathe outer tunnelIPv6 packet encapsulated at a certain tunnel entry point node reaches again that tunnel entry pointentry-point nodebefore reaching that tunnel exit- point node. Because there is no relationship betweenmay recursively encapsulate packets excessively, with the negative effects described in 4.1. Because each encapsulation adds a tunnelIPv6header with a new hop limitand the original packet hop limit, a tunnel packet reaching its originator - a tunnel entry point - in a routing loop may expire only after an excessively large number of encapsulations. Additionally, in such a routing loop case, because the prepending of Conta & Deering Expires in six months [Page 16] INTERNET-DRAFT Tunneling in IPv6 February 22, 1996value, thetunnelIPv6headers adds tohop limit mechanism cannot control thesizenumber of times thepackets, a tunnelpacketmay grow toreaches themaximum packet size limit [RFC-1883], resulting inouter tunnelpacket fragmentation,entry-point node, andfragment multiplication.thus cannot control the number of recursive encapsulations. When the path of a packet from source to final destination includes tunnels, the maximum number of hops that the packet can traverseisshould be controlled by two mechanismsthat areused together to avoid the negative effects ofrouting loopsrecursive encapsulation intunnels:routing loops: (a) the originalIPv6packet hoplimit,limit. It is decremented at each forwarding operation performed on an original packet. This includes each encapsulation of the originalpacket, including atpacket. It does not include recursive encapsulations of thepoints where it is encapsulated and decapsulated.original packet (b) the tunnel IPv6 packet encapsulationlimit,limit. It is decremented at each recursive encapsulation of the packet.4.1.4 Risk Factors in Recursive Encapsulation The cases which presentFor ahigh riskdiscussion of the excessiverecursiveencapsulationare thoserisk factors inwhich arecursive encapsulation see Appendix A. 5. Tunnel IPv6 Header The tunnelentry pointentry-point nodecannot discern betweenfills out avalid and an invalid recursive encapsulation. Routing loops that causetunnelpackets reach nodes that were already reached before are certainlyIPv6 main header [RFC-1883] as follows: Conta & Deering Expires in six months [Page 16] INTERNET-DRAFT Tunneling in IPv6 June 13, 1996 Version: value 6 Priority: Depending on themajor cause ofentry-point node tunnel configuration, theproblem. But since routing loops exist, and happen, it is importantpriority can be set tounderstand and describe,that of either thecases in whichoriginal packet or a pre-configured value - see section 6.3. Flow label: Depending on therisk for excessive recursive encapsulationentry-point node tunnel configuration, the flow label can be set to a pre-configured value. The typical value ishigher. There are two significant elements that determinezero - see section 6.4. Payload Length: The original packet length. If therisk factor of routing loop excessive recursive encapsulation: (a)packet is prepended with tunnel IPv6 extension headers, this value is set to thetype of tunnel, (b)original packet length plus thetypelength ofroutethe encapsulating IPv6 extension headers. Next header: The next header value according to [RFC-1883] from thetunnel exit-point, which determinesAssigned Numbers RFC [RFC-1700 or its succesors ]. For example, if the original packetforwarding through the tunnel, i.e. overis an IPv6 packet, this is set to: - decimal value 41 (Assigned payload type number for IPv6) - if there are no tunnel extension headers. - value 0 (Assigned payload type number for IPv6 Hop by Hop Options header) - if a hop by hop options header immediately follows the tunnelvirtual-link. TheIPv6 header. - decimal value 60 (Assigned payload typeof tunnels which were identified asnumber for IPv6 Destination Options header) - if ahigh risk factor of excessive recursive encapsulation in routing loops are: "inner tunnels with identical exit-points". These tunnels can be:Tunnel Encapsulation Limit destination option header immediately follows the tunnel IPv6 header. Conta & Deering Expires in six months [Page 17] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 1996"fixed-end inner tunnels with different entry-points", or: "free-end inner tunnels with different entry-points" Note that free-end inner tunnels fall always into the category of identical exit-point tunnels. Since the source and destination of an original packetHop limit: The tunnel IPv6 header hop limit isthe main information used to decide whetherset toforward a packet throughatunnel or not, an excessive recursive encapsulation can be avoided in casepre-configured value - see section 6.3. The default value for hosts is the Neighbor Discovery advertised hop limit [IPv6ND]. The default value for routers is the default IPv6 Hop Limit [TBD] value from the Assigned Numbers RFC. Source Address: An IPv6 address ofa single tunnel (non-inner), by checking thatthepacket to be encapsulated was not originated byoutgoing interface of theentry pointtunnel entry-point node. Thismechanismaddress issuggested in [IPv4TUN]. However, this type of protection does not seem to work well in case of inner tunnels with different entry-points, and identical exit- pointsconfigured as tunnel entry-point node address - seeAppendix A. Inner tunnels with different entry-points, and identical exit-points introduce ambiguity in deciding whether to encapsulate or not a packet, when a packet encapsulated in an innersection 6.1. Destination Address: An IPv6 address of the tunnelreachesexit-point node. If theentry point node of an outertunnelby means ofis configured as arouting loop. Becausefree-exit tunnel, then thesourceIPv6 address of thetunnel packet isdestination from theinneroriginal IPv6 header - see section 6.2. 5.1 Tunnel IPv6 Extension Headers Depending on IPv6 node configuration parameters, a tunnelentry pointentry-point nodewhich is different thanmay append to theentry point node of the outer tunnel, the source address checking fails to detect an invalid encapsulation, and as consequence the tunnel packet gets encapsulated at the outer tunnel, each time it reaches it through the routing loop. The type of route to atunnelexit-point node has been also identifiedIPv6 main header one or more IPv6 extension headers, such asa high risk factorhop by hop, routing, or others. To limit the number ofexcessiverecursiveencapsulation in routing loops. One typeencapsulations ofroute to a tunnel exit-point node is a route to a specified destination node, i.e. the destination isavalid specified IPv6 address (routepacket, if it was configured tonode). Suchdo so - see section 6.6 - aroute can be selected based on the longest path match of an original packet destination address with the destination address stored in thetunnelentry point node routing table entry for that route. The packet forwarded on such a route is first encapsulated and then forwarded towardsentry-point appends as the last tunnelexit-point node. Another type of route to a tunnel exit-point node is a route to a specified prefix-net, i.e. the destination is a valid specified IPv6 prefix (route to net). Suchextension header aroute can be selected based on the longest path match of an original packetTunnel Encapsulation Limit destinationaddressoption header withthefields set as follows: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header |Hdr Ext Len = 0| Opt Type = 4 |Opt Data Len=1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Tun Encap Lim |PadN Opt Type=1|Opt Data Len=1 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Conta & Deering Expires in six months [Page 18] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 1996prefix destination stored in the tunnel entry point node routing table entry for that route. The packet forwarded on such a route is first encapsulated and then forwarded towardsNext Header: Identifies thetunnel exit-point node. And finally anothertype ofroute to a tunnel exit-point is a default route, or a route to an unspecified destination, i.e.thedestination isoriginal packet header. For example, if the"unspecified"original packet is an IPv6address. This routepacket, the next header protocol value isselected when no- other matchset to decimal value 41 (Assigned payload type number for IPv6). Hdr Ext Len: Length of the Tunnel Encapsulation Limit destinationofoption header in 8-octet units, not including theoriginal packet has been foundfirst 8 octets. Set to value 0. Option Type: value 4 - see section 4.1.1. Opt Data Len: value 1 - see section 4.1.1. Tun Encap Lim: 8 bit unsigned integer - see section 4.1.1. Option Type: value 1 - PadN option, to align the header following this header. Opt Data Len: value 1 - one octet of option data. Option Data: value 0 - one zero-valued octet. 6. IPv6 Tunnel State Variables The IPv6 tunnel state variables, some of which are or may be Conta & Deering Expires in six months [Page 19] INTERNET-DRAFT Tunneling in IPv6 June 13, 1996 configured on therouting table. Atunnelthatenrty-point node, are: 6.1 IPv6 Tunnel Entry-Point Node Address The tunnel entry-point node address is one of thevirtual-linkvalid IPv6 unicast addresses ofa default route, i.e.thelink to a default router, is a "default tunnel". Ifentry-point node - theroute to avalidation of the address at tunnelexit-pointconfiguration time isa route to node, the risk factor for excessive recursive encapsulation is minimum. If the route to arecommended. The tunnelexit-pointentry-point node address isa routecopied tonet,therisk factor for excessive recursive encapsulation is medium. Theresource address field in the tunnel IPv6 header during packet encapsulation. 6.2 IPv6 Tunnel Exit-Point Node Address The tunnel exit-point node address isa range ofused as IPv6 destinationaddresses that will match the prefixaddress for theroute is associated with. If one or more inner tunnels with differenttunnelentry-points haveIPv6 header. The tunnel exit-point nodeaddresses that matchaddress can be configured with a specific IPv6 address, in which case theroute to net of an outertunnelexit-point, then an excessive recursive encapsulation may occur ifis called a fixed-exit tunnel. Such a tunnelpacket gets diverted from inside such an inner tunnelacts like a virtual point to point link between theentryentry-point node and exit- pointofnode. Alternatively, a tunnel exit-point address can be configured with no specific address, in which case theoutertunnelthat hasis called aroutefree-exit tunnel. Such a tunnel acts like a virtual point toits exit-point that matchespoint link between theexit-point ofentry-point node and aninner tunnel. Ifexit-point node identified by theroute to adestination address from the original packet header. The tunnel exit-point node address isa default route,copied to the destination address field in therisk factor for excessive recursive encapsulation is maximum. Packets are forwarded through a defaulttunnelfor lackIPv6 header during packet encapsulation. The configuration ofa better route. In many situations, forwarding through a defaultthe tunnelcan happen for a wide range of destinationentry-point and exit-point addresseswhich at the maximum extent is the entire Internet minus the node's link. As consequence, itislikely that in a routing loop case, if a tunnel packet gets diverted from an inner tunnelnot subject toan outerIPv6 Autoconfiguration, or IPv6 Neighbor Discovery. 6.3 IPv6 Tunnel Hop Limit An IPv6 tunnelentry pointis modeled as a "single-hop virtual link" tunnel, in which the passing of the original packet through the tunnel isa default tunnel,like the passing of the original packetwill be once more encapsulated, becauseover a one hop link, regardless of thedefault routing mechanism will not be able to discern differently, based onnumber of hops in thedestination - see Appendix B. 5. TunnelIPv6Headertunnel. The "single-hop" mechanism should be implemented by having the tunnel entry point nodefills outset a tunnel IPv6mainheader[RFC-1883] as follows: Version:hop limit independently of the hop limit of the original header. The "single-hop" mechanism hides from the original IPv6 packets the Conta & Deering Expires in six months [Page19]20] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 19966 Priority: Depending on the entry point node tunnel configuration,number of IPv6 hops of thepriority may be set totunnel. It is recommended thatoftheoriginal packet, or totunnel hop limit be configured with apre-configuredvalue- see section 6.3. Flow label: Depending onthat ensures: (a) tunnel IPv6 packets can reach theentry point nodetunnelconfiguration,exit-point node (b) quick expiration of theflow label may be set totunnel packet if apre-configured value.routing loop occurs within the IPv6 tunnel. Thetypicaltunnel hop limit default value for hosts iszero - see section 6.4. Payload Length: The original packet length. In casethepacket is prepended with tunnelIPv6extension headers, thisNeighbor Discovery advertised hop limit [IPv6ND]. The tunnel hop limit default value for routers isset to the original packet length plus the length oftheencapsulatingdefault IPv6extension headers. Next header: The next headerHop Limit valueaccording to [RFC-1883][TBD] from the Assigned NumbersRFC [RFC-1700]. For example, if the original packetRFC. The tunnel hop limit isan IPv6 packet, and there are no intermediate headers,copied into thenext header protocol value is set to 41 (Assigned payload type number for IPv6). If a hop byhopoption header is immediately followinglimit field of the tunnel IPv6header, then the nextheaderprotocol value in this field is set to 0 (Assigned payload type number for IPv6 Hopof each packet encapsulated byHop Options header). If a Tunnel Encapsulation Limit destination option header is immediately followingthe tunnel entry-point node. 6.4 IPv6header, thenTunnel Packet Priority The IPv6 Tunnel Packet Priority indicates thenext header protocolvalue that a tunnel entry-point node sets inthisthe priority field of a tunnel header. The default value isset to 60 (Assigned payload type number for IPv6 Destination Options header). Hop limit:zero. The Packet Priority can also indicate whether the value of the priority field in the tunnelIPv6headerhop limitis copied from the original header, or it is set toathe pre-configuredvalue - see Section 6.3. Conta & Deering Expires in six months [Page 20] INTERNET-DRAFT Tunneling invalue. 6.5 IPv6February 22, 1996Tunnel Flow Label ThedefaultIPv6 Tunnel Flow Label indicates the valuefor hosts isthat a tunnel entry- point node sets in theneighbor discovery advertised hop limit [IPv6ND].flow label of a tunnel header. The default valuefor routersisthe defaultzero. 6.6 IPv6HopTunnel Encapsulation Limit The Tunnel Encapsulation Limit[TBD]valuefrom the Assigned Numbers RFC. Source Address: IPv6 address of the outgoing interface ofcan indicate whether thetunnel entry point node. This address is configured as entryentry- point nodeaddress - see section 6.1. Destination Address: IPv6 address of the tunnel exit-point node. If the tunnelis configuredwith an unspecified exit-point node address, thento limit theIPv6 addressnumber ofthe destination from the original IPv6 header - see section 6.2. 5.1 Tunnel IPv6 Extension Headers Dependingencapsulations of tunnel packets originating onvariousthat node. The IPv6node configuration parameters a tunnel entry point node may append toTunnel Encapsulation Limit is thetunnel IPv6 main header, one or more IPv6 extension headersmaximum number of encapsulations permitted for packets undergoing encapsulation at thatare not directly relatedentry-point node. Recommended default value is 5. An entry-point node configured totunneling, such as hop by hop, routing,...etc, and therefore they are not discussed here. Tolimit the number of recursive encapsulationsof a packet, if it was configured to do so - see section 6.6 - a tunnel entry point appends after the tunnel IPv6 main header, or after the hop by hop extension header, if any,prepends a TunnelEncapsulation Limit destination option header with fields set as follows: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header |Hdr Ext Len = 0| Opt Type = 4 |Opt Data Len=1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Tun Encap Lim |PadN Opt Type=1|Opt Data Len=1 | 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Conta & Deering Expires in six months [Page 21] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 1996Next Header: Identifies the type of header immediately following the TunnelEncapsulation Limit destinationoptionoptions header[RFC- 1883]. If theto an original packetis an IPv6 packet,undergoing encapsulation - see section 4.1, andthere are no intermediate headers, the next header protocol value is set to 41 (Assigned payload type number for IPv6). Hdr Ext Len: Length of the Tunnel Encapsulation Limit destination option header in 8-octet units, not including the first 8 octets. Set to value 0. Option Type: 4 - see 4.1.1. Opt Data Len: 1 - see4.1.1.Tun Encap Lim: 8 bit unsigned integer - see 4.1.1. Option Type: 1 - PadN option, to align the header following this header. Opt Data Len: 1 - one octet of option data. Option Data: One zero-valued octet. Conta & Deering Expires in six months [Page 22] INTERNET-DRAFT Tunneling in IPv6 February 22, 1996 6.6.7 IPv6 TunnelState VariablesMTU TheIPv6 tunnel state variables, some of which are or may be configured, are: (a) thetunnelentry point node address -MTU isconfigured (b)set dynamically to thetunnel exit-point node address - is configured (c)Path MTU of thetunnel hop limit - is configured (d)tunnel: thetunnelmaximum size of a packetpriority - is configured (e)that can be sent through the tunnelpacket flow label - is configured (f)without fragmentation [RFC-1883]. The tunnel entry-point node performs Path MTU discovery on the tunnelencapsulation limit - may[IPv6PMTU], [RFC-1885]. Although it should beconfigured (g) theable to send a tunnelMTU 6.1IPv6Tunnel Entry Point Node Address The tunnel entry point node address is onepacket oftheany validIPv6 unicast addresses belonging to the entry pointsize, a tunnel entry-point node-attempts to avoid thevalidationfragmentation ofthe address at tunnel configuration time is recommended. Thetunnelentry point node address is copiedpackets, by reporting tothesourceaddress field innodes of original packets thetunnel IPv6 header during packet encapsulation. 6.2MTU to be used in sizing original packets sent towards that tunnel entry-point node. 7. IPv6 TunnelExit-Point Node Address ThePacket Size Issues A tunnelexit-point node address is used aspacket resulting from the encapsulation of an IPv6destination address for theoriginal packet may require fragmentation. A tunnel IPv6header. The tunnel exit-point node address may be configured with a specificpacket resulting from the encapsulation of an original packet is considered an IPv6address, in which casepacket originating from the tunnelactsentry-point node. Therefore, like any source of an IPv6 packet, avirtual point to point link between the entry pointtunnel entry-point nodeand exit-point node, or with the Unspecifiedmust support fragmentation of tunnel IPv6address [RFC-1884], in which case thepackets. A tunnelacts likeintermediate node that forwards avirtual pointtunnel packet topoint link between the entry point node and an exit-pointanother nodeidentified byin thedestination address fromtunnel follows theoriginalgeneral IPv6 rule that it must not fragment a packetheader.undergoing forwarding. 7.1 IPv6 Tunnel Packet Fragmentation Tunnel packets that exceed the tunnel MTU are candidates for fragmentation. The fragmentation of tunnelexit-point node addresspackets containing IPv6 original packets iscopiedperformed as follows: (a) if the original IPv6 packet size is larger than 576 octets, the entry-point node discards the packet and it returns an ICMPv6 "Packet Too Big" message to thedestination address field insource node of thetunnel IPv6 header duringoriginal packetencapsulation.indicating the MTU size to be used by that Conta & Deering Expires in six months [Page23]22] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 19966.3 IPv6 Tunnel Hop Limit An IPv6 tunnel is modeled as a "single-hop virtual link" tunnel,node inwhich regardless ofsizing original packets sent towards thenumber of hops in the IPv6 tunnel,tunnel entry-point. The MTU is the originalpacket's passing throughpacket size minus the size of the tunnelis likeheaders - see section 8.2. (b) if the originalpacket's passing over a one hop link. The "single-hop" mechanism should be implemented by havingIPv6 packet is equal or smaller than 576 octets, the tunnelentry pointentry-point nodeset a tunnel IPv6 header hop limit independently of the original headers. The "single-hop" mechanism hides toencapsulates the originalIPv6 packetspacket, and subsequently fragments the resulting IPv6topology of the tunnel. Thetunnelhop limit is configuredpacket intothe tunnel entry point node with a value that: (a) ensuresIPv6 fragments that do not exceed the tunnelIPv6MTU. 7.2 IPv4 Tunnel Packet Fragmentation Tunnel packetsreachthat exceed the tunnelexit- point node (b) ensures a quick expirationMTU are candidates for fragmentation. The conditions that determine IPv4 fragmentation ofthetunnelpacketpackets are as follows: (a) ifa routing loop occurs withinin theIPv6 tunnel. The tunnel hop limit default value for hosts isoriginal IPv4 packet header theneighbor discovery advertised hop limit [IPv6ND]. The tunnel hop limit default value for routersDon't Fragment - DF - bit flag is SET, thedefault IPv6 Hop Limit [TBD] value fromentry-point node discards theAssigned Numbers RFC.packet and returns an ICMP message. Thetunnel hop limit is copied intoICMP message has thehop limittype = "unreachable", the code = "datagram too big", and the recommended MTU size fieldofset to thetunnel IPv6 headersize ofeachthe original packetencapsulated byminus thetunnel entry point node. 6.4 IPv6 Tunnel Packet Priority The IPv6 Tunnel Packet Priority indicatessize of thevalue that atunnelentry point node setsheaders - see section 8.3. (b) if in thepriority field of a tunnel header. The default value is zero. The Packet Priority may also indicate whether the value oforiginal packet header thepriority field inDon't Fragment - DF - bit flag is CLEAR, the tunnelheader is copied fromentry-point node encapsulates the originalheader, or it is set topacket, and subsequently fragments theconfigured value. 6.5resulting IPv6Tunnel Flow Label Thetunnel packet into IPv6 fragments that do not exceed the tunnel MTU. 8. IPv6 TunnelFlow Label indicatesError Processing and Reporting IPv6 Tunneling follows thevaluegeneral rule that an error detected during the processing of an IPv6 packet is reported through an ICMP message to the source of the packet. On a forwarding path that includes IPv6 tunnels, an error detected by a node that is not in any tunnelentryis directly reported to the source Conta & Deering Expires in six months [Page24]23] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 1996point node sets in the flow labelofa tunnel header. The default value is zero. 6.6 IPv6 Tunnel Encapsulation Limit The IPv6 Tunnel Encapsulation Limit may be configured in an entry point node asthemaximum number of encapsulations permitted fororiginalpackets entering the tunnel at that entry point node. Recommended default value is 5.IPv6 packet. Anentry pointerror detected by a nodeconfigured to limit the number of encapsulations, prependsinside aTunnel Encapsulation Limit Destination header to an original packet undergoing encapsulation - see section 5.1. 6.7 IPv6 Tunnel MTU ThetunnelMTUisset dynamicallyreported to thePath MTUsource of the tunnel- the maximum size of a packetpacket, thatcan be sent throughis, the tunnelwithout fragmentation - see [RFC-1883].entry-point node. Thetunnel entry point node performs Path MTU discovery onICMP message sent to the tunnel[IPv6PMTU], [RFC-1885]. Although it should be able to send aentry-point node has as ICMP payload the tunnel IPv6 packet that has the original packet as its payload. The cause ofany valid size,a packet error encountered inside a tunnelentry point node attempts to avoidcan be a problem with: (a) thefragmentation oftunnelpackets, by informing source nodes of original packetsheader, or (b) theMTUtunnel packet. Both tunnel header and tunnel packet problems are reported tobe used in sizing original packets sent towards thatthe tunnelentry pointentry-point node.7. IPv6 Tunnel Packet Fragmentation Although the fragmentation ofIf a tunnelpackets depends on the protocolpacket problem is a consequence of a problem with the original packet, which is theprimary condition for fragmentationpayload of the tunnel packet, then the problem is also reported to thesizesource of the original packet.ATo report a problem detected inside the tunnelIPv6 packet resulting fromto theencapsulationsource of an originalpacket is considered an IPv6 packet originating frompacket, the tunnel entry pointnode, therefore like any IPv6 packet source node, a tunnel entry pointnode mustsupport fragmentation of tunnel packets. A noderelay the ICMP message received from inside thetunnel, that forwards atunnelpackettoanother node in the tunnel, followsthegeneralsource of that original IPv6rulepacket. An example of the processing thatit must not fragment a packet undergoing forwarding. Conta & Deering Expirescan take place insix months [Page 25] INTERNET-DRAFT Tunnelingthe error reporting mechanism of a node is illustrated in Fig.7, and Fig.8: Fig.7 path #0 and Fig.8 (a) - The IPv6February 22, 1996 Depending on thetunnel entry-point receives an ICMP packetprotocol,from inside thefollowing fragmentation can take place: 7.1 IPv6 Packet Fragmentation The fragmentation oftunnel, marked Tunnel ICMPv6 Message in Fig.7. The tunnelpackets containingentry-point node IPv6original packets is performed as follows: (a) if the original packet size is larger than 576 octets, thenlayer passes theentry point node returns an ICMPv6 "Packet Too Big"received ICMP message to thesource node of the original packet indicating the MTU size to be used by that node in sizing original packets sent towardsICMPv6 Input. The ICMPv6 Input, based on thetunnel entry point.ICMP type and code [RFC-1885] generates an internal "error code". Fig.7 path #1 - TheMTUinternal error code, is passed with theoriginal packet size minus"ICMPv6 message payload" to thesize ofupper-layer protocol - in this case the IPv6 tunnelheaders - see 8.2,upper-layer error input. Fig.7 path #2 and8.3.Fig.8 (b)if- The IPv6 tunnel error input decapsulates theoriginal packettunnel IPv6 packet, which isequal or smaller than 576 octets thenthetunnel entry point node encapsulatesICMPv6 message payload, obtaining the original packet, andafter encapsulation it breaksthus theresulting IPv6 tunnel packet into IPv6 fragments that do not exceedoriginal headers and dispatches thetunnel MTU. 7.2 IPv4 Packet Fragmentation Although"internal error code", thefragmentation of tunnel packets depends onsource address from theprotocol oforiginal packet header, and the original packet, down to theprimary condition for fragmentation is the sizeerror report block of theoriginal packet: (a) if the original packet size is larger than 576 octets, andprotocol identified by theDon't Fragment - DF - bitNext Header field in theIPv4tunnel headeris set then the entry point node returns an ICMP message with type = "unreachable", code = "datagram too big", and the MTU size to be used byimmediately preceding the originalnodepacket insizing original packets sent towards the tunnel entry point, which is the original packet MTU minus the size of the tunnel headers - see 8.2, and 8.3. (b) if the original packet is equal or smaller than 576 octets then the tunnel entry point node encapsulates the original packet, and after encapsulation it breakstheresultingICMP message payload. Conta & Deering Expires in six months [Page26]24] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 1996IPv6 tunnel packet into IPv6 fragments that do not exceed the tunnel MTU. 8.+-------+ +-------+ +-----------------------+ | Upper | | Upper | | Upper | | Layer | | Layer | | Layer | | Proto.| | Proto | | IPv6 Tunnel | | ErrorProcessing and Reporting IPv6 Tunneling follows the general rule that errors detected during the processing of| | Error | | Error | | Input | | Input | | Input | | | | | | Decapsulate | | | | | | -->--ICMPv6--#2->-- | | | | | | | Payload | | +-------+ +-------+ +--|-----------------|--+ | | | | ^ ^ ^ v | | | | --------------------#1-- -----Orig.Packet?--- - - - - - - - - - #1 #3 Int.Error Code, #5 | Int.Error Code,^ v Source Address, v v ICMPv6 Payload | IPv6packets are reported to the packet originator through| Orig. Packet | IPv4 | +--------------+ +--------------+ +--------------+ + - - - - + | | | | | | | ICMPmessages. For errors detected by nodes that are outside an IPv6 tunnel, on a path that includes IPv6 tunnels, the errors are reported to the original IPv6 packet source node. For errors detected by nodes inside an IPv6 tunnel,v6 | | ICMPerror messages are sent to the tunnelv6 | | ICMP v4 | | | | Input | | Error Report | | Error Report | | - - - - +----+ - - - - | + - - - - + + - - - - + | | | | | IPv6packet source node, which isLayer | | IPv4 Layer | | | | | | | +----------------------------------+ +--------------+ + - - - - + | | | ^ V V #0 #4 #6 | | | Tunnel ICMPv6 ICMPv4 ICMPv6 Message Message Message | | | | | Fig.7. Error Reporting Flow in a Node (IPv6 Tunneling Protocol Engine) From here theIPv6 tunnel entry point node. The ICMP messages sent toprocessing depends on thetunnel entry point node have as ICMP payloadprotocol of thetunneloriginal packet: (a) - for an IPv6packet that includes theoriginalpacket. The cause ofpacket Fig.7 path #3 and Fig.8 (c.1)- for an IPv6 original packet, the ICMPv6 erroruncovered insidereport builds an ICMP message of atunnel can be: (a)type and code according to thetunnel header, or (b)"internal error code", containing thetunnel packet."original packet" as ICMP payload. Fig.7 path #4 and Fig.8 (d.1)- Thetunnel header problems are reported toICMP message has the tunnelentry pointConta & Deering Expires in six months [Page 25] INTERNET-DRAFT Tunneling in IPv6 June 13, 1996 entry-point nodewhich isaddress as source address, and thetunnel IPv6original packetoriginator.source node address as destination address. The tunnelpacket problems that result from bad encapsulation, are reported alsoentry-point node sends the ICMP message to thetunnel entry point node. Ifsource node of thetunnel packet problems are a consequence oforiginal packet. (b) - for an IPv4 original packetproblemFig.7 path #5 andif they can be corrected by the source of theFig.8 (c.2) - for an IPv4 original packet,then they must be reported to both the tunnel entry point node and the source oftheoriginal packet. ToICMPv4 error reportto the sourcebuilds an ICMP message oforiginal packetaproblem detected inside the tunneltype andreportedcode derived frominsidethetunnel through an ICMP message,thetunnel entry point node must relay"internal error code", containing the "original packet" as ICMP payload. Fig.7 path #6 and Fig.8 (d.2) - The ICMP messagetohas the tunnel entry-point node IPv4 address as sourceof original IPv6 packet. To relay the ICMP message,address, and theIPv6original packet IPv4 source node address as destination address. The tunnelentry pointentry-point nodebuilds andsendsanthe ICMP message to the source node of the originalpacket originator, based onpacket. A graphical description of thetunnel ICMP message, as itheader processing taking place isgraphically described below: Conta & Deering Expires in six months [Page 27] INTERNET-DRAFT Tunneling in IPv6 February 22, 1996 +-------+ +-------+ +-----------------------+ | Upper | | Upperthe following: < Tunnel Packet > +--------+- - - - - -+--------+------------------------------//------+ | IPv6 |UpperIPv6 | ICMP |LayerTunnel | (a)| |LayerExtension | |LayerIPv6 | |Prot.Header | Headers |Prot.Header | Packet in error |IPv6+--------+- - - - - -+--------+------------------------------//------+ < Tunnel Headers > < Tunnel ICMP Message > < ICMPv6 Message Payload > ||v < Tunnel ICMP Message > < Tunnel IPv6 Packet in Error > +--------+ +---------+ +----------+--------//------+ | ICMP |Error| Tunnel |Error| Original |InputOriginal | (b) |Input| + |InputIPv6 | + | | Packet | | Header |Decapsulate| Headers | | Headers | Payload | +--------+ +---------+ +----------+--------//------+ |-->--ICMPv6--#2->--<Original Packet in Error > ----------------- | | | Conta & Deering Expires in six months [Page 26] INTERNET-DRAFT Tunneling in IPv6 June 13, 1996 --------------|--------------- | | V V +---------+ +--------+ +-------------------//------+ | New |Payload| ICMP |+-------+ +-------+ +--|-----------------|--+| | (c.1) | IPv6 |^ ^ ^ v+ | | + | Orig. Packet in Error |--------------------#1-- -----Orig.Packet?--- - - - - - - - - - error code,|#3 error code,Headers | |ICMPv6 payload ^ v source address, vHeader | | | +---------+ +--------+ +-------------------//------+ | v +---------+--------+-------------------//------+ |IPv6New |orig. packetICMP |IPv4Original |+--------------+ +--------------+ +--------------+ + - - - - +(d.1) | IPv6 | | | | Headers | Header | Packet in Error | +---------+--------+-------------------//------+ < New ICMPv6Message > or for an IPv4 original packet +---------+ +--------+ +-------------------//------+ | New | | ICMPv6| |ICMP v4| (c.2) | IPv4 | + |Input| + | Orig. Packet in ErrorReport| |Error ReportHeader | |- - - - +----+ - - - -Header | |+ - - - - + + - - - - +| +---------+ +--------+ +-------------------//------+ | v +---------+--------+-------------------//------+ | New | ICMP |IPv6 LayerOriginal | (d.2) | IPv4Layer| | | | Header | Header | Packet in Error |+----------------------------------+ +--------------+ + - - - - + Fig. 7.+---------+--------+-------------------//------+ < New ICMP Message > Fig.8. ICMP Error ReportingFlow - IPv6 Tunneling Protocol Engine For example, in case of IPv6 original packets, the tunnel entry point node IPv6 layer passes the receivedand Processing 8.1 Tunnel ICMPmessage to the ICMPv6 Input.Messages TheICMPv6 Input, based on thetunnel ICMPtype and code [RFC-1885] generates an internal "error code" which is passed with the "ICMPv6 message payload"messages that are reported to theupper layer protocol - in this casesource of theIPv6 tunnel upper layer - error input (path #1original packet are: hop limit exceeded The tunnel has a misconfigured hop limit, or contains a Conta & Deering Expires inFig. 7, and (a)six months [Page 27] INTERNET-DRAFT Tunneling inFig. 8). TheIPv6tunnel error input decapsulatesJune 13, 1996 routing loop, and packets do not reach the tunnelIPv6 packet, whichexit- point node. This problem is reported to theICMPv6 message payload, obtainingtunnel entry- point node, where theoriginal packet, and thustunnel hop limit can be reconfigured to a higher value. The problem is further reported to the source of the originalheaders - path #2packet as described inFig. 7 and (b)section 8.2, or 8.3. unreachable node One of the nodes inFig. 8 - and dispatchesthe"error code",tunnel is not or is no longer reachable. This problem is reported to thesource address fromtunnel entry- point node, which should be reconfigured with a valid and active path between theoriginal packet header,entry and exit-point of theoriginal packet, downtunnel. The problem is further reported to theerror report blocksource of theprotocol identified by the Next Header field in the tunnel header immediately preceding theoriginal packet as described inthesection 8.2, or 8.3. parameter problem A Parameter Problem ICMP messagepayload - in this example ICMPv6. The ICMPv6 error report buildspointing to a valid Tunnel Encapsulation Limit Destination header with a Tun Encap Lim field value set to one is anICMP messageindication that the tunnel packet exceeded the maximum number ofa type and code accordingencapsulations allowed. The problem is further reported to the"error code", containingsource of the"original packet"original packet asICMP payload - - path #3described inFig. 7 and (c) in Fig. 8.section 8.2, or 8.3. The above three problems detected inside the tunnel, which are a tunnel configuration and a tunnel topology problem, are reported to the source of the original IPv6 packet, as a tunnel generic "unreachable" problem caused by a "link problem" - see section 8.2 and 8.3. packet too big The tunnel packet exceeds the tunnel Path MTU. This type of ICMP messagehasis used as follows: - by a receiving tunnel entry-point node to set or adjust the tunnelentryMTU - by a sending tunnel entry-point node to indicate to the source of an original packet the MTU size that should be used in sending IPv6 packets towards the tunnel entry-point node. Conta & Deering Expires in six months [Page 28] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 1996point node address as source address, and the original packet source node address as destination address - (d) in Fig. 8.8.2 ICMP Messages for IPv6 Original Packets The tunnelentry pointentry-point nodesendsbuilds the ICMP and IPv6 headers of the ICMP message that is sent to the source of the original packetoriginator node.as follows: IPv6 Fields: Source Address Agraphical descriptionvalid unicast IPv6 address of theheader processing taking place isoutgoing interface. Destination Address Copied from thefollowing: < Tunnel packet > +--------+- - - - - -+--------+------------------------------//------+ | IPv6 |Source Address field of the Original IPv6|header. ICMP Fields: For any of the following tunnel ICMP| Tunnel | (a)| | Extension | | IPv6 | | Header | Headers | Header | Packet inerror| +--------+- - - - - -+--------+------------------------------//------+ < Tunnel headers > <messages: hop limit exceeded unreachable node parameter problem pointing to a valid Tunnel Encapsulation Limit destination header with the Tun Encap Lim field set to a value one: Type 1 - unreachable node Code 3 - address unreachable For tunnel ICMPmessage > < ICMPv6 message payload > | v < Tunnel ICMP message > < Tunnel IPv6 packet in error > +--------+ +---------+ +----------+--------//------+ | ICMP | | Tunnel | | Original | Original | (b) | | <- | IPv6 | <- | IPv6 | IPv6 packet | | Header | | Headers | | Headers | payload | +--------+ +---------+ +----------+--------//------+ | | <Orig. IPv6 pck. inerror> ----------------- | | ----------|--------------- | | V V +---------+ +--------+ +-------------------//------+ | New | | ICMP | | | (c) | IPv6 | -> | | -> | Orig. IPv6 packet in error| | Headers | | Header | | | +---------+ +--------+ +-------------------//------+ | v +---------+--------+-------------------//------+ | New | ICMP | Original | (d) | IPv6 | | IPv6 | | Headers | Header |message "packet too big": Type 2 - packetin error | +---------+--------+-------------------//------+ < newtoo big Code 0 MTU The MTU field from the tunnel ICMP message> Fig. 8. ICMP Error reporting and processingminus the length of the tunnel headers. Conta & Deering Expires in six months [Page 29] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 19968.1 Tunnel ICMP Messages The tunnelAccording to the general rules described in 7.1, an ICMPmessages which are reported"packet too big" message is sent to the source of the original packetoriginator are: hop limit exceededonly if the original packet size is larger than 576 octets. 8.3 ICMP Messages for IPv4 Original Packets The tunnelhas a misconfigured hop limit, or contains a routing loop,entry-point node builds the ICMP andpackets do not reachIPv4 header of thetunnel exit- point node. This problemICMP message that isreportedsent to thetunnel entry point node - the tunnel hop limit must be reconfigured to a higher value - and also tosource of the originalIPv6packetoriginator. unreachable node Oneas follows: IPv4 Fields: Source Address A valid unicast IPv4 address of thenodes in the tunnel is not or is no longer reachable. This problem is reported to the tunnel entry point node, which should reconfigureoutgoing interface. Destination Address Copied from thetunnel with a valid and active path betweenSource Address field of theentry and exit-pointOriginal IPv4 header. ICMP Fields: For any of thetunnel.following tunnel ICMP error messages: hop limit exceeded unreachable node parameter problemA Parameter Problem ICMP messagepointing to a valid TunnelEncapsulationEnacpsulation LimitDestinationdestination header withathe Tun Encap Lim fieldvalueset toone is an indication that the tunnel packet exceeded the maximum number of encapsulations allowed. The three above problems detected inside the tunnel, which are a tunnel configuration andatunnel topology problem, are reported to the originalvalue one: Conta & Deering Expires in six months [Page 30] INTERNET-DRAFT Tunneling in IPv6packet originator, asJune 13, 1996 Type 3 - destination unreachable Code 1 - host unreachable For a tunnelgeneric "unreachable" problem caused by a "link problem"ICMP error message "packet too big": Type 3 -see section 8.2 and 8.3. packetdestination unreachable Code 4 - datagram too big MTU Thetunnel packet exceedsMTU field from the tunnelPath MTU. When received, thisICMP messageis used byminus thetunnel entry point node to determinelength of the tunnelMTU. When sent, accordingheaders. According to the general rules described inConta & Deering Expires in six months [Page 30] INTERNET-DRAFT Tunneling in IPv6 February 22, 1996section7.1, this7.2, an ICMP "datagram too big" message isused by the tunnel entry point node to indicatesent toanthe original IPv4 packet source nodethat original packets sent from that node toif thetunnel entry point node should be resized totheMTU indicated byoriginal IPv4 header has theICMP message. 8.2DF - don't fragment - bit flag SET. 8.4 ICMP Messages forIPv6 OriginalRecursive Tunnel PacketsTheIn case of an error uncovered with a recursive tunnelentry point node buildspacket, the inner tunnel entry-point, which receives the ICMPand IPv6 headers oferror message from the inner tunnel reporting node, relays the ICMP messagethat is sentto theoriginal packet source node as follows: IPv6 Fields: Source Address A valid unicast IPv6 address ofouter tunnel entry-point following theoutgoing interface. Destination Address Copied frommechanisms described in sections 8.,8.1, 8.2, and 8.3. Further, theSource Address field ofouter tunnel entry-point relays theOriginal IPv6 header.ICMPFields: For anymessage to the source of the original packet, followingtunnel ICMP error messages:the same mechanisms. 9. Open Issues (a) Tunnel default hop limitexceeded unreachable node parameter problem pointing to a valid Tunnel Encapsulation Limit destination header with the Tun Encap Lim field set to avalueone:At this time, there is no definition for an IPv6 hop limit default value. The Assigned Numbers [RFC-1700] IPv4 TTL default value could be used instead. Conta & Deering Expires in six months [Page 31] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 1996Type 1 - unreachable node Code 3 - address unreachable For tunnel ICMP error message "packet too big": Type 2 - packet too big Code 0 MTU The MTU field from the tunnel ICMP message minus the length of the tunnel headers. According to the general rules described in 6.3, an ICMP "packet too big" message is sent to the original packet source node only if the original packet size is larger than 576 octets. If the original packet size is smaller or equal to 576 octets the tunnel entry point encapsulates the original IPv6 packet10.References [RFC-1883] S. Deering, R. Hinden, "Internet Protocol Version 6 Specification" [RFC-1884] S. Deering, R. Hinden, "IP Version 6 Addressing Architecture". [RFC-1885] A. Conta, andthen breaks the resulting IPv6 tunnel packet into IPv6 fragments that do not exceed the tunnel MTU. 8.3 ICMP MessagesS. Deering "Internet Control Message Protocol forIPv4 Original Packets The tunnel entry point node buildstheICMPInternet Protocol Version 6 (IPv6)" [IPv6ND] T. Narten, E. Nordmark, "IPv6 Neighbor Discovery Specification" [IPv6PMTU] J. McCann andIPv4 header of the ICMP message that is sent to the original packet source node as follows: IPv4 Fields: SourceS. Deering, "IPv6 Path MTU Discovery" [ADDRCONF] T. Narten, and S. Thomson, "IPv6 AddressA valid unicast IPv4 address ofAutoconfiguration" [IPv6PMTU] S. Deering, and J. McCann, "IPv6 Path MTU Discovery" [RFC-1700] J. Reynolds, J. Postel, "Assigned Numbers", 10/20/1994 11.Acknowledgments This document is partially derived from several discussions about IPv6 tunneling on theoutgoing interface. Destination Address CopiedIPng Working Group Mailing List and from feedback from theSource Address field ofIPng Working Group to an IPv6 presentation that focused on IPv6 tunneling at theOriginal IPv4 header. ICMP Fields: For any of33rd IETF, in Stockholm, in July 1995. Additionally, the followingtunnel ICMP error messages:documents that focused on tunneling or Conta & Deering Expires in six months [Page 32] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 1996hop limit exceeded unreachable node parameter problem pointing to a valid Tunnel Enacpsulation Limit destination header withencapsulation were helpful references: RFC 1933 (R. Gilligan, E. Nordmark), RFC 1241 (R. Woodburn, D. Mills), RFC 1326 (P. Tsuchiya), RFC 1701, RFC 1702 (S. Hanks, D. Farinacci, P. Traina), RFC 1853 (W. Simpson), as well as theTun Encap Lim field setIP encapsulation draft of the Mobile IP working Group (C. Perkins). Important contributions were made by Brian Carpenter and Erik Nordmark, both of whom gave numerous and valuable reviewing comments and suggestions for the improvement of this document. Also many thanks to Judith Grossman, who provided avalue one: Type 3 - destination unreachable Code 1 - host unreachable Forsample of her many years of editorial and writing experience as well as atunnel ICMP error message "packet too big": Type 3 - destination unreachable Code 4 - datagram too big MTUgood amount of probing technical questions. [TBD] 12.Security Considerations Security considerations are not discussed in this memo. Authors' Addresses: Alex Conta Stephen Deering Cascade Communications Corp. Xerox Palo Alto Research Center 5 Carlisle Rd 3333 Coyote Hill Road Westford, MA 03062 Palo Alto, CA 94304 +1-508-952-1534 +1-415-812-4839 email: conta@casc.com email: deering@parc.xerox.com Appendix A A.1 Risk Factors in Recursive Encapsulation TheMTU field from the tunnel ICMP message minus the lengthcases which present a high risk oftheexcessive recursive encapsulation are those in which a tunnelheaders. Accordingentry-point node cannot discern between a valid and an invalid recursive encapsulation. Routing loops that cause tunnel packets to reach nodes that were already reached before are certainly thegeneral rules described in 7.2, an ICMP "datagram too big" messagemajor cause of the problem. But since routing loops exist, and happen, it issentimportant to Conta & Deering Expires in six months [Page 33] INTERNET-DRAFT Tunneling in IPv6 June 13, 1996 understand and describe, theoriginal IPv4 packet source node only ifcases in which theoriginal packet sizerisk for excessive recursive encapsulation islarger than 576 octets. An additionally conditionhigher. There are two significant elements thathasdetermine the risk factor of routing loop excessive recursive encapsulation: (a) the type of tunnel, (b) the type of route tobe met for sendingtheICMP message is thattunnel exit-point, which determines theoriginal IPv4packetheader must haveforwarding through theDF - don't fragmenttunnel, that is, over the tunnel virtual-link. A.1.1 Risk Factor in Recursive Encapsulation -bit flag settype of tunnel. The type of tunnels which were identified as a high risk factor for excessive recursive encapsulation in routing loops are: "inner tunnels with identical exit-points". These tunnels can be: "fixed-end inner tunnels with different entry-points", or: "free-end inner tunnels with different entry-points" Note that free-end inner tunnels fall always into theIPv6 original header. If the DF bit is clear, the tunnel entry point encapsulatescategory of identical exit-point tunnels. Since the source and destination of an originalIPv4packetand then breaksis theresulting IPv6 tunnelmain information used to decide whether to forward a packetinto IPv6 fragmentsthrough a tunnel or not, an excessive recursive encapsulation can be avoided in case of a single tunnel (non-inner), by checking thatdothe packet to be encapsulated is notexceedoriginated on thetunnel MTU. 9. Open Issues Open issues are: (a) Multicast exit point Does it make senseentry-point node. This mechanism is suggested in [IPv4TUN]. However, this type of protection does not seem tohave an IPv6 multicast address as tunnel exit-point node address? Conta & Deering Expireswork well insix months [Page 33] INTERNET-DRAFT Tunnelingcase of inner tunnels with different entry-points, and identical exit- points. Inner tunnels with different entry-points and identical exit-points introduce ambiguity inIPv6 February 22, 1996 (b) Anycast exit point Does it make sensedeciding whether tohaveencapsulate a packet, when a packet encapsulated in anIPv6 anycast address asinner tunnelexit-pointreaches the entry-point nodeaddress? (c) Tunnel default hop limit value At this time, there is no definition forof anIPv6 hop limit default value. The Assigned Numbers [RFC-1700] IPv4 TTL default value could be used instead. 10.References [RFC-1883] S. Deering, R. Hinden, "Internet Protocol Version 6 Specification" [RFC-1884] S. Deering, R. Hinden, "IP Version 6 Addressing Architecture". [RFC-1885] A. Conta, and S. Deering "Internet Control Message Protocol for the Internet Protocol Version 6 (IPv6)" [IPv6ND] T. Narten, E. Nordmark, "IPv6 Neighbor Discovery Specification" [IPv6PMTU] J. McCann and S. Deering, "IPv6 Path MTU Discovery" [ADDRCONF] T. Narten, and S. Thomson, "IPv6 Address Autoconfiguration" [IPv6PMTU] J. McCann and S. Deering, "IPv6 Path MTU Discovery" [RFC-1700]outer tunnel by means of a routing loop. Because the source of Conta & Deering Expires in six months [Page 34] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 1996J. Reynolds, J. Postel, "Assigned Numbers", 10/20/1994 [RFC-1853] W. Simpson, "IPv4 Tunneling", 11.Acknowledgements The documentthe tunnel packet ispartially derived from several ideas about tunneling, from several discussions about IPv6 in IPv6 tunneling ontheIPng Working Group Mailing List, and from feedback frominner tunnel entry-point node which is different than the entry-point node of the outer tunnel, the source address checking (mentioned above) fails to detect anIPv6 tunneling focused IPng Working Group sessioninvalid encapsulation, and as a consequence the tunnel packet gets encapsulated at the33th IETF,outer tunnel each time it reaches it through the routing loop. A.1.2 Risk Factor inStockholm, July 1995. Additionally, several documents focused on tunneling or encapsulation were usedRecursive Encapsulation - type of route. The type of route to a tunnel exit-point node has been also identified as areference: "Transition Mechanisms forhigh risk factor of excessive recursive encapsulation in routing loops. One type of route to a tunnel exit-point node is a route to a specified destination node, that is, the destination is a valid specified IPv6Hosts and Routers" document by Robert Gilligan and Erik Nordmark, RFC 1241 (R. Woodburn, and D. Mills), RFC 1326 (P. Tsuchiya), RFC 1701, and RFC 1702 (S. Hanks, D. Farinacci, P. Traina), RFC 1834 (W. Simpson), and Mobile IP working Group drafts (C. Perkins). Also an important contribution was made byaddress (route to node). Such a route can be selected based on thereviewerslongest match ofthis document: Brian Carpenter, Erik Nordmark. [TBD] 12.Security Considerations Security considerations are not discussed in this memo. Authors' Addresses: Alex Conta Stephen Deering Digital Equipment Corporation Xerox Palo Alto Research Center 110 Spitbrook Rd 3333 Coyote Hill Road Nashua, NH 03062 Palo Alto, CA 94304 +1-603-881-0744 +1-415-812-4839 email: conta@zk3.dec.com email: deering@parc.xerox.com Appendix A Fixed-end Inner tunnelsan original packet destination address withdifferent entry-points and identical exit-points Conta & Deering Expires in six months [Page 35] INTERNET-DRAFT Tunnelingthe destination address stored inIPv6 February 22, 1996 node node node node node nodethe tunnel entry-point nodea.a.1 b.b.1 c.c.1 ... x ... y ... d.d.1 z.z.1 * ** * ** tunnel I from b.b.1 to z.z.1routing table entry for that route. The packet forwarded on such a route is first encapsulated and then forwarded towards the tunnelII from c.c.1exit-point node. Another type of route toz.z.1 1.a tunnel exit-point nodea.a.1: xmt: aa1/zz1 (source=aa1 destination=zz1)is a route tobb1 2. node b.b.1: rcv: aa1/zz1 forwarding: anythinga specified prefix-net, that is, the destination isdestineda valid specified IPv6 prefix (route to net). Such a route can be selected based on the longest path match of an original packet destination address with the prefix'z' =>destination stored in the tunnel'bb1/z z1' and send to cc1 xmt: bb1/zz1 | aa1/zz1 to cc1 3.entry-point nodecc1: rcv: bb1/zz1 | aa1/zz1 forwarding: anythingrouting table entry for that route. The packet forwarded on such a route isdestined to prefix 'z' => tunnel 'cc1/z z1'first encapsulated andsend to next router onthen forwarded towards thewaytunnel exit-point node. And finally another type of route todd1 xmt: cc1/zz1 | bb1/zz1 | aa1/zz1a tunnel exit-point is a default route, or a route tonext router onan unspecified destination. This route is selected when no-other match for theway to dd1 4. before reaching node dd1, routing loop bringsdestination of the original packetto bb1 loop:: node bb1: rcv: cc1/zz1 | bb1/zz1 | aa1/zz1 forwarding: anythinghas been found in the routing table. A tunnel that isdestinedthe first hop of a default route is a "default tunnel". If the route toprefix 'z' =>a tunnel'bb1/ zz1' and send to cc1 xmt: bb1/zz1 | cc1/zz1 | bb1/zz1 | aa1/zz1exit-point is a route tocc1 5. node cc1: Conta & Deering Expires in six months [Page 36] INTERNET-DRAFT Tunneling in IPv6 February 22, 1996 rcv: bb1/zz1 | cc1/zz1 | bb1/zz1 | aa1/zz1 forwarding: anything thatnode, the risk factor for excessive recursive encapsulation isdestinedminimum. If the route toprefix 'z' =>a tunnel'cc1/ zz1' xmt: cc1/zz1 | bb1/zz1 | cc1/zz1 | bb1/zz1 | aa1/zz1 to next router on the wayexit-point is a route todd1 NOTE: check on source address = packet source DOES NOT eliminatenet, therecursi ve encapsulation Appendix B Default Tunnel - maximumrisk factor for excessive recursive encapsulationin caseis medium. There is a range ofrouting loops. node node node node node node node a.a.1 b.b.1 c.c.1 d.d.1 e.e.1 f.f.1 z.z.1 * ** ** * tunnel I from b.b.1 to f.f.1 tunnel II from c.c.1 to e.e.1 1. node aa1: xmt: aa1/zz1 (source=aa1 destination=zz1) 2. node bb1: rcv: aa1/zz1 forwarding: anythingdestination addresses thatdoes not go towill match the prefix'a'the route is associated with. If one or'c' =>more inner tunnels with different tunnel'bb1/ff1' and send to cc1 xmt: bb1/ff1 | aa1/zz1 3.entry-points have exit-point nodecc1: rcv: bb1/ff1 | aa1/zz1 forwarding: anythingaddresses thatdoes not go to prefix 'a', or 'b', or 'd' => tunnel 'cc1/ee1' and send to next router onmatch thewayroute toee1net of an outer tunnel exit-point, then an excessive Conta & Deering Expires in six months [Page37]35] INTERNET-DRAFT Tunneling in IPv6February 22,June 13, 1996xmt: cc1/ee1 | bb1/ff1 | aa1/zz1recursive encapsulation may occur if a tunnel packet gets diverted from inside such an inner tunnel tonext router onthewayentry-point of the outer tunnel that has a route toee1 4. before reaching node ee1,its exit-point that matches the exit-point of an inner tunnel. If the route to a tunnel exit-point is a default route, the risk factor for excessive recursive encapsulation is maximum. Packets are forwarded through a default tunnel for lack of a better route. In many situations, forwarding through a default tunnel can happen for a wide range of destination addresses which at the maximum extent is the entire Internet minus the node's link. As consequence, it is likely that in a routing loopbringscase, if a tunnel packetto bb1 loop:: node bb1: rcv: cc1/ee1 | bb1/ff1 | aa1/zz1 forwarding: anything that does not go to prefix 'a' or 'c' =>gets diverted from an inner tunnel'bb1/ff1' and send to cc1 xmt: bb1/ff1 | cc1/ee1 | bb1/ff1 | aa1/zz1tocc1 5. node cc1: rcv: bb1/ff1 | cc1/ee1 | bb1/ff1 | aa1/zz1 forwarding: anything that doesan outer tunnel entry-point in which the tunnel is a default tunnel, the packet will be once more encapsulated, because the default routing mechanism will notgobe able toprefix 'a', or 'b', or 'd' => tunnel 'cc1/ee1' xmt: cc1/ee1 | bb1/ff1 | cc1/ee1 | bb1/ff1 | aa1/zz1 NOTE: checkdiscern differently, based onsource address = packet source DOES NOT eliminatetherecursi ve encapsulation Changes from previous version.destination. Appendix B Changes: B.1 From draft 00 to draft 01 - add new sections: 3.4 IPv6 Tunnels and AddressFormats........................13Formats 3.5 IPv6 Tunnels and IPv6Autoconfiguration.................13Autoconfiguration 3.6 IPv6 Tunnels and IPv6 NeighborDiscovery................13Discovery 4.1.4 Risk Factors in RecursiveEncapsulation..............17Encapsulation Appendix A..Innertunnels...................................35tunnels Appendix B..Defaulttunnels.................................37tunnels - separate fragmentation from section 6.7 into a new section: 7. IPv6 Tunnel PacketFragmentation.........................25Fragmentation 7.1 IPv6 PacketFragmentation...........................25Fragmentation 7.2 IPv4 PacketFragmentation...........................26 Conta & Deering Expires in six months [Page 38] INTERNET-DRAFT Tunneling in IPv6 February 22, 1996Fragmentation - include comments from Erik Nordmark - some of the comments are part of the modifications mentioned above. - Section 5: flow label "tipical" corrected to "typical". Conta & Deering Expires in six months [Page 36] INTERNET-DRAFT Tunneling in IPv6 June 13, 1996 - Section 6.2: changed from multi-point to point-to-point - section8.18, 8.1, 8.3 replace "original packet originator" with "source of original packet".------- End of Forwarded MessageB.2 From draft 01 to draft 02 - deleted - Appendix A - Appendix B - moved section 4.1.4 to new Appendix A. - added new section 3.2 "IPv6 Packet Processing in Tunnels". - added new section 8.4 "ICMP Messages for Recursive Tunnel Packets". - improved, reduced, or extended text in (this includes comments from Erik Nordmark) 1. Introduction 2. Terminology 3. Generic IPv6 Tunneling 3.1 IPv6 Encapsulation 3.2 IPv6 Packet Processing in Tunnels... 3.3 IPv6 Decapsulation... 3.4 IPv6 Tunnel Protocol Engine... 4. Recursive Encapsulation... 4.1 Limiting Recursive Encapsulation... 4.1.1 Tunnel Encapsulation Limit... 4.1.2 Loopback Recursive Encapsulation... 4.1.3 Routing Loop Recursive Encapsulation... 7. IPv6 Tunnel Packet Fragmentation... 7.1 IPv6 Packet Fragmentation... 7.2 IPv4 Packet Fragmentation... 8. IPv6 Tunnel Error Reporting and Processing... 8.1 Tunnel ICMP Messages... 8.2 ICMP Messages for IPv6 Original Packets... 8.3 ICMP Messages for IPv4 Original Packets... - changed sections title: 7. IPv6 Tunnel Packet Fragmentation to: Conta & Deering Expires in six months [Page 37] INTERNET-DRAFT Tunneling in IPv6 June 13, 1996 7. IPv6 Tunnel Packet Size Issues 7.1 IPv6 Packet Fragmentation to: 7.1 IPv6 Tunnel Packet Fragmentation 7.2 IPv4 Packet Fragmentation to: 7.2 IPv4 Tunnel Packet Fragmentation Conta & Deering Expires in six months [Page 38] ----