home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / rfc / rfc2003 < prev    next >
Text File  |  1996-10-21  |  30KB  |  788 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                         C. Perkins
  8. Request for Comment: 2003                                            IBM
  9. Category: Standards Track                                   October 1996
  10.  
  11.  
  12.                        IP Encapsulation within IP
  13.  
  14. Status of This Memo
  15.  
  16.    This document specifies an Internet standards track protocol for the
  17.    Internet community, and requests discussion and suggestions for
  18.    improvements.  Please refer to the current edition of the "Internet
  19.    Official Protocol Standards" (STD 1) for the standardization state
  20.    and status of this protocol.  Distribution of this memo is unlimited.
  21.  
  22. Abstract
  23.  
  24.    This document specifies a method by which an IP datagram may be
  25.    encapsulated (carried as payload) within an IP datagram.
  26.    Encapsulation is suggested as a means to alter the normal IP routing
  27.    for datagrams, by delivering them to an intermediate destination that
  28.    would otherwise not be selected by the (network part of the) IP
  29.    Destination Address field in the original IP header.  Encapsulation
  30.    may serve a variety of purposes, such as delivery of a datagram to a
  31.    mobile node using Mobile IP.
  32.  
  33. 1. Introduction
  34.  
  35.    This document specifies a method by which an IP datagram may be
  36.    encapsulated (carried as payload) within an IP datagram.
  37.    Encapsulation is suggested as a means to alter the normal IP routing
  38.    for datagrams, by delivering them to an intermediate destination that
  39.    would otherwise not be selected based on the (network part of the) IP
  40.    Destination Address field in the original IP header.  Once the
  41.    encapsulated datagram arrives at this intermediate destination node,
  42.    it is decapsulated, yielding the original IP datagram, which is then
  43.    delivered to the destination indicated by the original Destination
  44.    Address field.  This use of encapsulation and decapsulation of a
  45.    datagram is frequently referred to as "tunneling" the datagram, and
  46.    the encapsulator and decapsulator are then considered to be the
  47.    "endpoints" of the tunnel.
  48.  
  49.    In the most general tunneling case we have
  50.  
  51.       source ---> encapsulator --------> decapsulator ---> destination
  52.  
  53.    with the source, encapsulator, decapsulator, and destination being
  54.    separate nodes.  The encapsulator node is considered the "entry
  55.  
  56.  
  57.  
  58. Perkins                     Standards Track                     [Page 1]
  59.  
  60. RFC 2003                      IP-within-IP                  October 1996
  61.  
  62.  
  63.    point" of the tunnel, and the decapsulator node is considered the
  64.    "exit point" of the tunnel.  There in general may be multiple
  65.    source-destination pairs using the same tunnel between the
  66.    encapsulator and decapsulator.
  67.  
  68. 2. Motivation
  69.  
  70.    The Mobile IP working group has specified the use of encapsulation as
  71.    a way to deliver datagrams from a mobile node's "home network" to an
  72.    agent that can deliver datagrams locally by conventional means to the
  73.    mobile node at its current location away from home [8].  The use of
  74.    encapsulation may also be desirable whenever the source (or an
  75.    intermediate router) of an IP datagram must influence the route by
  76.    which a datagram is to be delivered to its ultimate destination.
  77.    Other possible applications of encapsulation include multicasting,
  78.    preferential billing, choice of routes with selected security
  79.    attributes, and general policy routing.
  80.  
  81.    It is generally true that encapsulation and the IP loose source
  82.    routing option [10] can be used in similar ways to affect the routing
  83.    of a datagram, but there are several technical reasons to prefer
  84.    encapsulation:
  85.  
  86.     -  There are unsolved security problems associated with the use of
  87.        the IP source routing options.
  88.  
  89.     -  Current Internet routers exhibit performance problems when
  90.        forwarding datagrams that contain IP options, including the IP
  91.        source routing options.
  92.  
  93.     -  Many current Internet nodes process IP source routing options
  94.        incorrectly.
  95.  
  96.     -  Firewalls may exclude IP source-routed datagrams.
  97.  
  98.     -  Insertion of an IP source route option may complicate the
  99.        processing of authentication information by the source and/or
  100.        destination of a datagram, depending on how the authentication is
  101.        specified to be performed.
  102.  
  103.     -  It is considered impolite for intermediate routers to make
  104.        modifications to datagrams which they did not originate.
  105.  
  106.    These technical advantages must be weighed against the disadvantages
  107.    posed by the use of encapsulation:
  108.  
  109.     -  Encapsulated datagrams typically are larger than source routed
  110.        datagrams.
  111.  
  112.  
  113.  
  114. Perkins                     Standards Track                     [Page 2]
  115.  
  116. RFC 2003                      IP-within-IP                  October 1996
  117.  
  118.  
  119.     -  Encapsulation cannot be used unless it is known in advance that
  120.        the node at the tunnel exit point can decapsulate the datagram.
  121.  
  122.    Since the majority of Internet nodes today do not perform well when
  123.    IP loose source route options are used, the second technical
  124.    disadvantage of encapsulation is not as serious as it might seem at
  125.    first.
  126.  
  127. 3. IP in IP Encapsulation
  128.  
  129.    To encapsulate an IP datagram using IP in IP encapsulation, an outer
  130.    IP header [10] is inserted before the datagram's existing IP header,
  131.    as follows:
  132.  
  133.                                          +---------------------------+
  134.                                          |                           |
  135.                                          |      Outer IP Header      |
  136.                                          |                           |
  137.      +---------------------------+       +---------------------------+
  138.      |                           |       |                           |
  139.      |         IP Header         |       |         IP Header         |
  140.      |                           |       |                           |
  141.      +---------------------------+ ====> +---------------------------+
  142.      |                           |       |                           |
  143.      |                           |       |                           |
  144.      |         IP Payload        |       |         IP Payload        |
  145.      |                           |       |                           |
  146.      |                           |       |                           |
  147.      +---------------------------+       +---------------------------+
  148.  
  149.    The outer IP header Source Address and Destination Address identify
  150.    the "endpoints" of the tunnel.  The inner IP header Source Address
  151.    and Destination Addresses identify the original sender and recipient
  152.    of the datagram, respectively.  The inner IP header is not changed by
  153.    the encapsulator, except to decrement the TTL as noted below, and
  154.    remains unchanged during its delivery to the tunnel exit point.  No
  155.    change to IP options in the inner header occurs during delivery of
  156.    the encapsulated datagram through the tunnel.  If need be, other
  157.    protocol headers such as the IP Authentication header [1] may be
  158.    inserted between the outer IP header and the inner IP header.  Note
  159.    that the security options of the inner IP header MAY affect the
  160.    choice of security options for the encapsulating (outer) IP header.
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Perkins                     Standards Track                     [Page 3]
  171.  
  172. RFC 2003                      IP-within-IP                  October 1996
  173.  
  174.  
  175. 3.1. IP Header Fields and Handling
  176.  
  177.    The fields in the outer IP header are set by the encapsulator as
  178.    follows:
  179.  
  180.       Version
  181.  
  182.          4
  183.  
  184.       IHL
  185.  
  186.          The Internet Header Length (IHL) is the length of the outer IP
  187.          header measured in 32-bit words [10].
  188.  
  189.       TOS
  190.  
  191.          The Type of Service (TOS) is copied from the inner IP header.
  192.  
  193.       Total Length
  194.  
  195.          The Total Length measures the length of the entire encapsulated
  196.          IP datagram, including the outer IP header, the inner IP
  197.          header, and its payload.
  198.  
  199.       Identification, Flags, Fragment Offset
  200.  
  201.          These three fields are set as specified in [10].  However, if
  202.          the "Don't Fragment" bit is set in the inner IP header, it MUST
  203.          be set in the outer IP header; if the "Don't Fragment" bit is
  204.          not set in the inner IP header, it MAY be set in the outer IP
  205.          header, as described in Section 5.1.
  206.  
  207.       Time to Live
  208.  
  209.          The Time To Live (TTL) field in the outer IP header is set to a
  210.          value appropriate for delivery of the encapsulated datagram to
  211.          the tunnel exit point.
  212.  
  213.       Protocol
  214.  
  215.          4
  216.  
  217.       Header Checksum
  218.  
  219.          The Internet Header checksum [10] of the outer IP header.
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Perkins                     Standards Track                     [Page 4]
  227.  
  228. RFC 2003                      IP-within-IP                  October 1996
  229.  
  230.  
  231.       Source Address
  232.  
  233.          The IP address of the encapsulator, that is, the tunnel entry
  234.          point.
  235.  
  236.       Destination Address
  237.  
  238.          The IP address of the decapsulator, that is, the tunnel exit
  239.          point.
  240.  
  241.       Options
  242.  
  243.          Any options present in the inner IP header are in general NOT
  244.          copied to the outer IP header.  However, new options specific
  245.          to the tunnel path MAY be added.  In particular, any supported
  246.          types of security options of the inner IP header MAY affect the
  247.          choice of security options for the outer header.  It is not
  248.          expected that there be a one-to-one mapping of such options to
  249.          the options or security headers selected for the tunnel.
  250.  
  251.    When encapsulating a datagram, the TTL in the inner IP header is
  252.    decremented by one if the tunneling is being done as part of
  253.    forwarding the datagram; otherwise, the inner header TTL is not
  254.    changed during encapsulation.  If the resulting TTL in the inner IP
  255.    header is 0, the datagram is discarded and an ICMP Time Exceeded
  256.    message SHOULD be returned to the sender.  An encapsulator MUST NOT
  257.    encapsulate a datagram with TTL = 0.
  258.  
  259.    The TTL in the inner IP header is not changed when decapsulating.
  260.    If, after decapsulation, the inner datagram has TTL = 0, the
  261.    decapsulator MUST discard the datagram.  If, after decapsulation, the
  262.    decapsulator forwards the datagram to one of its network interfaces,
  263.    it will decrement the TTL as a result of doing normal IP forwarding.
  264.    See also Section 4.4.
  265.  
  266.    The encapsulator may use any existing IP mechanisms appropriate for
  267.    delivery of the encapsulated payload to the tunnel exit point.  In
  268.    particular, use of IP options is allowed, and use of fragmentation is
  269.    allowed unless the "Don't Fragment" bit is set in the inner IP
  270.    header.  This restriction on fragmentation is required so that nodes
  271.    employing Path MTU Discovery [7] can obtain the information they
  272.    seek.
  273.  
  274. 3.2. Routing Failures
  275.  
  276.    Routing loops within a tunnel are particularly dangerous when they
  277.    cause datagrams to arrive again at the encapsulator.  Suppose a
  278.    datagram arrives at a router for forwarding, and the router
  279.  
  280.  
  281.  
  282. Perkins                     Standards Track                     [Page 5]
  283.  
  284. RFC 2003                      IP-within-IP                  October 1996
  285.  
  286.  
  287.    determines that the datagram has to be encapsulated before further
  288.    delivery.  Then:
  289.  
  290.     -  If the IP Source Address of the datagram matches the router's own
  291.        IP address on any of its network interfaces, the router MUST NOT
  292.        tunnel the datagram; instead, the datagram SHOULD be discarded.
  293.  
  294.     -  If the IP Source Address of the datagram matches the IP address
  295.        of the tunnel destination (the tunnel exit point is typically
  296.        chosen by the router based on the Destination Address in the
  297.        datagram's IP header), the router MUST NOT tunnel the datagram;
  298.        instead, the datagram SHOULD be discarded.
  299.  
  300.    See also Section 4.4.
  301.  
  302. 4. ICMP Messages from within the Tunnel
  303.  
  304.    After an encapsulated datagram has been sent, the encapsulator may
  305.    receive an ICMP [9] message from any intermediate router within the
  306.    tunnel other than the tunnel exit point.  The action taken by the
  307.    encapsulator depends on the type of ICMP message received.  When the
  308.    received message contains enough information, the encapsulator MAY
  309.    use the incoming message to create a similar ICMP message, to be sent
  310.    to the originator of the original unencapsulated IP datagram (the
  311.    original sender).  This process will be referred to as "relaying" the
  312.    ICMP message from the tunnel.
  313.  
  314.    ICMP messages indicating an error in processing a datagram include a
  315.    copy of (a portion of) the datagram causing the error.  Relaying an
  316.    ICMP message requires that the encapsulator strip off the outer IP
  317.    header from this returned copy of the original datagram.  For cases
  318.    in which the received ICMP message does not contain enough data to
  319.    relay the message, see Section 5.
  320.  
  321. 4.1. Destination Unreachable (Type 3)
  322.  
  323.    ICMP Destination Unreachable messages are handled by the encapsulator
  324.    depending upon their Code field.  The model suggested here allows the
  325.    tunnel to "extend" a network to include non-local (e.g., mobile)
  326.    nodes.  Thus, if the original destination in the unencapsulated
  327.    datagram is on the same network as the encapsulator, certain
  328.    Destination Unreachable Code values may be modified to conform to the
  329.    suggested model.
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338. Perkins                     Standards Track                     [Page 6]
  339.  
  340. RFC 2003                      IP-within-IP                  October 1996
  341.  
  342.  
  343.       Network Unreachable (Code 0)
  344.  
  345.          An ICMP Destination Unreachable message SHOULD be returned
  346.          to the original sender.  If the original destination in
  347.          the unencapsulated datagram is on the same network as the
  348.          encapsulator, the newly generated Destination Unreachable
  349.          message sent by the encapsulator MAY have Code 1 (Host
  350.          Unreachable), since presumably the datagram arrived at the
  351.          correct network and the encapsulator is trying to create the
  352.          appearance that the original destination is local to that
  353.          network even if it is not.  Otherwise, if the encapsulator
  354.          returns a Destination Unreachable message, the Code field MUST
  355.          be set to 0 (Network Unreachable).
  356.  
  357.       Host Unreachable (Code 1)
  358.  
  359.          The encapsulator SHOULD relay Host Unreachable messages to the
  360.          sender of the original unencapsulated datagram, if possible.
  361.  
  362.       Protocol Unreachable (Code 2)
  363.  
  364.          When the encapsulator receives an ICMP Protocol Unreachable
  365.          message, it SHOULD send a Destination Unreachable message with
  366.          Code 0 or 1 (see the discussion for Code 0) to the sender of
  367.          the original unencapsulated datagram.  Since the original
  368.          sender did not use protocol 4 in sending the datagram, it would
  369.          be meaningless to return Code 2 to that sender.
  370.  
  371.       Port Unreachable (Code 3)
  372.  
  373.          This Code should never be received by the encapsulator, since
  374.          the outer IP header does not refer to any port number.  It MUST
  375.          NOT be relayed to the sender of the original unencapsulated
  376.          datagram.
  377.  
  378.       Datagram Too Big (Code 4)
  379.  
  380.          The encapsulator MUST relay ICMP Datagram Too Big messages to
  381.          the sender of the original unencapsulated datagram.
  382.  
  383.       Source Route Failed (Code 5)
  384.  
  385.          This Code SHOULD be handled by the encapsulator itself.
  386.          It MUST NOT be relayed to the sender of the original
  387.          unencapsulated datagram.
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Perkins                     Standards Track                     [Page 7]
  395.  
  396. RFC 2003                      IP-within-IP                  October 1996
  397.  
  398.  
  399. 4.2. Source Quench (Type 4)
  400.  
  401.    The encapsulator SHOULD NOT relay ICMP Source Quench messages to the
  402.    sender of the original unencapsulated datagram, but instead SHOULD
  403.    activate whatever congestion control mechanisms it implements to help
  404.    alleviate the congestion detected within the tunnel.
  405.  
  406. 4.3. Redirect (Type 5)
  407.  
  408.    The encapsulator MAY handle the ICMP Redirect messages itself.  It
  409.    MUST NOT not relay the Redirect to the sender of the original
  410.    unencapsulated datagram.
  411.  
  412. 4.4. Time Exceeded (Type 11)
  413.  
  414.    ICMP Time Exceeded messages report (presumed) routing loops within
  415.    the tunnel itself.  Reception of Time Exceeded messages by the
  416.    encapsulator MUST be reported to the sender of the original
  417.    unencapsulated datagram as Host Unreachable (Type 3, Code 1).  Host
  418.    Unreachable is preferable to Network Unreachable; since the datagram
  419.    was handled by the encapsulator, and the encapsulator is often
  420.    considered to be on the same network as the destination address in
  421.    the original unencapsulated datagram, then the datagram is considered
  422.    to have reached the correct network, but not the correct destination
  423.    node within that network.
  424.  
  425. 4.5. Parameter Problem (Type 12)
  426.  
  427.    If the Parameter Problem message points to a field copied from the
  428.    original unencapsulated datagram, the encapsulator MAY relay the ICMP
  429.    message to the sender of the original unencapsulated datagram;
  430.    otherwise, if the problem occurs with an IP option inserted by the
  431.    encapsulator, then the encapsulator MUST NOT relay the ICMP message
  432.    to the original sender.  Note that an encapsulator following
  433.    prevalent current practice will never insert any IP options into the
  434.    encapsulated datagram, except possibly for security reasons.
  435.  
  436. 4.6. Other ICMP Messages
  437.  
  438.    Other ICMP messages are not related to the encapsulation operations
  439.    described within this protocol specification, and should be acted on
  440.    by the encapsulator as specified in [9].
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450. Perkins                     Standards Track                     [Page 8]
  451.  
  452. RFC 2003                      IP-within-IP                  October 1996
  453.  
  454.  
  455. 5. Tunnel Management
  456.  
  457.    Unfortunately, ICMP only requires IP routers to return 8 octets (64
  458.    bits) of the datagram beyond the IP header.  This is not enough to
  459.    include a copy of the encapsulated (inner) IP header, so it is not
  460.    always possible for the encapsulator to relay the ICMP message from
  461.    the interior of a tunnel back to the original sender.  However, by
  462.    carefully maintaining "soft state" about tunnels into which it sends,
  463.    the encapsulator can return accurate ICMP messages to the original
  464.    sender in most cases.  The encapsulator SHOULD maintain at least the
  465.    following soft state information about each tunnel:
  466.  
  467.     - MTU of the tunnel (Section 5.1)
  468.     - TTL (path length) of the tunnel
  469.     - Reachability of the end of the tunnel
  470.  
  471.    The encapsulator uses the ICMP messages it receives from the interior
  472.    of a tunnel to update the soft state information for that tunnel.
  473.    ICMP errors that could be received from one of the routers along the
  474.    tunnel interior include:
  475.  
  476.     - Datagram Too Big
  477.     - Time Exceeded
  478.     - Destination Unreachable
  479.     - Source Quench
  480.  
  481.    When subsequent datagrams arrive that would transit the tunnel, the
  482.    encapsulator checks the soft state for the tunnel.  If the datagram
  483.    would violate the state of the tunnel (for example, the TTL of the
  484.    new datagram is less than the tunnel "soft state" TTL) the
  485.    encapsulator sends an ICMP error message back to the sender of the
  486.    original datagram, but also encapsulates the datagram and forwards it
  487.    into the tunnel.
  488.  
  489.    Using this technique, the ICMP error messages sent by the
  490.    encapsulator will not always match up one-to-one with errors
  491.    encountered within the tunnel, but they will accurately reflect the
  492.    state of the network.
  493.  
  494.    Tunnel soft state was originally developed for the IP Address
  495.    Encapsulation (IPAE) specification [4].
  496.  
  497. 5.1. Tunnel MTU Discovery
  498.  
  499.    When the Don't Fragment bit is set by the originator and copied into
  500.    the outer IP header, the proper MTU of the tunnel will be learned
  501.    from ICMP Datagram Too Big (Type 3, Code 4) messages reported to the
  502.    encapsulator.  To support sending nodes which use Path MTU Discovery,
  503.  
  504.  
  505.  
  506. Perkins                     Standards Track                     [Page 9]
  507.  
  508. RFC 2003                      IP-within-IP                  October 1996
  509.  
  510.  
  511.    all encapsulator implementations MUST support Path MTU Discovery [5,
  512.    7] soft state within their tunnels.  In this particular application,
  513.    there are several advantages:
  514.  
  515.     -  As a benefit of Path MTU Discovery within the tunnel, any
  516.        fragmentation which occurs because of the size of the
  517.        encapsulation header is performed only once after encapsulation.
  518.        This prevents multiple fragmentation of a single datagram, which
  519.        improves processing efficiency of the decapsulator and the
  520.        routers within the tunnel.
  521.  
  522.     -  If the source of the unencapsulated datagram is doing Path MTU
  523.        Discovery, then it is desirable for the encapsulator to know
  524.        the MTU of the tunnel.  Any ICMP Datagram Too Big messages from
  525.        within the tunnel are returned to the encapsulator, and as noted
  526.        in Section 5, it is not always possible for the encapsulator to
  527.        relay ICMP messages to the source of the original unencapsulated
  528.        datagram.  By maintaining "soft state" about the MTU of the
  529.        tunnel, the encapsulator can return correct ICMP Datagram Too Big
  530.        messages to the original sender of the unencapsulated datagram to
  531.        support its own Path MTU Discovery.  In this case, the MTU that
  532.        is conveyed to the original sender by the encapsulator SHOULD
  533.        be the MTU of the tunnel minus the size of the encapsulating
  534.        IP header.  This will avoid fragmentation of the original IP
  535.        datagram by the encapsulator.
  536.  
  537.     -  If the source of the original unencapsulated datagram is
  538.        not doing Path MTU Discovery, it is still desirable for the
  539.        encapsulator to know the MTU of the tunnel.  In particular, it is
  540.        much better to fragment the original datagram when encapsulating,
  541.        than to allow the encapsulated datagram to be fragmented.
  542.        Fragmenting the original datagram can be done by the encapsulator
  543.        without special buffer requirements and without the need to
  544.        keep reassembly state in the decapsulator.  By contrast, if
  545.        the encapsulated datagram is fragmented, then the decapsulator
  546.        must reassemble the fragmented (encapsulated) datagram before
  547.        decapsulating it, requiring reassembly state and buffer space
  548.        within the decapsulator.
  549.  
  550.    Thus, the encapsulator SHOULD normally do Path MTU Discovery,
  551.    requiring it to send all datagrams into the tunnel with the "Don't
  552.    Fragment" bit set in the outer IP header.  However there are problems
  553.    with this approach.  When the original sender sets the "Don't
  554.    Fragment" bit, the sender can react quickly to any returned ICMP
  555.    Datagram Too Big error message by retransmitting the original
  556.    datagram.  On the other hand, suppose that the encapsulator receives
  557.    an ICMP Datagram Too Big message from within the tunnel.  In that
  558.    case, if the original sender of the unencapsulated datagram had not
  559.  
  560.  
  561.  
  562. Perkins                     Standards Track                    [Page 10]
  563.  
  564. RFC 2003                      IP-within-IP                  October 1996
  565.  
  566.  
  567.    set the "Don't Fragment" bit, there is nothing sensible that the
  568.    encapsulator can do to let the original sender know of the error.
  569.    The encapsulator MAY keep a copy of the sent datagram whenever it
  570.    tries increasing the tunnel MTU, in order to allow it to fragment and
  571.    resend the datagram if it gets a Datagram Too Big response.
  572.    Alternatively the encapsulator MAY be configured for certain types of
  573.    datagrams not to set the "Don't Fragment" bit when the original
  574.    sender of the unencapsulated datagram has not set the "Don't
  575.    Fragment" bit.
  576.  
  577. 5.2. Congestion
  578.  
  579.    An encapsulator might receive indications of congestion from the
  580.    tunnel, for example, by receiving ICMP Source Quench messages from
  581.    nodes within the tunnel.  In addition, certain link layers and
  582.    various protocols not related to the Internet suite of protocols
  583.    might provide such indications in the form of a Congestion
  584.    Experienced [6] flag.  The encapsulator SHOULD reflect conditions of
  585.    congestion in its "soft state" for the tunnel, and when subsequently
  586.    forwarding datagrams into the tunnel, the encapsulator SHOULD use
  587.    appropriate means for controlling congestion [3]; However, the
  588.    encapsulator SHOULD NOT send ICMP Source Quench messages to the
  589.    original sender of the unencapsulated datagram.
  590.  
  591. 6. Security Considerations
  592.  
  593.    IP encapsulation potentially reduces the security of the Internet,
  594.    and care needs to be taken in the implementation and deployment of IP
  595.    encapsulation.  For example, IP encapsulation makes it difficult for
  596.    border routers to filter datagrams based on header fields.  In
  597.    particular, the original values of the Source Address, Destination
  598.    Address, and Protocol fields in the IP header, and the port numbers
  599.    used in any transport header within the datagram, are not located in
  600.    their normal positions within the datagram after encapsulation.
  601.    Since any IP datagram can be encapsulated and passed through a
  602.    tunnel, such filtering border routers need to carefully examine all
  603.    datagrams.
  604.  
  605. 6.1. Router Considerations
  606.  
  607.    Routers need to be aware of IP encapsulation protocols in order to
  608.    correctly filter incoming datagrams.  It is desirable that such
  609.    filtering be integrated with IP authentication [1].  Where IP
  610.    authentication is used, encapsulated packets might be allowed to
  611.    enter an organization when the encapsulating (outer) packet or the
  612.    encapsulated (inner) packet is sent by an authenticated, trusted
  613.    source.  Encapuslated packets containing no such authentication
  614.    represent a potentially large security risk.
  615.  
  616.  
  617.  
  618. Perkins                     Standards Track                    [Page 11]
  619.  
  620. RFC 2003                      IP-within-IP                  October 1996
  621.  
  622.  
  623.    IP datagrams which are encapsulated and encrypted [2] might also pose
  624.    a problem for filtering routers.  In this case, the router can filter
  625.    the datagram only if it shares the security association used for the
  626.    encryption.  To allow this sort of encryption in environments in
  627.    which all packets need to be filtered (or at least accounted for), a
  628.    mechanism must be in place for the receiving node to securely
  629.    communicate the security association to the border router.  This
  630.    might, more rarely, also apply to the security association used for
  631.    outgoing datagrams.
  632.  
  633. 6.2. Host Considerations
  634.  
  635.    Host implementations that are capable of receiving encapsulated IP
  636.    datagrams SHOULD admit only those datagrams fitting into one or more
  637.    of the following categories:
  638.  
  639.     -  The protocol is harmless:  source address-based authentication is
  640.        not needed.
  641.  
  642.     -  The encapsulating (outer) datagram comes from an authentically
  643.        identified, trusted source.  The authenticity of the source could
  644.        be established by relying on physical security in addition to
  645.        border router configuration, but is more likely to come from use
  646.        of the IP Authentication header [1].
  647.  
  648.     -  The encapuslated (inner) datagram includes an IP Authentication
  649.        header.
  650.  
  651.     -  The encapsulated (inner) datagram is addressed to a network
  652.        interface belonging to the decapsulator, or to a node with which
  653.        the decapsulator has entered into a special relationship for
  654.        delivering such encapsulated datagrams.
  655.  
  656.    Some or all of this checking could be done in border routers rather
  657.    than the receiving node, but it is better if border router checks are
  658.    used as backup, rather than being the only check.
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674. Perkins                     Standards Track                    [Page 12]
  675.  
  676. RFC 2003                      IP-within-IP                  October 1996
  677.  
  678.  
  679. 7. Acknowledgements
  680.  
  681.    Parts of Sections 3 and 5 of this document were taken from portions
  682.    (authored by Bill Simpson) of earlier versions of the Mobile IP
  683.    Internet Draft [8].  The original text for section 6 (Security
  684.    Considerations) was contributed by Bob Smart.  Good ideas have also
  685.    been included from RFC 1853 [11], also authored by Bill Simpson.
  686.    Thanks also to Anders Klemets for finding mistakes and suggesting
  687.    improvements to the draft.  Finally, thanks to David Johnson for
  688.    going over the draft with a fine-toothed comb, finding mistakes,
  689.    improving consistency, and making many other improvements to the
  690.    draft.
  691.  
  692. References
  693.  
  694.    [1] Atkinson, R., "IP Authentication Header", RFC 1826, August 1995.
  695.  
  696.    [2] Atkinson, R., "IP Encapsulating Security Payload", RFC 1827,
  697.        August 1995.
  698.  
  699.    [3] Baker, F., Editor, "Requirements for IP Version 4 Routers", RFC
  700.        1812, June 1995.
  701.  
  702.    [4] Gilligan, R., Nordmark, E., and B. Hinden, "IPAE: The SIPP
  703.        Interoperability and Transition Mechanism", Work in Progress.
  704.  
  705.    [5] Knowles, S., "IESG Advice from Experience with Path MTU
  706.        Discovery", RFC 1435, March 1993.
  707.  
  708.    [6] Mankin, A., and K. Ramakrishnan, "Gateway Congestion Control
  709.        Survey", RFC 1254, August 1991.
  710.  
  711.    [7] Mogul, J., and S. Deering, "Path MTU Discovery", RFC 1191,
  712.        November 1990.
  713.  
  714.    [8] Perkins, C., Editor, "IP Mobility Support", RFC 2002,
  715.        October 1996.
  716.  
  717.    [9] Postel, J., Editor, "Internet Control Message Protocol", STD 5,
  718.        RFC 792, September 1981.
  719.  
  720.    [10] Postel, J., Editor, "Internet Protocol", STD 5, RFC 791,
  721.         September 1981.
  722.  
  723.    [11] Simpson, W., "IP in IP Tunneling", RFC 1853, October 1995.
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. Perkins                     Standards Track                    [Page 13]
  731.  
  732. RFC 2003                      IP-within-IP                  October 1996
  733.  
  734.  
  735. Author's Address
  736.  
  737.    Questions about this memo can be directed to:
  738.  
  739.    Charles Perkins
  740.    Room H3-D34
  741.    T. J. Watson Research Center
  742.    IBM Corporation
  743.    30 Saw Mill River Rd.
  744.    Hawthorne, NY  10532
  745.  
  746.    Work:   +1-914-784-7350
  747.    Fax:    +1-914-784-6205
  748.    EMail: perk@watson.ibm.com
  749.  
  750.    The working group can be contacted via the current chair:
  751.  
  752.    Jim Solomon
  753.    Motorola, Inc.
  754.    1301 E. Algonquin Rd.
  755.    Schaumburg, IL  60196
  756.  
  757.    Work:   +1-847-576-2753
  758.    EMail: solomon@comm.mot.com
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786. Perkins                     Standards Track                    [Page 14]
  787.  
  788.