home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 1300s / rfc1393.txt < prev    next >
Text File  |  1993-01-06  |  13KB  |  395 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                          G. Malkin
  8. Request for Comments: 1393                                Xylogics, Inc.
  9.                                                             January 1993
  10.  
  11.  
  12.                      Traceroute Using an IP Option
  13.  
  14. Status of this Memo
  15.  
  16.    This memo defines an Experimental Protocol for the Internet
  17.    community.  Discussion and suggestions for improvement are requested.
  18.    Please refer to the current edition of the "IAB Official Protocol
  19.    Standards" for the standardization state and status of this protocol.
  20.    Distribution of this memo is unlimited.
  21.  
  22. Abstract
  23.  
  24.    Traceroute serves as a valuable network debugging tool.  The way in
  25.    which it is currently implemented has the advantage of being
  26.    automatically supported by all of the routers.  It's two problems are
  27.    the number of packets it generates and the amount of time it takes to
  28.    run.
  29.  
  30.    This document specifies a new IP option and ICMP message type which
  31.    duplicates the functionality of the existing traceroute method while
  32.    generating fewer packets and completing in a shorter time.
  33.  
  34. Table of Contents
  35.  
  36.    1.  Traceroute Today  . . . . . . . . . . . . . . . . . . . . . 2
  37.    2.  Traceroute Tomorrow . . . . . . . . . . . . . . . . . . . . 2
  38.    2.1 Basic Algorithm . . . . . . . . . . . . . . . . . . . . . . 2
  39.    2.2 IP Traceroute option format . . . . . . . . . . . . . . . . 3
  40.    2.3 ICMP Traceroute message format  . . . . . . . . . . . . . . 4
  41.    3.  Protocol  . . . . . . . . . . . . . . . . . . . . . . . . . 5
  42.    3.1 Hop Counts  . . . . . . . . . . . . . . . . . . . . . . . . 5
  43.    3.2 Destination Node Operation  . . . . . . . . . . . . . . . . 6
  44.    3.3 Router Operation  . . . . . . . . . . . . . . . . . . . . . 6
  45.    4.  References  . . . . . . . . . . . . . . . . . . . . . . . . 7
  46.    5.  Security Considerations . . . . . . . . . . . . . . . . . . 7
  47.    6.  Author's Address  . . . . . . . . . . . . . . . . . . . . . 7
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Malkin                                                          [Page 1]
  59.  
  60. RFC 1393                       Traceroute                   January 1993
  61.  
  62.  
  63. 1.  Traceroute Today
  64.  
  65.    The existing traceroute operates by sending out a packet with a Time
  66.    To Live (TTL) of 1.  The first hop then sends back an ICMP [1] error
  67.    message indicating that the packet could not be forwarded because the
  68.    TTL expired.  The packet is then resent with a TTL of 2, and the
  69.    second hop returns the TTL expired.  This process continues until the
  70.    destination is reached.  The purpose behind this is to record the
  71.    source of each ICMP TTL exceeded message to provide a trace of the
  72.    path the packet took to reach the destination.
  73.  
  74.    The advantage of this algorithm, is that every router already has the
  75.    ability to send TTL exceeded messages.  No special code is required.
  76.    The disadvantages are the number of packets generated (2n, where n is
  77.    the number of hops), the time it takes to duplicate all the nearer
  78.    hops with each successive packet, and the fact that the path may
  79.    change during this process.  Also, this algorithm does not trace the
  80.    return path, which may differ from the outbound path.
  81.  
  82. 2.  Traceroute Tomorrow
  83.  
  84.    The proposed traceroute would use a different algorithm to achieve
  85.    the same goal, namely, to trace the path to a host.  Because the new
  86.    traceroute uses an ICMP message designed for the purpose, additional
  87.    information, unavailable to the original traceroute user, can be made
  88.    available.
  89.  
  90. 2.1 Basic Algorithm
  91.  
  92.    A new IP Traceroute option will be defined.  The presence of this
  93.    option in an ICMP Echo (or any other) packet, hereinafter referred to
  94.    as the Outbound Packet, will cause a router to send the newly defined
  95.    ICMP Traceroute message to the originator of the Outbound Packet.  In
  96.    this way, the path of the Outbound Packet will be logged by the
  97.    originator with only n+1 (instead of 2n) packets.  This algorithm
  98.    does not suffer from a changing path and allows the response to the
  99.    Outbound Packet, hereinafter refered to as the Return Packet, to be
  100.    traced (provided the Outbound Packet's destination preserves the IP
  101.    Traceroute option in the Return Packet).
  102.  
  103.    The disadvantage of this method is that the traceroute function will
  104.    have to be put into the routers.  To counter this disadvantage,
  105.    however, is the fact that this mechanism may be easily ported to a
  106.    new IP version.
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Malkin                                                          [Page 2]
  115.  
  116. RFC 1393                       Traceroute                   January 1993
  117.  
  118.  
  119. 2.2 IP Traceroute option format
  120.  
  121.     0               8              16              24
  122.    +-+-+-+-+-+-+-+-+---------------+---------------+---------------+
  123.    |F| C |  Number |    Length     |          ID Number            |
  124.    +-+-+-+-+-+-+-+-+---------------+---------------+---------------+
  125.    |      Outbound Hop Count       |       Return Hop Count        |
  126.    +---------------+---------------+---------------+---------------+
  127.    |                     Originator IP Address                     |
  128.    +---------------+---------------+---------------+---------------+
  129.  
  130.    F (copy to fragments)
  131.  
  132.       0 (do not copy to fragments)
  133.  
  134.    C (class)
  135.  
  136.       2 (Debugging & Measurement)
  137.  
  138.    Number
  139.  
  140.       18 (F+C+Number = 82)
  141.  
  142.    ID Number
  143.  
  144.       An arbitrary number used by the originator of the Outbound Packet
  145.       to identify the ICMP Traceroute messages.  It is NOT related to
  146.       the ID number in the IP header.
  147.  
  148.    Originator IP Address
  149.  
  150.       The IP address of the originator of the Outbound Packet.  This is
  151.       needed so the routers know where to send the ICMP Traceroute
  152.       message for Return Packets.  It is also needed for Outbound
  153.       Packets which have a Source Route option.
  154.  
  155.    Outbound Hop Count (OHC)
  156.  
  157.       The number of routers through which the Outbound Packet has
  158.       passed.  This field is not incremented by the Outbound Packet's
  159.       destination.
  160.  
  161.    Return Hop Count (RHC)
  162.  
  163.       The number of routers through which the Return Packet has passed.
  164.       This field is not incremented by the Return Packet's destination.
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Malkin                                                          [Page 3]
  171.  
  172. RFC 1393                       Traceroute                   January 1993
  173.  
  174.  
  175. 2.3  ICMP Traceroute message format
  176.  
  177.     0               8              16              24
  178.    +---------------+---------------+---------------+---------------+
  179.    |     Type      |     Code      |           Checksum            |
  180.    +---------------+---------------+---------------+---------------+
  181.    |           ID Number           |            unused             |
  182.    +---------------+---------------+---------------+---------------+
  183.    |      Outbound Hop Count       |       Return Hop Count        |
  184.    +---------------+---------------+---------------+---------------+
  185.    |                       Output Link Speed                       |
  186.    +---------------+---------------+---------------+---------------+
  187.    |                        Output Link MTU                        |
  188.    +---------------+---------------+---------------+---------------+
  189.  
  190.    Type
  191.  
  192.       30
  193.  
  194.    Code
  195.  
  196.       0 - Outbound Packet successfully forwarded
  197.       1 - No route for Outbound Packet; packet discarded
  198.  
  199.    Checksum
  200.  
  201.       The 16 bit one's complement of the one's complement sum of all 16
  202.       bit words in the header.  For computing the checksum, the checksum
  203.       field should be zero.
  204.  
  205.    ID Number
  206.  
  207.       The ID Number as copied from the IP Traceroute option of the
  208.       packet which caused this Traceroute message to be sent.  This is
  209.       NOT related to the ID number in the IP header.
  210.  
  211.    Outbound Hop Count
  212.  
  213.       The Outbound Hop Count as copied from the IP Traceroute option of
  214.       the packet which caused this Traceroute message to be sent.
  215.  
  216.    Return Hop Count
  217.  
  218.       The Return Hop Count as copied from the IP Traceroute option of
  219.       the packet which caused this Traceroute message to be sent.
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Malkin                                                          [Page 4]
  227.  
  228. RFC 1393                       Traceroute                   January 1993
  229.  
  230.  
  231.    Output Link Speed
  232.  
  233.       The speed, in OCTETS per second, of the link over which the
  234.       Outbound/Return Packet will be sent.  Since it will not be long
  235.       before network speeds exceed 4.3Gb/s, and since some machines deal
  236.       poorly with fields longer than 32 bits, octets per second was
  237.       chosen over bits per second.  If this value cannot be determined,
  238.       the field should be set to zero.
  239.  
  240.    Output Link MTU
  241.  
  242.       The MTU, in bytes, of the link over which the Outbound/Return
  243.       Packet will be sent.  MTU refers to the data portion (includes IP
  244.       header; excludes datalink header/trailer) of the packet.  If this
  245.       value cannot be determined, the field should be set to zero.
  246.  
  247.  
  248. 3.  Protocol
  249.  
  250.    The Outbound Packet which is used to carry the IP Traceroute option
  251.    should use no special Type Of Service (TOS) or Precedence, unless the
  252.    purpose is to trace the path of packets with special TOS or
  253.    Precedence values.
  254.  
  255.    The TTL of the Outbound Packet should be set to the default value
  256.    specified in "Assigned Numbers" [2].
  257.  
  258. 3.1 Hop Counts
  259.  
  260.    The hop counts ultimately provide information on the length of the
  261.    outbound and return paths to the destination.  They also provide a
  262.    means of determining whether or not any ICMP Traceroute messages have
  263.    been lost.  For example, if a Traceroute message with an OHC of 4 is
  264.    followed by a message with an OHC of 6, then the the message with an
  265.    OHC of 5 was lost.  This is why simply counting Traceroute messages
  266.    is not sufficient for determining path length.
  267.  
  268.    The originator of the Outbound Packet should set the OHC to zero and
  269.    the RHC to 0xFFFF.  0xFFFF is a special value which indicates to
  270.    routers that the packet is an Outbound Packet rather than a Return
  271.    Packet (which begins with an RHC of zero).
  272.  
  273.    It is important to note that the Traceroute hop counts are NOT
  274.    related to the IP TTL.  A hop count should only be incremented when
  275.    an ICMP Traceroute message is sent.
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282. Malkin                                                          [Page 5]
  283.  
  284. RFC 1393                       Traceroute                   January 1993
  285.  
  286.  
  287. 3.2 Destination Node Operation
  288.  
  289.    When a node receives an Outbound Packet with an IP Traceroute option,
  290.    the Return Packet, if such is required (e.g., ICMP Echo
  291.    Request/Reply), should also carry that option.  The values in the ID
  292.    Number, OHC, and Originator Address fields should be copied into the
  293.    Return Packet.  The value of the RHC field should be set to zero.
  294.  
  295.    The destination should NOT increment any hop counts or send any ICMP
  296.    Traceroute messages.
  297.  
  298. 3.3 Router Operation
  299.  
  300.    When a router forwards a packet with an IP Traceroute option, it
  301.    should send an ICMP Traceroute message to the host in the Originator
  302.    IP Address field of the option.  If the value of the RHC field is
  303.    0xFFFF then the packet is an Outbound Packet and the OHC should be
  304.    incremented; otherwise, the RHC field should be incremented.  The
  305.    Traceroute message should reflect the incremented hop count.  The
  306.    Output Link Speed field should be set to the speed, in OCTETS per
  307.    second, of the link over which the Outbound/Return Packet will be
  308.    sent (e.g., 1,250,000 for an Ethernet) or zero if the output link
  309.    speed cannot be determined.  The Output Link MTU field should be set
  310.    to the MTU of the link over which the Outbound/Return Packet will be
  311.    sent or zero if the MTU cannot be determined.
  312.  
  313.    The Outbound/Return Packet should be forwarded as though the
  314.    Traceroute option did not exist; that is, it should take the same
  315.    path to the destination as an optionless packet.
  316.  
  317.    The ICMP Traceroute message should have the same TOS and Precedence
  318.    values as the Outbound/Return Packet.  The TTL should be set to the
  319.    default defined in "Assigned Numbers".
  320.  
  321.    The ICMP Traceroute message should not carry the IP Traceroute
  322.    option.
  323.  
  324.    If the Outbound Packet cannot be forwarded, the ICMP Traceroute
  325.    message should have a Code value of 1.  If the Return Packet cannot
  326.    be forwarded because there is no route, then there is no need to send
  327.    a Traceroute message since it could not be forwarded either.
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338. Malkin                                                          [Page 6]
  339.  
  340. RFC 1393                       Traceroute                   January 1993
  341.  
  342.  
  343. 4.  References
  344.  
  345.    [1] Postel, J., "Internet Control Message Protocol", STD 5, RFC 792,
  346.        USC/Information Sciences Institute, September 1981.
  347.  
  348.    [2] Reynolds, J., and J. Postel, "Assigned Numbers", STD 2, RFC 1340,
  349.        USC/Information Sciences Institute, July 1992.
  350.  
  351.  
  352. 5.  Security Considerations
  353.  
  354.    Security issues are not discussed in this memo.
  355.  
  356.  
  357. 6.  Author's Address
  358.  
  359.    Gary Scott Malkin
  360.    Xylogics, Inc.
  361.    53 Third Avenue
  362.    Burlington, MA 01803
  363.  
  364.    Phone:  (617) 272-8140
  365.    EMail:  gmalkin@Xylogics.COM
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Malkin                                                          [Page 7]
  395.