home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_i / draft-ietf-ipngwg-ipv6-tunnel-07.txt < prev    next >
Text File  |  1996-12-23  |  76KB  |  2,125 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. IPng Working Group               A.  Conta  (Lucent  Technologies  Inc.)
  8. INTERNET-DRAFT                        S. Deering (Cisco Systems)
  9.                                             December 1996
  10.  
  11.  
  12.                     Generic Packet Tunneling in IPv6
  13.  
  14.                              Specification
  15.  
  16.                   draft-ietf-ipngwg-ipv6-tunnel-07.txt
  17.  
  18.  
  19. Status of this Memo
  20.  
  21.    This document is an Internet  Draft.   Internet  Drafts  are  working
  22.    documents  of  the Internet Engineering Task Force (IETF), its Areas,
  23.    and its Working Groups. Note that other groups  may  also  distribute
  24.    working documents as Internet Drafts.
  25.  
  26.    Internet Drafts are draft  documents  valid  for  a  maximum  of  six
  27.    months.  Internet  Drafts  may  be updated, replaced, or obsoleted by
  28.    other documents at any time.  It is not appropriate to  use  Internet
  29.    Drafts as reference material or to cite them other than as a "working
  30.    draft" or "work in progress."
  31.  
  32.    To learn the current status of any Internet-Draft, please  check  the
  33.    ``1id-abstracts.txt''  listing  contained  in  the  Internet-  Drafts
  34.    Shadow Directories on ds.internic.net (US East Coast),  nic.nordu.net
  35.    (Europe),  ftp.isi.edu  (US  West  Coast),  or munnari.oz.au (Pacific
  36.    Rim).
  37.  
  38.    Distribution of this memo is unlimited.
  39.  
  40. Abstract
  41.  
  42.    This document defines the  model  and  generic  mechanisms  for  IPv6
  43.    encapsulation  of Internet packets, such as IPv6 and IPv4.  The model
  44.    and mechanisms can be applied to other protocol packets as well, such
  45.    as AppleTalk, IPX, CLNP, or others.
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Conta & Deering       Expires in six months         [Page 1]
  59.  
  60.  
  61.  
  62.  
  63. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  64.  
  65.  
  66. Table of Contents
  67.  
  68.  
  69.    Status of this Memo...........................................1
  70.    Table of Contents.............................................2
  71. 1. Introduction..................................................3
  72. 2. Terminology...................................................3
  73. 3. Generic IPv6 Tunneling........................................5
  74.     3.1 IPv6 Encapsulation.......................................7
  75.     3.2 IPv6 Packet Processing in Tunnels........................8
  76.     3.3 IPv6 Decapsulation.......................................8
  77.     3.4 IPv6 Tunnel Protocol Engine..............................9
  78. 4. Nested Encapsulation.........................................12
  79.     4.1  Limiting Nested Encapsulation..........................13
  80.         4.1.1  Tunnel Encapsulation Limit.......................14
  81.         4.1.2  Loopback Encapsulation...........................15
  82.         4.1.3  Routing Loop Nested Encapsulation................16
  83. 5. Tunnel IPv6 Header...........................................16
  84.     5.1 Tunnel IPv6 Extension Headers...........................18
  85. 6. IPv6 Tunnel State Variables..................................19
  86.     6.1 IPv6 Tunnel Entry-Point Node............................19
  87.     6.2 IPv6 Tunnel Exit-Point Node.............................20
  88.     6.3 IPv6 Tunnel Hop Limit...................................20
  89.     6.4 IPv6 Tunnel Packet Priority.............................21
  90.     6.5 IPv6 Tunnel Flow Label..................................21
  91.     6.6 IPv6 Tunnel Encapsulation Limit.........................21
  92.     6.7 IPv6 Tunnel MTU.........................................22
  93. 7. IPv6 Tunnel Packet Size Issues...............................22
  94.     7.1 IPv6 Tunnel Packet Fragmentation........................23
  95.     7.2 IPv4 Tunnel Packet Fragmentation........................23
  96. 8. IPv6 Tunnel Error Reporting and Processing...................24
  97.     8.1 Tunnel ICMP Messages....................................28
  98.     8.2 ICMP Messages for IPv6 Original Packets.................29
  99.     8.3 ICMP Messages for IPv4 Original Packets.................30
  100.     8.4 ICMP Messages for Nested Tunnel Packets.................31
  101. 9. Security Considerations......................................31
  102. 10. Acknowledgments.............................................32
  103. 11. References..................................................32
  104. Authors' Addresses..............................................33
  105. Appendix A.Risk Factors in Recursive Encapsulation..............34
  106. Fig.1.................................................6
  107. Fig.2.................................................6
  108. Fig.3.................................................7
  109. Fig.4.................................................8
  110. Fig.5.................................................9
  111. Fig.6................................................13
  112. Fig.7................................................25
  113. Fig.8................................................26/27
  114.  
  115.  
  116.  
  117. Conta & Deering       Expires in six months         [Page 2]
  118.  
  119.  
  120.  
  121.  
  122. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  123.  
  124.  
  125. 1. Introduction
  126.  
  127.    This document specifies a method and generic mechanisms  by  which  a
  128.    packet  is encapsulated and carried as payload within an IPv6 packet.
  129.    The resulting packet is called an IPv6 tunnel packet. The  forwarding
  130.    path  between  the  source  and  destination  of the tunnel packet is
  131.    called an IPv6 tunnel. The technique is called IPv6 tunneling.
  132.  
  133.    A typical scenario for  IPv6  tunneling  is  the  case  in  which  an
  134.    intermediate  node  exerts  explicit  routing  control  by specifying
  135.    particular forwarding paths for selected  packets.  This  control  is
  136.    achieved  by prepending to each of the selected original packets IPv6
  137.    headers that identify the forwarding path.
  138.  
  139.    In addition to the description of generic IPv6 tunneling  mechanisms,
  140.    which  is  the  focus  of  this  document,  specific  mechanisms  for
  141.    tunneling IPv6 and IPv4 packets are also described herein.
  142.  
  143. 2. Terminology
  144.  
  145.  
  146.    original packet
  147.  
  148.         a packet that undergoes encapsulation.
  149.  
  150.    original header
  151.  
  152.         the header of an original packet.
  153.  
  154.    tunnel
  155.  
  156.         a forwarding path between two nodes on  which  packets  payloads
  157.         are original packets.
  158.  
  159.    tunnel end-node
  160.  
  161.         a node where a tunnel begins or ends.
  162.  
  163.    tunnel header
  164.  
  165.         the   header   prepended   to   the   original   packet   during
  166.         encapsulation.  It specifies the tunnel end-points as source and
  167.         destination.
  168.  
  169.    tunnel packet
  170.  
  171.         a packet that encapsulates an original packet.
  172.  
  173.  
  174.  
  175.  
  176. Conta & Deering       Expires in six months         [Page 3]
  177.  
  178.  
  179.  
  180.  
  181. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  182.  
  183.  
  184.    tunnel entry-point
  185.  
  186.         the tunnel end-node where an original packet is encapsulated.
  187.  
  188.    tunnel exit-point
  189.  
  190.         the tunnel end-node where a tunnel packet is decapsulated.
  191.  
  192.    IPv6 tunnel
  193.  
  194.         a tunnel configured as a virtual link between two IPv6 nodes, on
  195.         which the encapsulating protocol is IPv6.
  196.  
  197.    fixed-exit tunnel
  198.  
  199.         a tunnel for which a specific exit-point was configured.
  200.  
  201.    free-exit tunnel
  202.  
  203.         a tunnel for which no specific exit-point  was  configured;  the
  204.         exit  point  is  extracted  from  the destination of each packet
  205.         encapsulated and sent into the tunnel.
  206.  
  207.    tunnel MTU
  208.  
  209.         the maximum size of a tunnel packet  payload  without  requiring
  210.         fragmentation,  that  is, the Path MTU between the tunnel entry-
  211.         point and the tunnel exit-point nodes  minus  the  size  of  the
  212.         tunnel headers.
  213.  
  214.    tunnel hop limit
  215.  
  216.         the maximum number of hops that a tunnel packet can travel  from
  217.         the tunnel entry-point to the tunnel exit-point.
  218.  
  219.    inner tunnel
  220.  
  221.         a tunnel that is a hop (virtual link) of another tunnel.
  222.  
  223.    outer tunnel
  224.  
  225.         a tunnel containing one or more inner tunnels.
  226.  
  227.    nested tunnel packet
  228.  
  229.         a tunnel packet that has as payload a tunnel packet.
  230.  
  231.    nested tunnel header
  232.  
  233.  
  234.  
  235. Conta & Deering       Expires in six months         [Page 4]
  236.  
  237.  
  238.  
  239.  
  240. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  241.  
  242.  
  243.         the tunnel header of a nested tunnel packet.
  244.  
  245.    nested encapsulation
  246.  
  247.         encapsulation of an encapsulated packet.
  248.  
  249.    recursive encapsulation
  250.  
  251.         encapsulation of a packet that reenters a tunnel before  exiting
  252.         it.
  253.  
  254.    tunnel encapsulation limit
  255.  
  256.         the maximum number of nested encapsulations of a packet.
  257.  
  258.  
  259.  
  260. 3. IPv6 Tunneling
  261.  
  262.    IPv6 tunneling is a  technique  for  establishing  a  "virtual  link"
  263.    between  two  IPv6 nodes for transmitting data packets as payloads of
  264.    IPv6 packets (see Fig.1).  From the point of view of the  two  nodes,
  265.    this  "virtual  link",  called  an IPv6 tunnel, appears as a point to
  266.    point link on which IPv6 acts like a  link-layer  protocol.  The  two
  267.    IPv6  nodes  play  specific  roles.  One  node  encapsulates original
  268.    packets received from other nodes or from  itself  and  forwards  the
  269.    resulting   tunnel   packets  through  the  tunnel.  The  other  node
  270.    decapsulates the received tunnel packets and forwards  the  resulting
  271.    original  packets  towards  their  destinations, possibly itself. The
  272.    encapsulator node is called the tunnel entry-point node,  and  it  is
  273.    the source of the tunnel packets. The decapsulator node is called the
  274.    tunnel exit-point, and it is the destination of the tunnel packets.
  275.  
  276.    Note:
  277.  
  278.    This document refers in  particular  to  tunnels  between  two  nodes
  279.    identified  by  unicast  addresses  - such tunnels look like "virtual
  280.    point to point links". The mechanisms described herein apply also  to
  281.    tunnels  in  which the exit-point nodes are identified by other types
  282.    of addresses, such as anycast or multicast.  These tunnels  may  look
  283.    like "virtual point to multipoint links". At the time of writing this
  284.    document,  IPv6  anycast  addresses  are   a   subject   of   ongoing
  285.    specification and experimental work.
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294. Conta & Deering       Expires in six months         [Page 5]
  295.  
  296.  
  297.  
  298.  
  299. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  300.  
  301.  
  302.                    Tunnel from node B to node C
  303.                     <---------------------->
  304.                  Tunnel                     Tunnel
  305.                  Entry-Point                Exit-Point
  306.                  Node                       Node
  307.   +-+            +-+                        +-+            +-+
  308.   |A|-->--//-->--|B|=====>=====//=====>=====|C|-->--//-->--|D|
  309.   +-+            +-+                        +-+            +-+
  310.   Original                                                 Original
  311.   Packet                                                   Packet
  312.   Source                                                   Destination
  313.   Node                                                     Node
  314.  
  315.               Fig.1 Tunnel
  316.  
  317.  
  318.    An IPv6 tunnel is a unidirectional mechanism  -  tunnel  packet  flow
  319.    takes  place in one direction between the IPv6 tunnel entry-point and
  320.    exit-point nodes (see Fig.1).
  321.  
  322.    Bi-directional tunneling is achieved by  merging  two  unidirectional
  323.    mechanisms,  that  is,  configuring  two  tunnels,  each  in opposite
  324.    direction to the other - the entry-point node of one  tunnel  is  the
  325.    exit-point node of the other tunnel (see Fig.2).
  326.  
  327.  
  328.                    Tunnel from Node B to Node C
  329.                     <------------------------>
  330.                  Tunnel                      Tunnel
  331.   Original       Entry-Point                 Exit-Point     Original
  332.   Packet         Node                        Node           Packet
  333.   Source                                                    Destination
  334.   Node                                                      Node
  335.   +-+            +-+                         +-+            +-+
  336.   | |-->--//-->--| |=====>=====//=====>======| |-->--//-->--| |
  337.   |A|            |B|                         |C|            |D|
  338.   | |--<--//--<--| |=====<=====//=====<======| |--<--//--<--| |
  339.   +-+            +-+                         +-+            +-+
  340.   Original                                                  Original
  341.   Packet                                                    Packet
  342.   Destination    Tunnel                      Tunnel         Source
  343.   Node           Exit-Point                  Entry-Point    Node
  344.                  Node                        Node
  345.                    <------------------------->
  346.                   Tunnel from Node C to Node B
  347.  
  348.               Fig.2 Bi-directional Tunneling Mechanism
  349.  
  350.  
  351.  
  352.  
  353. Conta & Deering       Expires in six months         [Page 6]
  354.  
  355.  
  356.  
  357.  
  358. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  359.  
  360.  
  361. 3.1 IPv6 Encapsulation
  362.  
  363.    IPv6 encapsulation consists of prepending to the original  packet  an
  364.    IPv6  header  and,  optionally,  a set of IPv6 extension headers (see
  365.    Fig.3), which  are  collectively  called  tunnel  IPv6  headers.  The
  366.    encapsulation  takes place in an IPv6 tunnel entry-point node, as the
  367.    result of an original packet being forwarded onto  the  virtual  link
  368.    represented  by  the  tunnel. The original packet is processed during
  369.    forwarding according to the forwarding rules of the protocol of  that
  370.    packet. For instance if the original packet is an:
  371.  
  372.  
  373.     (a)  IPv6 packet, the IPv6 original header hop limit is  decremented
  374.          by one.
  375.  
  376.     (b)  IPv4 packet, the IPv4 original header time to live field  (TTL)
  377.          is decremented by one.
  378.  
  379.    At encapsulation, the source field  of  the  tunnel  IPv6  header  is
  380.    filled  with  an IPv6 address of the tunnel entry-point node, and the
  381.    destination field with an IPv6  address  of  the  tunnel  exit-point.
  382.    Subsequently,  the tunnel packet resulting from encapsulation is sent
  383.    towards the tunnel exit-point node.
  384.  
  385.    Tunnel extension headers should appear in the  order  recommended  by
  386.    the  specifications  that define the extension headers, such as [RFC-
  387.    1883].
  388.  
  389.    A  source  of  original  packets  and  a  tunnel   entry-point   that
  390.    encapsulates those packets can be the same node.
  391.  
  392.                             +----------------------------------//-----+
  393.                             | Original |                              |
  394.                             |          |   Original Packet Payload    |
  395.                             | Header   |                              |
  396.                             +----------------------------------//-----+
  397.                              <            Original Packet            >
  398.                                               |
  399.                                               v
  400.        <Tunnel IPv6 Headers> <       Original Packet                 >
  401.       +---------+ - - - - - +-------------------------//--------------+
  402.       | IPv6    | IPv6      |                                         |
  403.       |         | Extension |        Original Packet                  |
  404.       | Header  | Headers   |                                         |
  405.       +---------+ - - - - - +-------------------------//--------------+
  406.        <                          Tunnel IPv6 Packet                 >
  407.  
  408.             Fig.3 Encapsulating a Packet
  409.  
  410.  
  411.  
  412. Conta & Deering       Expires in six months         [Page 7]
  413.  
  414.  
  415.  
  416.  
  417. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  418.  
  419.  
  420. 3.2 Packet Processing in Tunnels
  421.  
  422.  
  423.    The intermediate nodes in the tunnel process the IPv6 tunnel  packets
  424.    according  to  the  IPv6  protocol.  For example, a tunnel Hop by Hop
  425.    Options extension header is processed by each receiving node  in  the
  426.    tunnel; a tunnel Routing extension header identifies the intermediate
  427.    processing nodes, and controls at a finer granularity the  forwarding
  428.    path  of  the  tunnel packet through the tunnel; a tunnel Destination
  429.    Options extension header is processed at the tunnel exit-point node.
  430.  
  431.  
  432.  
  433. 3.3 IPv6 Decapsulation
  434.  
  435.    Decapsulation is graphically shown in Fig.4:
  436.  
  437.          +---------+- - - - - -+----------------------------------//-----+
  438.          | IPv6    | IPv6      |                                         |
  439.          |         | Extension |        Original Packet                  |
  440.          | Header  | Headers   |                                         |
  441.          +---------+- - - - - -+----------------------------------//-----+
  442.           <                      Tunnel IPv6 Packet                     >
  443.                                           |
  444.                                           v
  445.                                +----------------------------------//-----+
  446.                                | Original |                              |
  447.                                |          |   Original Packet Payload    |
  448.                                | Headers  |                              |
  449.                                +----------------------------------//-----+
  450.                                 <            Original Packet            >
  451.  
  452.  
  453.                  Fig.4 Decapsulating a Packet
  454.  
  455.  
  456.    Upon receiving an IPv6 packet destined to an IPv6 address of a tunnel
  457.    exit-point   node,  its  IPv6  protocol  layer  processes  the tunnel
  458.    headers. The strict  left-to-right  processing  rules  for  extension
  459.    headers is applied. When processing is complete, control is handed to
  460.    the next protocol engine, which is  identified  by  the  Next  Header
  461.    field  value in the last header processed. If this is set to a tunnel
  462.    protocol value,  the  tunnel  protocol  engine  discards  the  tunnel
  463.    headers  and  passes the resulting original packet to the Internet or
  464.    lower layer protocol identified by that value for further processing.
  465.    For  example,  in  the case the Next Header field has the IPv6 Tunnel
  466.    Protocol value, the resulting original packet is passed to  the  IPv6
  467.    protocol layer.
  468.  
  469.  
  470.  
  471. Conta & Deering       Expires in six months         [Page 8]
  472.  
  473.  
  474.  
  475.  
  476. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  477.  
  478.  
  479.    The tunnel exit-point node, which decapsulates  the  tunnel  packets,
  480.    and  the  destination  node,  which  receives  the resulting original
  481.    packets can be the same node.
  482.  
  483.  
  484. 3.4 IPv6 Tunnel Protocol Engine
  485.  
  486.    Packet flow (paths #1-7) through the IPv6 Tunnel Protocol Engine on a
  487.    node is graphically shown in Fig.5:
  488.  
  489.       +-----------------------+   +-----------------------------------+
  490.       | Upper-Layer Protocols |   | IPv6 Tunnel Upper-Layer           |
  491.       |                       |   |                                   |
  492.       |                       |   | ---<-------------------<-------   |
  493.       |                       |   | | ---->---|------>---------   |   |
  494.       |                       |   | | |       | |             |   |   |
  495.       +-----------------------+   +-----------------------+   |   |   |
  496.          | |             | |        | |       | |         |   v   ^   |
  497.          v ^             v ^        v ^       v ^  Tunnel |   |   |   |
  498.          | |             | |        | |       | |  Packets|   |   |   |
  499.       +---------------------------------------------+     |   |   |   |
  500.       |  | |             | |       / /        | |   |     |   D   E   |
  501.       |  v ^    IPv6     | --<-3--/-/--<----  | |   |     |   E   N   |
  502.       |  | |    Layer    ---->-4-/-/--->-- |  | |   |     |   C   C   |
  503.       |  v ^                    / /      | |  | |   |     |   A   A   |
  504.       |  | |                   2 1       | |  | |   |     |   P   P   |
  505.       |  v ^     -----<---5---/-/-<----  v ^  v ^   |     |   S   S   |
  506.       |  | |     | -->---6---/-/-->-- |  | |  | |   |     |   U   U   |
  507.       |  v ^     | |        / /     6 5  4 3  8 7   |     |   L   L   |
  508.       |  | |     | |       / /      | |  | |  | |   |     |   A   A   |
  509.       |  v ^     v ^      / /       v ^  | |  | |   |     |   T   T   |
  510.       +---------------------------------------------+     |   E   E   |
  511.          | |     | |     | |        | |  | |  | |         |   |   |   |
  512.          v ^     v ^     v ^        v ^  v ^  v ^ Original|   |   |   |
  513.          | |     | |     | |        | |  | |  | | Packets |   v   ^   |
  514.       +-----------------------+   +-----------------------+   |   |   |
  515.       |                       |   | | |  | |  | |             |   |   |
  516.       |                       |   | | ---|----|-------<--------   |   |
  517.       |                       |   | --->--------------->------>----   |
  518.       |                       |   |                                   |
  519.       | Link-Layer Protocols  |   | IPv6 Tunnel Link-Layer            |
  520.       +-----------------------+   +-----------------------------------+
  521.  
  522.  
  523.      Fig.5 Packet Flow in the IPv6 Tunneling Protocol Engine on a Node
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530. Conta & Deering       Expires in six months         [Page 9]
  531.  
  532.  
  533.  
  534.  
  535. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  536.  
  537.  
  538.    Note:
  539.  
  540.    In  Fig.5,  the  Upper-Layer  Protocols  box   represents   transport
  541.    protocols  such  as TCP, UDP, control protocols such as ICMP, routing
  542.    protocols such as OSPF, and internet or  lower-layer  protocol  being
  543.    "tunneled"  over  IPv6,  such  as  IPv4,  IPX,  etc.  The  Link-Layer
  544.    Protocols box represents Ethernet, Token Ring, FDDI, PPP, X.25, Frame
  545.    Relay,  ATM, etc..., as well as internet layer "tunnels" such as IPv4
  546.    tunnels.
  547.  
  548.  
  549.    The IPv6 tunnel protocol engine acts as both an "upper-layer"  and  a
  550.    "link-layer", each with a specific input and output as follows:
  551.  
  552.    (u.i) "tunnel upper-layer input" - consists of  tunnel  IPv6  packets
  553.          that  are  going  to  be  decapsulated.  The tunnel packets are
  554.          incoming through the IPv6 layer from:
  555.  
  556.          (u.i.1) a link-layer - (path #1, Fig.5)
  557.  
  558.                  These are tunnel packets destined to this node and will
  559.                  undergo decapsulation.
  560.  
  561.          (u.i.2) a tunnel link-layer - (path #7, Fig.5)
  562.  
  563.                  These are tunnel packets that  underwent  one  or  more
  564.                  decapsulations  on  this node, that is, the packets had
  565.                  one or more nested tunnel headers and one nested tunnel
  566.                  header  was just discarded. This node is the exit-point
  567.                  of both an outer tunnel and one or more  of  its  inner
  568.                  tunnels.
  569.  
  570.          For both above cases the resulting original packets are  passed
  571.          back  to  the  IPv6  layer  as  "tunnel  link-layer" output for
  572.          further processing (see b.2).
  573.  
  574.  
  575.    (u.o) "tunnel upper-layer output" - consists of tunnel  IPv6  packets
  576.          that are passed through the IPv6 layer down to:
  577.  
  578.  
  579.          (u.o.1) a link-layer - (path #2, Fig.5)
  580.  
  581.                  These packets  underwent  encapsulation  and  are  sent
  582.                  towards the tunnel exit-point
  583.  
  584.          (u.o.2) a tunnel link-layer - (path #8, Fig.5)
  585.  
  586.  
  587.  
  588.  
  589. Conta & Deering       Expires in six months        [Page 10]
  590.  
  591.  
  592.  
  593.  
  594. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  595.  
  596.  
  597.                  These tunnel packets undergo nested encapsulation. This
  598.                  node  is  the  entry-point node of both an outer tunnel
  599.                  and one or more of its inner tunnel.
  600.  
  601.      Implementation Note:
  602.  
  603.      The tunnel upper-layer input and output can be implemented  similar
  604.      to the input and output of the other upper-layer protocols.
  605.  
  606.    The tunnel link-layer input and output are as follows:
  607.  
  608.  
  609.     (l.i) "tunnel link-layer input" - consists of original IPv6  packets
  610.           that are going to be encapsulated.
  611.  
  612.           The original packets are incoming through the IPv6 layer from:
  613.  
  614.           (l.i.1) an upper-layer - (path #4, Fig.5)
  615.  
  616.                   These are original packets originating  on  this  node
  617.                   that undergo encapsulation. The original packet source
  618.                   and tunnel entry-point are the same node.
  619.  
  620.           (l.i.2) a link-layer - (path #6, Fig.5)
  621.  
  622.                   These are original packets incoming from  a  different
  623.                   node  that undergo encapsulation on this tunnel entry-
  624.                   point node.
  625.  
  626.           (l.i.3) a tunnel upper-layer - (path #8, Fig.5)
  627.  
  628.                   These packets are tunnel packets that  undergo  nested
  629.                   encapsulation.  This node is both the entry-point node
  630.                   of an outer tunnel  and  one  or  more  of  its  inner
  631.                   tunnels.
  632.  
  633.           The resulting tunnel packets are passed as tunnel  upper-layer
  634.           output packets through the IPv6 layer (see u.o) down to:
  635.  
  636.  
  637.     (l.o) "tunnel link-layer output" - consists of original IPv6 packets
  638.           resulting from decapsulation. These packets are passed through
  639.           the IPv6 layer to:
  640.  
  641.           (l.o.1) an upper-layer - (path #3, Fig.5)
  642.  
  643.                   These original packets are destined to this node.
  644.  
  645.  
  646.  
  647.  
  648. Conta & Deering       Expires in six months        [Page 11]
  649.  
  650.  
  651.  
  652.  
  653. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  654.  
  655.  
  656.           (l.o.2) a link-layer - (path #5, Fig.5)
  657.  
  658.                   These original packets are destined to  another  node;
  659.                   they   are   transmitted   on  a  link  towards  their
  660.                   destination.
  661.  
  662.           (l.o.3) a tunnel upper-layer - (path #7, Fig.5)
  663.  
  664.                   These packets undergo another decapsulation; they were
  665.                   nested  tunnel  packets.  This  node is both the exit-
  666.                   point node of an outer tunnel and one  or  more  inner
  667.                   tunnels.
  668.  
  669.       Implementation Note:
  670.  
  671.       The tunnel link-layer input and output can be implemented  similar
  672.       to  the  input  and  output  of  other  link-layer  protocols, for
  673.       instance, associating an interface or  pseudo-interface  with  the
  674.       IPv6 tunnel.
  675.  
  676.       The selection of the "IPv6 tunnel link" over other  links  results
  677.       from  the packet forwarding decision taken based on the content of
  678.       the node's routing table.
  679.  
  680.  
  681.  
  682. 4. Nested Encapsulation
  683.  
  684.    Nested IPv6 encapsulation is the encapsulation of  a  tunnel  packet.
  685.    It  takes  place when a hop of an IPv6 tunnel is a tunnel. The tunnel
  686.    containing a tunnel is called an outer tunnel. The  tunnel  contained
  687.    in  the  outer  tunnel  is  called an inner tunnel - see Fig.6. Inner
  688.    tunnels and their outer tunnels are nested tunnels.
  689.  
  690.    The entry-point node of an "inner IPv6 tunnel" receives  tunnel  IPv6
  691.    packets encapsulated by the "outer IPv6 tunnel" entry-point node. The
  692.    "inner tunnel entry-point node" treats the receiving  tunnel  packets
  693.    as  original  packets  and  performs  encapsulation.   The  resulting
  694.    packets are "tunnel packets" for the "inner IPv6 tunnel", and "nested
  695.    tunnel packets" for the "outer IPv6 tunnel".
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707. Conta & Deering       Expires in six months        [Page 12]
  708.  
  709.  
  710.  
  711.  
  712. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  713.  
  714.  
  715.                  Outer Tunnel
  716.                  <------------------------------------->
  717.                  <--links--><-virtual link-><--links--->
  718.                               Inner Tunnel
  719.  
  720.                 Outer Tunnel                          Outer Tunnel
  721.                 Entry-Point                           Exit-Point
  722.                 Node                                  Node
  723.      +-+        +-+        +-+            +-+         +-+        +-+
  724.      | |        | |        | |            | |         | |        | |
  725.      | |->-//->-| |=>=//=>=| |**>**//**>**| |=>=//=>==| |->-//->-| |
  726.      | |        | |        | |            | |         | |        | |
  727.      +-+        +-+        +-+            +-+         +-+        +-+
  728.    Original                Inner Tunnel   Inner Tunnel         Original
  729.    Packet                  Entry-Point    Exit-Point           Packet
  730.    Source                  Node           Node                 Destination
  731.    Node                                                        Node
  732.  
  733.                  Fig.6. Nested Encapsulation
  734.  
  735.  
  736. 4.1 Limiting Nested Encapsulation
  737.  
  738.  
  739.    A tunnel IPv6 packet size is limited to  the  maximum  IPv6  datagram
  740.    size  [RFC  1883].  Each  encapsulation  adds to the size of a tunnel
  741.    packet the size of the tunnel IPv6 headers. Consequently, the  number
  742.    of   tunnel   headers,   and   therefore,   the   number   of  nested
  743.    encapsulations, and furthermore, the number of "inner  IPv6  tunnels"
  744.    that  an  "outer  IPv6  tunnel"  can  have are limited by the maximum
  745.    packet size.
  746.  
  747.    The increase in the size of  a  tunnel  IPv6  packet  due  to  nested
  748.    encapsulations  may require fragmentation [RFC-1883] - see section 7.
  749.    Furthermore, each fragmentation, due to nested encapsulation,  of  an
  750.    already  fragmented tunnel packet results in a doubling of the number
  751.    of fragments.  Moreover, it is probable that once this  fragmentation
  752.    begins,  each  new  nested  encapsulation  results  in yet additional
  753.    fragmentation.    Therefore   limiting   nested   encapsulation    is
  754.    recommended.
  755.  
  756.    The proposed mechanism for limiting excessive nested encapsulation is
  757.    a   "tunnel  encapsulation  limit",  which  is  carried  in  an  IPv6
  758.    Destination Option header.
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766. Conta & Deering       Expires in six months        [Page 13]
  767.  
  768.  
  769.  
  770.  
  771. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  772.  
  773.  
  774. 4.1.1 Tunnel Encapsulation Limit
  775.  
  776.    The "Tunnel Encapsulation Limit" destination option is provided  only
  777.    by  tunnel  entry-point  nodes,  it is discarded only by tunnel exit-
  778.    point nodes, and it is used to carry optional information  [RFC-1883]
  779.    that need be examined only by tunnel entry-point nodes.
  780.  
  781.    The "Tunnel Encapsulation Limit" destination  option  is  defined  as
  782.    follows:
  783.  
  784.  
  785.       Option Type     Opt Data Len   Opt Data Len
  786.     0 1 2 3 4 5 6 7
  787.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  788.    |0 0 0 0 0 1 0 0|       1       | Tun Encap Lim |
  789.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  790.  
  791.  
  792.       Option Type     value 4
  793.  
  794.                        - the highest-order  two  bits  -  set  to  00  -
  795.                       indicate  "skip  over this option if the option is
  796.                       not recognized".
  797.  
  798.                        - the  third-highest-order  bit  -  set  to  0  -
  799.                       indicates that the option data in this option does
  800.                       not change en route to  the  packet's  destination
  801.                       [RFC-1883].
  802.  
  803.       Opt Data Len    value 1 - the data portion of the  Option  is  one
  804.                       byte long.
  805.  
  806.       Opt Data Value  the  Tunnel  Encapsulation  Limit  value  -  8-bit
  807.                       unsigned integer.
  808.  
  809.    To avoid excessive nested encapsulation, an IPv6  tunnel  entry-point
  810.    node  may  prepend  to  a  packet  undergoing encapsulation a "Tunnel
  811.    Encapsulation Limit - Destination Option". The "OptData Value"  field
  812.    of the option is set to:
  813.  
  814.         (a)  a pre-configured value - if the packet  being  encapsulated
  815.              has  no  IPv6  destination  options  header  or  no "Tunnel
  816.              Encapsulation Limit" option in such a header - see  section
  817.              6.6.
  818.  
  819.         (b)  a  value  resulting  from  a  value  stored  in  the   IPv6
  820.              destination  options header - if such a header exist and if
  821.              it contains a  "Tunnel  Encapsulation  Limit"  option.  The
  822.  
  823.  
  824.  
  825. Conta & Deering       Expires in six months        [Page 14]
  826.  
  827.  
  828.  
  829.  
  830. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  831.  
  832.  
  833.              "OptData  Value"  of  the  extant option is copied into the
  834.              newly prepended "Tunnel  Encapsulation  Limit"  option  and
  835.              then decremented by one.
  836.  
  837.              This  is  an  exception  to  the  rule  of   processing   a
  838.              destination  options extension header in that, although the
  839.              entry-point  node  is  not  a  destination   node,   during
  840.              encapsulation,  the  IPv6  tunneling  protocol engine looks
  841.              ahead, for  an  IPv6  destination  header  with  a  "Tunnel
  842.              Encapsulation   Limit"  option  immediately  following  the
  843.              current IPv6 main header.
  844.  
  845.              If the Tunnel Encapsulation Limit is decremented  to  zero,
  846.              the  packet undergoing encapsulation is discarded. When the
  847.              packet is  discarded,  a  Parameter  Problem  ICMP  message
  848.              [RFC-1885]  is  returned to the packet originator, which is
  849.              the previous tunnel entry-point. The message points to  the
  850.              Opt  Data Value field within the Tunnel Encapsulation Limit
  851.              destination header of the packet. The field pointed to  has
  852.              a value of one.
  853.  
  854.  
  855.    Two cases of encapsulation  that  should  be  avoided  are  described
  856.    below:
  857.  
  858.  
  859.  
  860. 4.1.2 Loopback Encapsulation
  861.  
  862.  
  863.    A particular case of encapsulation  which  must  be  avoided  is  the
  864.    loopback  encapsulation.  Loopback  encapsulation  takes place when a
  865.    tunnel  IPv6  entry-point  node  encapsulates  tunnel  IPv6   packets
  866.    originated from itself, and destined to itself.  This can generate an
  867.    infinite processing loop in the entry-point node.
  868.  
  869.    To avoid such a case, it is recommended that an implementation have a
  870.    mechanism  that  checks  and rejects the configuration of a tunnel in
  871.    which both the entry-point and exit-point node  addresses  belong  to
  872.    the  same  node. It is also recommended that the encapsulating engine
  873.    check for and reject the encapsulation of a packet that has the  pair
  874.    of  tunnel  entry-point  and  exit-point addresses identical with the
  875.    pair of original packet source and final destination addresses.
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884. Conta & Deering       Expires in six months        [Page 15]
  885.  
  886.  
  887.  
  888.  
  889. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  890.  
  891.  
  892. 4.1.3 Routing-Loop Nested Encapsulation
  893.  
  894.  
  895.    In the case of a forwarding path with multiple level nested  tunnels,
  896.    a   routing-loop   from  an  inner  tunnel  to  an  outer  tunnel  is
  897.    particularly dangerous when packets from the inner tunnels reenter an
  898.    outer tunnel from which they have not yet exited. In such a case, the
  899.    nested encapsulation  becomes  a  recursive  encapsulation  with  the
  900.    negative effects described in 4.1.  Because each nested encapsulation
  901.    adds a tunnel header with a new hop limit value, the IPv6  hop  limit
  902.    mechanism  cannot  control the number of times the packet reaches the
  903.    outer tunnel entry-point node, and thus cannot control the number  of
  904.    recursive encapsulations.
  905.  
  906.    When the path of a packet from source to final  destination  includes
  907.    tunnels,  the  maximum  number  of  hops that the packet can traverse
  908.    should be controlled by two mechanisms used  together  to  avoid  the
  909.    negative effects of recursive encapsulation in routing loops:
  910.  
  911.  
  912.         (a)  the original packet hop limit.
  913.  
  914.              It is decremented at each forwarding operation performed on
  915.              an original packet. This includes each encapsulation of the
  916.              original packet. It does not include nested  encapsulations
  917.              of the original packet
  918.  
  919.         (b)  the tunnel IPv6 packet encapsulation limit.
  920.  
  921.              It is decremented  at  each  nested  encapsulation  of  the
  922.              packet.
  923.  
  924.  
  925.    For a discussion of  the  excessive  encapsulation  risk  factors  in
  926.    nested encapsulation see Appendix A.
  927.  
  928.  
  929. 5. Tunnel IPv6 Header
  930.  
  931.  
  932.    The tunnel entry-point node fills  out  a  tunnel  IPv6  main  header
  933.    [RFC-1883] as follows:
  934.  
  935.  
  936.           Version:
  937.  
  938.             value 6
  939.  
  940.  
  941.  
  942.  
  943. Conta & Deering       Expires in six months        [Page 16]
  944.  
  945.  
  946.  
  947.  
  948. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  949.  
  950.  
  951.           Priority:
  952.  
  953.             Depending on the entry-point node tunnel configuration,  the
  954.             priority can be set to that of either the original packet or
  955.             a pre-configured value - see section 6.3.
  956.  
  957.           Flow label:
  958.  
  959.             Depending on the entry-point node tunnel configuration,  the
  960.             flow label can be set to a pre-configured value. The typical
  961.             value is zero - see section 6.4.
  962.  
  963.           Payload Length:
  964.  
  965.             The  original  packet  length,  plus  the  length   of   the
  966.             encapsulating (prepended) IPv6 extension headers, if any.
  967.  
  968.           Next header:
  969.  
  970.             The next header  value  according  to  [RFC-1883]  from  the
  971.             Assigned Numbers RFC [RFC-1700 or its succesors ].
  972.  
  973.             For example, if the original packet is an IPv6 packet,  this
  974.             is set to:
  975.  
  976.                  - decimal value 41 (Assigned payload  type  number  for
  977.                  IPv6) - if there are no tunnel extension headers.
  978.  
  979.  
  980.                  - value 0 (Assigned payload type number for IPv6 Hop by
  981.                  Hop  Options  header)  - if a hop by hop options header
  982.                  immediately follows the tunnel IPv6 header.
  983.  
  984.  
  985.                  - decimal value 60 (Assigned payload  type  number  for
  986.                  IPv6   Destination   Options  header)  -  if  a  Tunnel
  987.                  Encapsulation   Limit   destination    option    header
  988.                  immediately follows the tunnel IPv6 header.
  989.  
  990.           Hop limit:
  991.  
  992.             The tunnel IPv6 header hop limit is set to a  pre-configured
  993.             value - see section 6.3.
  994.  
  995.             The default  value  for  hosts  is  the  Neighbor  Discovery
  996.             advertised  hop  limit  [RFC-1970].  The  default  value for
  997.             routers is  the  default  IPv6  Hop  Limit  value  from  the
  998.             Assigned  Numbers  RFC  (64  at  the  time  of  writing this
  999.  
  1000.  
  1001.  
  1002. Conta & Deering       Expires in six months        [Page 17]
  1003.  
  1004.  
  1005.  
  1006.  
  1007. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  1008.  
  1009.  
  1010.             document).
  1011.  
  1012.           Source Address:
  1013.  
  1014.             An IPv6 address of the  outgoing  interface  of  the  tunnel
  1015.             entry-point  node.  This address is configured as the tunnel
  1016.             entry-point node address - see section 6.1.
  1017.  
  1018.           Destination Address:
  1019.  
  1020.             An IPv6 address of the tunnel exit-point node. If the tunnel
  1021.             is  configured  as a free-exit tunnel, then the IPv6 address
  1022.             of the destination from  the  original  IPv6  header  -  see
  1023.             section 6.2.
  1024.  
  1025.  
  1026.  
  1027. 5.1 Tunnel IPv6 Extension Headers
  1028.  
  1029.  
  1030.    Depending on IPv6 node configuration parameters, a tunnel entry-point
  1031.    node  may  append  to  the  tunnel  IPv6 main header one or more IPv6
  1032.    extension headers, such as hop by hop, routing, or others.
  1033.  
  1034.    To limit the number of nested encapsulations of a packet, if  it  was
  1035.    configured  to do so - see section 6.6 - a tunnel entry-point appends
  1036.    as the last tunnel extension  header  a  Tunnel  Encapsulation  Limit
  1037.    destination option header with fields set as follows:
  1038.  
  1039.  
  1040.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1041.    |  Next Header  |Hdr Ext Len = 0| Opt Type = 4  |Opt Data Len=1 |
  1042.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1043.    | Tun Encap Lim |PadN Opt Type=1|Opt Data Len=1 |       0       |
  1044.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1045.  
  1046.  
  1047.  
  1048.           Next Header:
  1049.  
  1050.             Identifies the type  of  the  original  packet  header.  For
  1051.             example,  if the original packet is an IPv6 packet, the next
  1052.             header protocol value is set to decimal value  41  (Assigned
  1053.             payload type number for IPv6).
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061. Conta & Deering       Expires in six months        [Page 18]
  1062.  
  1063.  
  1064.  
  1065.  
  1066. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  1067.  
  1068.  
  1069.           Hdr Ext Len:
  1070.  
  1071.             Length of the Tunnel Encapsulation Limit destination  option
  1072.             header  in  8-octet units, not including the first 8 octets.
  1073.             Set to value 0, if no other  options  are  present  in  this
  1074.             destination options header.
  1075.  
  1076.           Option Type:
  1077.  
  1078.             value 4 - see section 4.1.1.
  1079.  
  1080.           Opt Data Len:
  1081.  
  1082.             value 1 - see section 4.1.1.
  1083.  
  1084.           Tun Encap Lim:
  1085.  
  1086.             8 bit unsigned integer - see section 4.1.1.
  1087.  
  1088.           Option Type:
  1089.  
  1090.             value 1 - PadN option, to align the  header  following  this
  1091.             header.
  1092.  
  1093.           Opt Data Len:
  1094.  
  1095.             value 1 - one octet of option data.
  1096.  
  1097.           Option Data:
  1098.  
  1099.             value 0 - one zero-valued octet.
  1100.  
  1101.  
  1102.  
  1103. 6. IPv6 Tunnel State Variables
  1104.  
  1105.  
  1106.    The IPv6 tunnel  state  variables,  some  of  which  are  or  may  be
  1107.    configured on the tunnel entry-point node, are:
  1108.  
  1109.  
  1110. 6.1 IPv6 Tunnel Entry-Point Node Address
  1111.  
  1112.  
  1113.    The tunnel entry-point node address is one of the valid IPv6  unicast
  1114.    addresses  of the entry-point node - the validation of the address at
  1115.    tunnel configuration time is recommended.
  1116.  
  1117.  
  1118.  
  1119.  
  1120. Conta & Deering       Expires in six months        [Page 19]
  1121.  
  1122.  
  1123.  
  1124.  
  1125. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  1126.  
  1127.  
  1128.    The tunnel entry-point node address is copied to the  source  address
  1129.    field in the tunnel IPv6 header during packet encapsulation.
  1130.  
  1131.  
  1132. 6.2 IPv6 Tunnel Exit-Point Node Address
  1133.  
  1134.  
  1135.    The tunnel exit-point  node  address  is  used  as  IPv6  destination
  1136.    address  for  the  tunnel  IPv6  header.  The  tunnel exit-point node
  1137.    address can be configured with a specific IPv6 address, in which case
  1138.    the  tunnel  is called a fixed-exit tunnel. Such a tunnel acts like a
  1139.    virtual point to point link between the entry-point  node  and  exit-
  1140.    point  node.   Alternatively,  a  tunnel  exit-point  address  can be
  1141.    configured with no specific address, in  which  case  the  tunnel  is
  1142.    called a free-exit tunnel. Such a tunnel acts like a virtual point to
  1143.    point link between  the  entry-point  node  and  an  exit-point  node
  1144.    identified  by  the  destination  address  from  the  original packet
  1145.    header.
  1146.  
  1147.    The tunnel exit-point node  address  is  copied  to  the  destination
  1148.    address field in the tunnel IPv6 header during packet encapsulation.
  1149.  
  1150.    The configuration of the tunnel entry-point and exit-point  addresses
  1151.    is not subject to IPv6 Autoconfiguration, or IPv6 Neighbor Discovery.
  1152.  
  1153.  
  1154. 6.3 IPv6 Tunnel Hop Limit
  1155.  
  1156.  
  1157.    An IPv6 tunnel is modeled as a "single-hop virtual link"  tunnel,  in
  1158.    which  the  passing of the original packet through the tunnel is like
  1159.    the passing of the original packet over a one hop link, regardless of
  1160.    the number of hops in the IPv6 tunnel.
  1161.  
  1162.    The "single-hop" mechanism should be implemented by having the tunnel
  1163.    entry  point node set a tunnel IPv6 header hop limit independently of
  1164.    the hop limit of the original header.
  1165.  
  1166.    The "single-hop" mechanism hides from the original IPv6  packets  the
  1167.    number of IPv6 hops of the tunnel.
  1168.  
  1169.    It is recommended that the tunnel hop  limit  be  configured  with  a
  1170.    value that ensures:
  1171.  
  1172.         (a)  that tunnel IPv6 packets can reach  the  tunnel  exit-point
  1173.              node
  1174.  
  1175.         (b)  a quick expiration of the tunnel packet if a  routing  loop
  1176.  
  1177.  
  1178.  
  1179. Conta & Deering       Expires in six months        [Page 20]
  1180.  
  1181.  
  1182.  
  1183.  
  1184. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  1185.  
  1186.  
  1187.              occurs within the IPv6 tunnel.
  1188.  
  1189.    The tunnel hop limit default value for hosts  is  the  IPv6  Neighbor
  1190.    Discovery  advertised  hop  limit  [RFC-1970].  The  tunnel hop limit
  1191.    default value for routers is the default IPv6 Hop  Limit  value  from
  1192.    the Assigned Numbers RFC (64 at the time of writing this document).
  1193.  
  1194.    The tunnel hop limit is copied into the hop limit field of the tunnel
  1195.    IPv6  header  of  each  packet encapsulated by the tunnel entry-point
  1196.    node.
  1197.  
  1198.  
  1199. 6.4 IPv6 Tunnel Packet Priority
  1200.  
  1201.  
  1202.    The IPv6 Tunnel Packet Priority indicates the  value  that  a  tunnel
  1203.    entry-point  node  sets in the priority field of a tunnel header. The
  1204.    default value is zero.   The  configured  Packet  Priority  can  also
  1205.    indicate whether the value of the priority field in the tunnel header
  1206.    is copied from the  original  header,  or  it  is  set  to  the  pre-
  1207.    configured value.
  1208.  
  1209.  
  1210. 6.5 IPv6 Tunnel Flow Label
  1211.  
  1212.  
  1213.    The IPv6 Tunnel Flow Label indicates the value that a  tunnel  entry-
  1214.    point  node  sets  in  the flow label of a tunnel header. The default
  1215.    value is zero.
  1216.  
  1217.  
  1218. 6.6 IPv6 Tunnel Encapsulation Limit
  1219.  
  1220.  
  1221.    The Tunnel Encapsulation Limit value can indicate whether the  entry-
  1222.    point  node  is  configured  to limit the number of encapsulations of
  1223.    tunnel  packets  originating  on   that   node.   The   IPv6   Tunnel
  1224.    Encapsulation Limit is the maximum number of encapsulations permitted
  1225.    for  packets  undergoing  encapsulation  at  that  entry-point  node.
  1226.    Recommended  default  value  is  5. An entry-point node configured to
  1227.    limit  the  number  of  nested  encapsulations  prepends   a   Tunnel
  1228.    Encapsulation  Limit destination options header to an original packet
  1229.    undergoing encapsulation - see section 4.1, and 4.1.1.
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238. Conta & Deering       Expires in six months        [Page 21]
  1239.  
  1240.  
  1241.  
  1242.  
  1243. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  1244.  
  1245.  
  1246. 6.7 IPv6 Tunnel MTU
  1247.  
  1248.  
  1249.    The tunnel MTU is set dynamically to the Path MTU between the  tunnel
  1250.    entry-point  and  the  tunnel  exit-point nodes minus the size of the
  1251.    tunnel headers: the maximum size of a tunnel packet payload that  can
  1252.    be  sent  through  the  tunnel  without fragmentation [RFC-1883]. The
  1253.    tunnel entry-point node performs  Path  MTU  discovery  on  the  path
  1254.    between  the  tunnel  entry-point  and  exit-point  nodes [RFC-1981],
  1255.    [RFC-1885]. The tunnel MTU of a nested tunnel is the  tunnel  MTU  of
  1256.    the outer tunnel minus the size of the tunnel headers.
  1257.  
  1258.    Although it should be able to send a tunnel IPv6 packet of any  valid
  1259.    size,  a  tunnel entry-point node attempts to avoid the fragmentation
  1260.    of tunnel packets, by reporting to source nodes of  original  packets
  1261.    the  MTU  to  be  used  in  sizing original packets sent towards that
  1262.    tunnel entry-point node.
  1263.  
  1264.  
  1265. 7. IPv6 Tunnel Packet Size Issues
  1266.  
  1267.  
  1268.    Prepending a tunnel header increases the size of a packet,  therefore
  1269.    a tunnel packet resulting from the encapsulation of an IPv6  original
  1270.    packet may require fragmentation.
  1271.  
  1272.    A tunnel IPv6 packet resulting from the encapsulation of an  original
  1273.    packet  is  considered  an  IPv6  packet  originating from the tunnel
  1274.    entry-point node. Therefore, like any source of  an  IPv6  packet,  a
  1275.    tunnel  entry-point  node  must  support fragmentation of tunnel IPv6
  1276.    packets.
  1277.  
  1278.    A tunnel intermediate node that forwards a tunnel packet  to  another
  1279.    node  in  the  tunnel  follows the general IPv6 rule that it must not
  1280.    fragment a packet undergoing forwarding.
  1281.  
  1282.    A tunnel exit-point node receiving tunnel packets at the end  of  the
  1283.    tunnel  for decapsulation applies the strict left-to-right processing
  1284.    rules for extension headers. In the case  of  fragmentation  headers,
  1285.    the fragments are reassembled into a tunnel packet before determining
  1286.    that an embedded IP packet is present.
  1287.  
  1288.    Note:
  1289.  
  1290.    A particular problem arises when  the  destination  of  a  fragmented
  1291.    tunnel packet is an exit-point node identified by an anycast address.
  1292.    The problem, which is similar to that  of  original  fragmented  IPv6
  1293.    packets  destined to nodes identified by an anycast address, consists
  1294.  
  1295.  
  1296.  
  1297. Conta & Deering       Expires in six months        [Page 22]
  1298.  
  1299.  
  1300.  
  1301.  
  1302. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  1303.  
  1304.  
  1305.    in the requirement that all the fragments of a packet must arrive  to
  1306.    the  same  destination  node,  for  that node to be able to perform a
  1307.    successful reassembly.
  1308.  
  1309.  
  1310. 7.1 IPv6 Tunnel Packet Fragmentation
  1311.  
  1312.  
  1313.    Tunnel  packets  that  exceed  the  tunnel  MTU  are  candidates  for
  1314.    fragmentation.  The  fragmentation  of tunnel packets containing IPv6
  1315.    original packets is performed as follows:
  1316.  
  1317.  
  1318.         (a)  if the original IPv6 packet size is larger than 576 octets,
  1319.              the  entry-point node discards the packet and it returns an
  1320.              ICMPv6 "Packet Too Big" message to the source node  of  the
  1321.              original  packet with the recommended MTU size field set to
  1322.              the maximum between 576, and the tunnel MTU, i.e.  max(576,
  1323.              tunnel  MTU).  Note  that  the  tunnel  MTU is the Path MTU
  1324.              between the tunnel entry-point and  the  tunnel  exit-point
  1325.              nodes  minus  the  size  of  the  tunnel  headers. Also see
  1326.              section 6.7, and 8.2.
  1327.  
  1328.  
  1329.         (b)  if the original IPv6 packet is equal or  smaller  than  576
  1330.              octets,   the  tunnel  entry-point  node  encapsulates  the
  1331.              original packet, and subsequently fragments  the  resulting
  1332.              IPv6  tunnel  packet into IPv6 fragments that do not exceed
  1333.              the tunnel MTU.
  1334.  
  1335.  
  1336.  
  1337. 7.2 IPv4 Tunnel Packet Fragmentation
  1338.  
  1339.  
  1340.    Tunnel  packets  that  exceed  the  tunnel  MTU  are  candidates  for
  1341.    fragmentation.  The  fragmentation  of tunnel packets containing IPv4
  1342.    original packets is performed as follows:
  1343.  
  1344.  
  1345.         (a)  if in the original IPv4 packet header the Don't Fragment  -
  1346.              DF  -  bit  flag  is SET, the entry-point node discards the
  1347.              packet and returns an ICMP message.  The ICMP  message  has
  1348.              the  type  =  "unreachable", the code = "datagram too big",
  1349.              and the recommended MTU size field set to the size  of  the
  1350.              tunnel MTU - see section 6.7, and 8.3.
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356. Conta & Deering       Expires in six months        [Page 23]
  1357.  
  1358.  
  1359.  
  1360.  
  1361. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  1362.  
  1363.  
  1364.         (b)  if in the original packet header the Don't Fragment - DF  -
  1365.              bit flag is CLEAR, the tunnel entry-point node encapsulates
  1366.              the  original  packet,  and  subsequently   fragments   the
  1367.              resulting  IPv6  tunnel  packet into IPv6 fragments that do
  1368.              not exceed the tunnel MTU.
  1369.  
  1370.  
  1371.  
  1372. 8. IPv6 Tunnel Error Processing and Reporting
  1373.  
  1374.  
  1375.    IPv6 Tunneling follows the general rule that an error detected during
  1376.    the  processing of an IPv6 packet is reported through an ICMP message
  1377.    to the source of the packet.
  1378.  
  1379.    On a forwarding path that includes IPv6 tunnels, an error detected by
  1380.    a  node  that is not in any tunnel is directly reported to the source
  1381.    of the original IPv6 packet.
  1382.  
  1383.    An error detected by a node inside a tunnel is reported to the source
  1384.    of the tunnel packet, that is, the tunnel entry-point node.  The ICMP
  1385.    message sent to the tunnel entry-point node has as ICMP  payload  the
  1386.    tunnel IPv6 packet that has the original packet as its payload.
  1387.  
  1388.    The cause of a packet error encountered inside  a  tunnel  can  be  a
  1389.    problem with:
  1390.  
  1391.         (a)  the tunnel header, or
  1392.  
  1393.         (b)  the tunnel packet.
  1394.  
  1395.    Both tunnel header and tunnel packet problems  are  reported  to  the
  1396.    tunnel entry-point node.
  1397.  
  1398.    If a tunnel packet problem is a consequence of  a  problem  with  the
  1399.    original  packet, which is the payload of the tunnel packet, then the
  1400.    problem is also reported to the source of the original packet.
  1401.  
  1402.    To report a problem detected inside the tunnel to the  source  of  an
  1403.    original  packet,  the  tunnel  entry  point node must relay the ICMP
  1404.    message received from  inside  the  tunnel  to  the  source  of  that
  1405.    original IPv6 packet.
  1406.  
  1407.    An example of the  processing  that  can  take  place  in  the  error
  1408.    reporting mechanism of a node is illustrated in Fig.7, and Fig.8:
  1409.  
  1410.    Fig.7 path #0 and Fig.8 (a) - The IPv6 tunnel entry-point receives an
  1411.    ICMP  packet  from inside the tunnel, marked Tunnel ICMPv6 Message in
  1412.  
  1413.  
  1414.  
  1415. Conta & Deering       Expires in six months        [Page 24]
  1416.  
  1417.  
  1418.  
  1419.  
  1420. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  1421.  
  1422.  
  1423.    Fig.7. The tunnel entry-point node IPv6  layer  passes  the  received
  1424.    ICMP message to the ICMPv6 Input. The ICMPv6 Input, based on the ICMP
  1425.    type and code [RFC-1885] generates an internal "error code".
  1426.  
  1427.    Fig.7 path #1 - The internal error code, is passed with  the  "ICMPv6
  1428.    message  payload" to the upper-layer protocol - in this case the IPv6
  1429.    tunnel upper-layer error input.
  1430.  
  1431.  +-------+   +-------+   +-----------------------+
  1432.  | Upper |   | Upper |   | Upper                 |
  1433.  | Layer |   | Layer |   | Layer                 |
  1434.  | Proto.|   | Proto |   | IPv6 Tunnel           |
  1435.  | Error |   | Error |   | Error                 |
  1436.  | Input |   | Input |   | Input                 |
  1437.  |       |   |       |   |       Decapsulate     |
  1438.  |       |   |       |   |  -->--ICMPv6--#2->--  |
  1439.  |       |   |       |   |  |    Payload      |  |
  1440.  +-------+   +-------+   +--|-----------------|--+
  1441.      |           |          |                 |
  1442.      ^           ^          ^                 v
  1443.      |           |          |                 |
  1444.      --------------------#1--      -----Orig.Packet?--- - - - - - - - - -
  1445.               #1                  #3  Int.Error Code, #5                |
  1446. Int.Error Code,^                   v  Source Address, v                 v
  1447. ICMPv6 Payload |            IPv6   |  Orig. Packet    | IPv4            |
  1448.       +--------------+    +--------------+    +--------------+    + - - - - +
  1449.       |              |    |              |    |              |
  1450.       | ICMP v6      |    | ICMP v6      |    | ICMP v4      |    |         |
  1451.       | Input        |    | Error Report |    | Error Report |
  1452.       |  -  -  -  -  +----+  -  -  -  -  |    +  -  -  -  -  +    + - - - - +
  1453.       |                                  |    |              |
  1454.       |            IPv6 Layer            |    |  IPv4 Layer  |    |         |
  1455.       |                                  |    |              |
  1456.       +----------------------------------+    +--------------+    + - - - - +
  1457.             |                    |                    |
  1458.             ^                    V                    V
  1459.             #0                   #4                   #6
  1460.             |                    |                    |
  1461.        Tunnel ICMPv6            ICMPv6               ICMPv4
  1462.          Message                Message              Message
  1463.             |                    |                    |
  1464.  
  1465.    Fig.7 Error Reporting Flow in a Node (IPv6 Tunneling Protocol Engine)
  1466.  
  1467.    Fig.7  path  #2  and  Fig.8  (b)  -  The  IPv6  tunnel  error   input
  1468.    decapsulates  the  tunnel  IPv6  packet,  which is the ICMPv6 message
  1469.    payload, obtaining the original packet, and thus the original headers
  1470.    and dispatches the "internal error code", the source address from the
  1471.  
  1472.  
  1473.  
  1474. Conta & Deering       Expires in six months        [Page 25]
  1475.  
  1476.  
  1477.  
  1478.  
  1479. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  1480.  
  1481.  
  1482.    original packet header, and the original packet, down  to  the  error
  1483.    report  block  of the protocol identified by the Next Header field in
  1484.    the tunnel header immediately preceding the original  packet  in  the
  1485.    ICMP message payload.
  1486.  
  1487.    From here the processing depends on  the  protocol  of  the  original
  1488.    packet:
  1489.  
  1490.         (a)  - for an IPv6 original packet
  1491.  
  1492.      Fig.7 path #3 and Fig.8 (c.1)- for an  IPv6  original  packet,  the
  1493.      ICMPv6  error  report  builds  an  ICMP  message of a type and code
  1494.      according to the "internal error code",  containing  the  "original
  1495.      packet" as ICMP payload.
  1496.  
  1497.      Fig.7 path #4 and Fig.8 (d.1)- The  ICMP  message  has  the  tunnel
  1498.      entry-point node address as source address, and the original packet
  1499.      source node address as destination address. The tunnel  entry-point
  1500.      node  sends  the  ICMP  message  to the source node of the original
  1501.      packet.
  1502.  
  1503.         (b)  - for an IPv4 original packet
  1504.  
  1505.      Fig.7 path #5 and Fig.8 (c.2) - for an IPv4  original  packet,  the
  1506.      ICMPv4  error  report  builds  an  ICMP  message of a type and code
  1507.      derived  from  the  the  "internal  error  code",  containing   the
  1508.      "original packet" as ICMP payload.
  1509.  
  1510.      Fig.7 path #6 and Fig.8 (d.2) - The ICMP  message  has  the  tunnel
  1511.      entry-point  node  IPv4 address as source address, and the original
  1512.      packet IPv4 source node address as destination address. The  tunnel
  1513.      entry-point  node  sends the ICMP message to the source node of the
  1514.      original packet.
  1515.  
  1516.    A graphical description of the header processing taking place is  the
  1517.    following:
  1518.  
  1519.     <                     Tunnel Packet                                >
  1520.    +--------+- - - - - -+--------+------------------------------//------+
  1521.    | IPv6   | IPv6      | ICMP   |             Tunnel                   |
  1522. (a)|        | Extension |        |             IPv6                     |
  1523.    | Header | Headers   | Header |             Packet in error          |
  1524.    +--------+- - - - - -+--------+------------------------------//------+
  1525.     < Tunnel Headers   > <       Tunnel ICMP Message                   >
  1526.                                   <         ICMPv6 Message Payload     >
  1527.                                  |
  1528.                                  v
  1529.  
  1530.  
  1531.  
  1532.  
  1533. Conta & Deering       Expires in six months        [Page 26]
  1534.  
  1535.  
  1536.  
  1537.  
  1538. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  1539.  
  1540.  
  1541.         <                    Tunnel ICMP Message                   >
  1542.                         <       Tunnel IPv6 Packet in Error        >
  1543.        +--------+      +---------+      +----------+--------//------+
  1544.        | ICMP   |      | Tunnel  |      | Original | Original       |
  1545. (b)    |        |  +   | IPv6    |  +   |          | Packet         |
  1546.        | Header |      | Headers |      | Headers  | Payload        |
  1547.        +--------+      +---------+      +----------+--------//------+
  1548.            |                             <Original Packet in Error >
  1549.            -----------------              |
  1550.                            |              |
  1551.              --------------|---------------
  1552.              |             |
  1553.              V             V
  1554.        +---------+      +--------+      +-------------------//------+
  1555.        | New     |      | ICMP   |      |                           |
  1556. (c.1)  | IPv6    |  +   |        |  +   | Orig. Packet in Error     |
  1557.        | Headers |      | Header |      |                           |
  1558.        +---------+      +--------+      +-------------------//------+
  1559.                              |
  1560.                              v
  1561.                  +---------+--------+-------------------//------+
  1562.                  | New     | ICMP   |  Original                 |
  1563. (d.1)            | IPv6    |        |                           |
  1564.                  | Headers | Header |  Packet in Error          |
  1565.                  +---------+--------+-------------------//------+
  1566.                   <             New ICMP Message               >
  1567.  
  1568.                   or for an IPv4 original packet
  1569.  
  1570.        +---------+      +--------+      +-------------------//------+
  1571.        | New     |      | ICMP   |      |                           |
  1572. (c.2)  | IPv4    |  +   |        |  +   | Orig. Packet in Error     |
  1573.        | Header  |      | Header |      |                           |
  1574.        +---------+      +--------+      +-------------------//------+
  1575.                              |
  1576.                              v
  1577.                  +---------+--------+-------------------//------+
  1578.                  | New     | ICMP   |  Original                 |
  1579. (d.2)            | IPv4    |        |                           |
  1580.                  | Header  | Header |  Packet in Error          |
  1581.                  +---------+--------+-------------------//------+
  1582.                   <             New ICMP Message               >
  1583.  
  1584.                 Fig.8 ICMP Error Reporting and Processing
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.  
  1592. Conta & Deering       Expires in six months        [Page 27]
  1593.  
  1594.  
  1595.  
  1596.  
  1597. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  1598.  
  1599.  
  1600. 8.1 Tunnel ICMP Messages
  1601.  
  1602.  
  1603.    The tunnel ICMP messages that are  reported  to  the  source  of  the
  1604.    original packet are:
  1605.  
  1606.         hop limit exceeded
  1607.  
  1608.              The tunnel has a misconfigured hop  limit,  or  contains  a
  1609.              routing  loop,  and  packets  do not reach the tunnel exit-
  1610.              point node. This problem is reported to the  tunnel  entry-
  1611.              point  node, where the tunnel hop limit can be reconfigured
  1612.              to a higher value. The problem is further reported  to  the
  1613.              source  of the original packet as described in section 8.2,
  1614.              or 8.3.
  1615.  
  1616.         unreachable node
  1617.  
  1618.              One of the nodes in the tunnel  is  not  or  is  no  longer
  1619.              reachable.  This  problem  is reported to the tunnel entry-
  1620.              point node, which should be reconfigured with a  valid  and
  1621.              active path between the entry and exit-point of the tunnel.
  1622.              The problem is  further  reported  to  the  source  of  the
  1623.              original packet as described in section 8.2, or 8.3.
  1624.  
  1625.         parameter problem
  1626.  
  1627.              A Parameter Problem ICMP message pointing to a valid Tunnel
  1628.              Encapsulation Limit Destination header with a Tun Encap Lim
  1629.              field value set to one is an  indication  that  the  tunnel
  1630.              packet   exceeded  the  maximum  number  of  encapsulations
  1631.              allowed. The problem is further reported to the  source  of
  1632.              the original packet as described in section 8.2, or 8.3.
  1633.  
  1634.  
  1635.    The above three problems detected inside  the  tunnel,  which  are  a
  1636.    tunnel  configuration  and a tunnel topology problem, are reported to
  1637.    the  source  of  the  original  IPv6  packet,  as  a  tunnel  generic
  1638.    "unreachable"  problem  caused  by a "link problem" - see section 8.2
  1639.    and 8.3.
  1640.  
  1641.         packet too big
  1642.  
  1643.              The tunnel packet exceeds the tunnel Path MTU.
  1644.  
  1645.              The information carried by this type  of  ICMP  message  is
  1646.              used as follows:
  1647.  
  1648.  
  1649.  
  1650.  
  1651. Conta & Deering       Expires in six months        [Page 28]
  1652.  
  1653.  
  1654.  
  1655.  
  1656. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  1657.  
  1658.  
  1659.              - by a receiving tunnel entry-point node to set  or  adjust
  1660.              the tunnel MTU
  1661.  
  1662.              - by a sending tunnel entry-point node  to indicate to  the
  1663.              source  of  an  original packet the MTU size that should be
  1664.              used in sending IPv6 packets towards the tunnel entry-point
  1665.              node.
  1666.  
  1667.  
  1668.  
  1669.  
  1670. 8.2 ICMP Messages for IPv6 Original Packets
  1671.  
  1672.  
  1673.    The tunnel entry-point node builds the ICMP and IPv6 headers  of  the
  1674.    ICMP  message  that  is  sent to the source of the original packet as
  1675.    follows:
  1676.  
  1677.    IPv6 Fields:
  1678.  
  1679.    Source Address
  1680.  
  1681.                   A valid unicast IPv6 address of the outgoing interface.
  1682.  
  1683.    Destination Address
  1684.  
  1685.                   Copied from the Source Address field of the Original
  1686.                   IPv6 header.
  1687.  
  1688.    ICMP Fields:
  1689.  
  1690.    For any of the following tunnel ICMP error messages:
  1691.  
  1692.      "hop limit exceeded"
  1693.  
  1694.      "unreachable node"
  1695.  
  1696.      "parameter problem" - pointing  to  a  valid  Tunnel  Encapsulation
  1697.      Limit  destination  header  with  the  Tun Encap Lim field set to a
  1698.      value one:
  1699.  
  1700.  
  1701.      Type           1 - unreachable node
  1702.  
  1703.      Code           3 - address unreachable
  1704.  
  1705.    For tunnel ICMP error message "packet too big":
  1706.  
  1707.  
  1708.  
  1709.  
  1710. Conta & Deering       Expires in six months        [Page 29]
  1711.  
  1712.  
  1713.  
  1714.  
  1715. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  1716.  
  1717.  
  1718.      Type           2 - packet too big
  1719.  
  1720.      Code           0
  1721.  
  1722.      MTU            The MTU field from the tunnel ICMP message minus
  1723.                     the length of the tunnel headers.
  1724.  
  1725.    According to the general rules described in 7.1, an ICMP "packet  too
  1726.    big" message is sent to the source of the original packet only if the
  1727.    original packet size is larger than 576 octets.
  1728.  
  1729.  
  1730. 8.3 ICMP Messages for IPv4 Original Packets
  1731.  
  1732.  
  1733.    The tunnel entry-point node builds the ICMP and IPv4  header  of  the
  1734.    ICMP  message  that  is  sent to the source of the original packet as
  1735.    follows:
  1736.  
  1737.    IPv4 Fields:
  1738.  
  1739.    Source Address
  1740.  
  1741.                   A valid unicast IPv4 address of the outgoing interface.
  1742.  
  1743.    Destination Address
  1744.  
  1745.                   Copied from the Source Address field of the Original
  1746.                   IPv4 header.
  1747.  
  1748.  
  1749.    ICMP Fields:
  1750.  
  1751.    For any of the following tunnel ICMP error messages:
  1752.  
  1753.      "hop limit exceeded"
  1754.  
  1755.      "unreachable node"
  1756.  
  1757.      "parameter problem" - pointing  to  a  valid  Tunnel  Enacpsulation
  1758.      Limit  destination  header  with  the  Tun Encap Lim field set to a
  1759.      value one:
  1760.  
  1761.  
  1762.      Type           3 - destination unreachable
  1763.  
  1764.      Code           1 - host unreachable
  1765.  
  1766.  
  1767.  
  1768.  
  1769. Conta & Deering       Expires in six months        [Page 30]
  1770.  
  1771.  
  1772.  
  1773.  
  1774. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  1775.  
  1776.  
  1777.    For a tunnel ICMP error message "packet too big":
  1778.  
  1779.      Type           3 - destination unreachable
  1780.  
  1781.      Code           4 - datagram too big
  1782.  
  1783.      MTU            The MTU field from the tunnel ICMP message minus
  1784.                     the length of the tunnel headers.
  1785.  
  1786.    According to the general rules described  in  section  7.2,  an  ICMP
  1787.    "datagram too big" message is sent to the original IPv4 packet source
  1788.    node if the the original IPv4  header has the DF - don't  fragment  -
  1789.    bit flag SET.
  1790.  
  1791.  
  1792. 8.4 ICMP Messages for Nested Tunnels Packets
  1793.  
  1794.  
  1795.    In case of an error uncovered with a nested tunnels packet, the inner
  1796.    tunnel  entry-point,  which  receives the ICMP error message from the
  1797.    inner tunnel reporting node, relays the ICMP  message  to  the  outer
  1798.    tunnel  entry-point  following  the  mechanisms described in sections
  1799.    8.,8.1, 8.2, and 8.3. Further, the outer  tunnel  entry-point  relays
  1800.    the  ICMP message to the source of the original packet, following the
  1801.    same mechanisms.
  1802.  
  1803.  
  1804. 9. Security Considerations
  1805.  
  1806.  
  1807.    An IPv6 tunnel can be secured, by securing the IPv6 path between  the
  1808.    tunnel  entry-point  and  exit-point node. The security architecture,
  1809.    mechanisms, and services are described in [RFC1825],  [RFC1826],  and
  1810.    [RFC1827].  A  secure  IPv6  tunnel  may  act as a gateway-to-gateway
  1811.    secure path as described in [RFC1825].
  1812.  
  1813.    For a secure IPv6 tunnel, in addition  to  the  mechanisms  described
  1814.    earlier in this document, the entry-point node of the tunnel performs
  1815.    security algorithms on the packet and prepends as part of the  tunnel
  1816.    headers  one  or more security headers in conformance with [RFC1883],
  1817.    [RFC1825], and [RFC1826], or [RFC1827].
  1818.  
  1819.    The exit-point  node  of  a  secure  IPv6  tunnel  performs  security
  1820.    algorithms and processes the tunnel security header[s] as part of the
  1821.    tunnel headers processing described earlier, and in conformance  with
  1822.    [RFC1825], and [RFC1826], or [RFC1827].  The exit-point node discards
  1823.    the tunnel security header[s] with the rest  of  the  tunnel  headers
  1824.    after tunnel headers processing completion.
  1825.  
  1826.  
  1827.  
  1828. Conta & Deering       Expires in six months        [Page 31]
  1829.  
  1830.  
  1831.  
  1832.  
  1833. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  1834.  
  1835.  
  1836.    The degree of integrity, authentication, and confidentiality and  the
  1837.    security  processing  performed on a tunnel packet at the entry-point
  1838.    and exit-point node of a secure IPv6 tunnel depend  on  the  type  of
  1839.    security  header  -  authentication  (AH)  or  encryption (ESP) - and
  1840.    parameters configured in the Security  Association  for  the  tunnel.
  1841.    There  is no dependency or interaction between the security level and
  1842.    mechanisms applied to the tunnel packets and the security applied  to
  1843.    the original packets which are the payloads of the tunnel packets. In
  1844.    case of nested tunnels, each inner tunnel may have  its  own  set  of
  1845.    security  services, independently from those of the outer tunnels, or
  1846.    of those between the source and destination of the original packet.
  1847.  
  1848.  
  1849. 10. Acknowledgments
  1850.  
  1851.  
  1852.    This document is partially derived  from  several  discussions  about
  1853.    IPv6  tunneling  on  the  IPng  Working  Group  Mailing List and from
  1854.    feedback from the IPng Working Group to  an  IPv6  presentation  that
  1855.    focused  on  IPv6  tunneling  at the 33rd IETF, in Stockholm, in July
  1856.    1995.
  1857.  
  1858.    Additionally, the following documents that focused  on  tunneling  or
  1859.    encapsulation  were  helpful  references:  RFC  1933 (R. Gilligan, E.
  1860.    Nordmark), RFC 1241 (R. Woodburn, D. Mills), RFC 1326 (P.  Tsuchiya),
  1861.    RFC  1701, RFC 1702 (S. Hanks, D. Farinacci, P. Traina), RFC 1853 (W.
  1862.    Simpson), as well as RFC 2003 (C. Perkins).
  1863.  
  1864.    Brian Carpenter, Richard Draves,  Bob  Hinden,  Thomas  Narten,  Erik
  1865.    Nordmark (in alphabetical order) gave valuable reviewing comments and
  1866.    suggestions for the improvement of this document. Scott Bradner, Ross
  1867.    Callon,  Dimitry Haskin, Paul Traina, and James Watt (in alphabetical
  1868.    order) shared their view or experience on matters of concern in  this
  1869.    document.  Judith  Grossman  provided  a  sample of her many years of
  1870.    editorial and writing experience as well as a good amount of  probing
  1871.    technical questions.
  1872.  
  1873.  
  1874. 11. References
  1875.  
  1876.    [RFC-1883] S.  Deering,  R.  Hinden,  "Internet  Protocol  Version  6
  1877.    Specification"
  1878.  
  1879.  
  1880.    [RFC-1885]  A.  Conta,  and  S.  Deering  "Internet  Control  Message
  1881.    Protocol for the Internet Protocol Version 6 (IPv6)"
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887. Conta & Deering       Expires in six months        [Page 32]
  1888.  
  1889.  
  1890.  
  1891.  
  1892. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  1893.  
  1894.  
  1895.    [RFC-1970] T. Narten, E. Nordmark, W.Simpson "Neighbor Discovery  for
  1896.    IP Version 6 (IPv6)"
  1897.  
  1898.  
  1899.    [RFC-1981] J. McCann, S. Deering, J. Mogul "Path MTU Discovery for IP
  1900.    Version 6 (IPv6)"
  1901.  
  1902.  
  1903.    [RFC-1825] R.  Atkinson,  "Security  Architecture  for  the  Internet
  1904.    Protocol"
  1905.  
  1906.  
  1907.    [RFC-1826] R. Atkinson, "IP Authentication Header"
  1908.  
  1909.  
  1910.    [RFC-1827] R. Atkinson, "IP Encapsulation Security Payload (ESP)"
  1911.  
  1912.  
  1913.    [RFC-1853] W. Simpson, "IP in IP Tunneling"
  1914.  
  1915.  
  1916.    [RFC-1700] J. Reynolds, J. Postel, "Assigned Numbers", 10/20/1994
  1917.  
  1918.  
  1919. Authors' Addresses:
  1920.  
  1921.    Alex Conta                               Stephen Deering
  1922.    Lucent Technologies Inc.                 Cisco Systems
  1923.    1300 Massaschussets Ave                  170 West Tasman Dr
  1924.    Boxborough, MA 01719                     San Jose, CA 95132-1706
  1925.    +1-508-263-3600/ext 535                  +1-408-527-8213
  1926.  
  1927.    email: aconta@lucent.com                  email: deering@cisco.com
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946. Conta & Deering       Expires in six months        [Page 33]
  1947.  
  1948.  
  1949.  
  1950.  
  1951. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  1952.  
  1953.  
  1954. Appendix A
  1955.  
  1956.  
  1957. A.1   Risk Factors in Nested Encapsulation
  1958.  
  1959.  
  1960.    Nested encapsulations of a packet become a recursive encapsulation if
  1961.    the  packet  reenters  an  outer  tunnel before exiting it. The cases
  1962.    which present a high risk of recursive  encapsulation  are  those  in
  1963.    which  a  tunnel  entry-point  node cannot determine whether a packet
  1964.    that undergoes encapsulation reenters the tunnel before  exiting  it.
  1965.    Routing  loops  that  cause tunnel packets to reenter a tunnel before
  1966.    exiting it are certainly the major cause of the  problem.  But  since
  1967.    routing  loops  exist,  and happen, it is important to understand and
  1968.    describe, the cases in which the risk for recursive encapsulation  is
  1969.    higher.
  1970.  
  1971.    There are two significant elements that determine the risk factor  of
  1972.    routing loop recursive encapsulation:
  1973.  
  1974.  
  1975.         (a)  the type of tunnel,
  1976.  
  1977.         (b)  the  type  of  route  to  the  tunnel   exit-point,   which
  1978.              determines  the  packet forwarding through the tunnel, that
  1979.              is, over the tunnel virtual-link.
  1980.  
  1981.  
  1982. A.1.1  Risk Factor in Nested Encapsulation - type of tunnel.
  1983.  
  1984.  
  1985.    The type of tunnels which were identified as a high risk  factor  for
  1986.    recursive encapsulation in routing loops are:
  1987.  
  1988.               "inner tunnels with identical exit-points".
  1989.  
  1990.    These tunnels can be:
  1991.  
  1992.               "fixed-end inner tunnels with different entry-points",
  1993.  
  1994.    or:
  1995.  
  1996.               "free-end inner tunnels with different entry-points"
  1997.  
  1998.    Note that free-end inner tunnels fall always  into  the  category  of
  1999.    identical exit-point tunnels.
  2000.  
  2001.    Since the source and destination of an original packet  is  the  main
  2002.  
  2003.  
  2004.  
  2005. Conta & Deering       Expires in six months        [Page 34]
  2006.  
  2007.  
  2008.  
  2009.  
  2010. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  2011.  
  2012.  
  2013.    information  used  to  decide  whether  to forward a packet through a
  2014.    tunnel or not, a recursive encapsulation can be avoided in case of  a
  2015.    single  tunnel  (non-inner),  by  checking  that  the  packet  to  be
  2016.    encapsulated  is  not  originated  on  the  entry-point  node.   This
  2017.    mechanism is suggested in [RFC-1853].
  2018.  
  2019.    However, this type of protection does not seem to work well  in  case
  2020.    of  inner  tunnels  with  different entry-points, and identical exit-
  2021.    points.
  2022.  
  2023.    Inner tunnels with different entry-points and  identical  exit-points
  2024.    introduce ambiguity in deciding whether to encapsulate a packet, when
  2025.    a packet encapsulated in an inner tunnel reaches the entry-point node
  2026.    of  an outer tunnel by means of a routing loop. Because the source of
  2027.    the tunnel packet is the  inner  tunnel  entry-point  node  which  is
  2028.    different  than  the entry-point node of the outer tunnel, the source
  2029.    address  checking  (mentioned  above)  fails  to  detect  an  invalid
  2030.    encapsulation,   and   as   a  consequence  the  tunnel  packet  gets
  2031.    encapsulated at the outer tunnel each time it reaches it through  the
  2032.    routing loop.
  2033.  
  2034.  
  2035. A.1.2  Risk Factor in Nested Encapsulation - type of route.
  2036.  
  2037.  
  2038.    The type  of  route  to  a  tunnel  exit-point  node  has  been  also
  2039.    identified  as  a  high  risk  factor  of  recursive encapsulation in
  2040.    routing loops.
  2041.  
  2042.    One type of route to a  tunnel  exit-point  node  is  a  route  to  a
  2043.    specified  destination  node,  that  is,  the  destination is a valid
  2044.    specified IPv6 address (route to node). Such a route can be  selected
  2045.    based  on the longest match of an original packet destination address
  2046.    with the destination address stored in the  tunnel  entry-point  node
  2047.    routing  table  entry  for that route. The packet forwarded on such a
  2048.    route is first encapsulated and then  forwarded  towards  the  tunnel
  2049.    exit-point node.
  2050.  
  2051.    Another type of route to a tunnel exit-point node is  a  route  to  a
  2052.    specified  prefix-net,  that is, the destination is a valid specified
  2053.    IPv6 prefix (route to net). Such a route can be selected based on the
  2054.    longest path match of an original packet destination address with the
  2055.    prefix destination stored in  the  tunnel  entry-point  node  routing
  2056.    table  entry  for that route. The packet forwarded on such a route is
  2057.    first encapsulated and then forwarded towards the  tunnel  exit-point
  2058.    node.
  2059.  
  2060.    And finally another type of route to a tunnel exit-point is a default
  2061.  
  2062.  
  2063.  
  2064. Conta & Deering       Expires in six months        [Page 35]
  2065.  
  2066.  
  2067.  
  2068.  
  2069. INTERNET-DRAFT             Tunneling in IPv6           December 16, 1996
  2070.  
  2071.  
  2072.    route,  or  a  route  to  an  unspecified  destination. This route is
  2073.    selected when no-other match for  the  destination  of  the  original
  2074.    packet  has  been  found  in  the routing table. A tunnel that is the
  2075.    first hop of a default route is a "default tunnel".
  2076.  
  2077.    If the route to a tunnel exit-point is a  route  to  node,  the  risk
  2078.    factor for recursive encapsulation is minimum.
  2079.  
  2080.    If the route to a tunnel exit-point is  a  route  to  net,  the  risk
  2081.    factor  for  recursive  encapsulation  is medium. There is a range of
  2082.    destination addresses  that  will  match  the  prefix  the  route  is
  2083.    associated  with.  If one or more inner tunnels with different tunnel
  2084.    entry-points have exit-point node addresses that match the  route  to
  2085.    net of an outer tunnel exit-point, then a recursive encapsulation may
  2086.    occur if a tunnel packet gets diverted  from  inside  such  an  inner
  2087.    tunnel to the entry-point of the outer tunnel that has a route to its
  2088.    exit-point that matches the exit-point of an inner tunnel.
  2089.  
  2090.    If the route to a tunnel exit-point is  a  default  route,  the  risk
  2091.    factor  for recursive encapsulation is maximum. Packets are forwarded
  2092.    through a default  tunnel  for  lack  of  a  better  route.  In  many
  2093.    situations, forwarding through a default tunnel can happen for a wide
  2094.    range of destination addresses which at the  maximum  extent  is  the
  2095.    entire  Internet  minus the node's link. As consequence, it is likely
  2096.    that in a routing loop case, if a tunnel packet gets diverted from an
  2097.    inner  tunnel to an outer tunnel entry-point in which the tunnel is a
  2098.    default tunnel, the packet will be once  more  encapsulated,  because
  2099.    the   default   routing   mechanism  will  not  be  able  to  discern
  2100.    differently, based on the destination.
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123. Conta & Deering       Expires in six months        [Page 36]
  2124.  
  2125.