Received: from SRI-NIC.ARPA (TCP 1200000063) by AI.AI.MIT.EDU 19 Sep 87 02:07:31 EDT
Received: from bel.isi.edu by SRI-NIC.ARPA with TCP; Fri 18 Sep 87 10:06:29-PDT
Date: Fri, 18 Sep 87 10:04:49 PDT
From: postel@ISI.EDU
Posted-Date: Fri, 18 Sep 87 10:04:49 PDT
Received: by bel.isi.edu (5.54/5.51)
    	id AA05653; Fri, 18 Sep 87 10:04:49 PDT

Network Working Group                                  J. Postel
Request for Comments: DRAFT                            J. Reynolds
                                                           XXXX 1987


                 Comments on the IP Source Route Option


Status of this Memo

   This RFC discusses a feature of the Internet Protocol (IP) used in
   the ARPA-Internet community, and requests discussion and suggestions
   for improvements of the description of this feature.  Distribution of
   this memo is unlimited.

   Introduction

   The purpose of this memo is to expand the discussion of the IP Source
   Route Option and to give some examples of its use.

Overview

   The IP Source Route option allows the originator (source host) of an
   IP datagram to specify a number of specific gateways the datagram
   must pass though in sequence before being delivered to the
   destination host.

The Source Route Concept

   The concept of the Source Route Option is to let the originator (or
   source) of the datagram specify a list of points (gateways) the
   datagram is to pass through on the way to its destination.

   This type of explicit routing is usually not necessary since the
   Internet gateways exchange routing information and route datagrams
   based only on the destination address (and possibly other factors
   such as type of service).

       One reason for using source routing might be to reach some part of
    the Internet via a path that the gateways somehow don't know about
    via their normal routing information exchange.  Another reason may be
    to explicitly use or avoid certain networks for performance, or
    administrative reasons (such as privacy, access policy, or billing).
    A reason for using source routing that has been exercised with good
    results already is testing.  Source routing allows sending datagrams
    that transit particular Internet paths testing either particular
    networks or particuar gateways (or both) from a remote monitoring
    host.



Postel & Reynolds                                               [Page 1]

RFC DRAFT                                                      XXXX 1987


   The source route is implemented by including an option in the IP
   header that lists additional addresses.  That is, a source routed
   datagram starts out with the address of the first stop on the route
   in the IP header destination address field, and the addresses of
   subsequent stops as elements in the option list.  At each stop, an
   address is taken from an element of the list in the option and placed
   in the destination address field and that element of the list is
   replaced by the address of that stop.

   There are three IP options:  Strict Source Route (SSR), Loose Source
   Route (LSR) and Record Route (RR).  Both SSR and LSR also record the
   route as well.  The difference between SSR and LSR is that in SSR the
   route must specify gateway separated by only one network, but in LSR
   the path between stops on the specified route maybe any length and
   determined by normal gateway routing.

   The information in a source route is a list of 32-bit IP addresses
   and a pointer that indicates which address in the list is to be used
   next.

The following example shows the working of the option in simplified
form.

   Example 1:

      Suppose that the source is host A, the destination is host E and
      the gateways to be explicitly passed through are B, C, and D.

      +-----+     +-----+     +-----+     +-----+     +-----+
      |     |     |     |     |     |     |     |     |     |
      |  A  |-----|  B  |-----|  C  |-----|  D  |-----|  E  |
      |     |     |     |     |     |     |     |     |     |
      +-----+     +-----+     +-----+     +-----+     +-----+

      When the datagram is sent from the source host (A) into the
      Internet the Source Address (SA), Destination Address (DA), Source
      Route List (SRL) and Source Route Pointer (SRP) the fields are:

               SA:  A
               DA:  B
               SRL: C,D,E
               SRP: 0

      After the datagram arrives at gateway B, the gateway notices the
      source route option and transposes the address from the
      destination field and the next element of the source route list
      and increments the source route pointer.  As the datagram leaves
      gateway B, the fields are:



Postel & Reynolds                                               [Page 2]

RFC DRAFT                                                      XXXX 1987


               SA:  A
               DA:  C
               SRL: B,D,E
               SRP: 1

      At gateway C, the processing is similar.  The datagram leaves
      gateway C with its fields appearing:

               SA:  A
               DA:  D
               SRL: B,C,E
               SRP: 2

      At gateway D, the processing is similar.  The datagram leaves
      gateway D with its fields appearing:

               SA:  A
               DA:  E
               SRL: B,C,D
               SRP: 3

      Finally, the datagram arrives at host E.  Even though the source
      route option is still present, host E knows it is the final
      destination because the source route pointer now indicates that
      the source route list is exhausted.

   Example 1 was simplified to present the general concept.  One detail
   that was omitted is that each gateway really has two (or more)
   addresses.  When the option is processed, the address that must be
   stored back into the option field is the address for going in the
   reverse direction.

   Example 2:

      Suppose that the source is host A, with address IA on net I.  The
      destination is host E, with address LE on net L.  The gateways to
      be explicitly passed through are B, C, and D.  Each gateway has
      two addresses, one on each directly connected network.

      +-----+       +-----+       +-----+       +-----+       +-----+
      |     |IA   IB|     |JB   JC|     |KC   KD|     |LD   LE|     |
      |  A  |-------|  B  |-------|  C  |-------|  D  |-------|  E  |
      |     | net I |     | net J |     | net K |     | net L |     |
      +-----+       +-----+       +-----+       +-----+       +-----+

      When the datagram is sent from the source host (A) into the
      Internet, the Source Address (SA), Destination Address (DA),
      Source Route List (SRL), and Source Route Pointer (SRP) the fields



Postel & Reynolds                                               [Page 3]

RFC DRAFT                                                      XXXX 1987


      are:

               SA:  IA
               DA:  IB
               SRL: JC,KD,LE
               SRP: 0

      After the datagram arrives at gateway B, the gateway notices the
      source route option and moves the address from the next element of
      the source route list to the destination field, places its own
      reverse direction address in the that element of the source route
      list, and increments the source route pointer.  As the datagram
      leaves gateway B, the fields are:

               SA:  IA
               DA:  JC
               SRL: JB,KD,LE
               SRP: 1

      At gateway C, the processing is similar.  The datagram leaves
      gateway C with its fields appearing:

               SA:  IA
               DA:  KD
               SRL: JB,KC,LE
               SRP: 2

      At gateway D, the processing is similar.  The datagram leaves
      gateway D with its fields appearing:

               SA:  IA
               DA:  LE
               SRL: JB,KC,LD
               SRP: 3

      Finally, the datagram arrives at host E.  Even though the source
      route option is still present, host E knows it is the final
      destination, because the source route pointer now indicates that
      the source route list is exhausted.












Postel & Reynolds                                               [Page 4]

RFC DRAFT                                                      XXXX 1987


An Explicit Detailed Example

   Recall the format of the IP header:

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |Version|  IHL  |Type of Service|          Total Length         |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |         Identification        |Flags|      Fragment Offset    |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |  Time to Live |    Protocol   |         Header Checksum       |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                       Source Address                          |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                    Destination Address                        |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                    Options                    |    Padding    |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The format of the the source route option is shown in the extract from
RFC-791 in Appendix A.





























Postel & Reynolds                                               [Page 5]

RFC DRAFT                                                      XXXX 1987


   Example 3:

      Suppose that the source is host ISI-ARK, with address 128.9.0.12
      on ISI-NET, the destination is host DMC-CRC, with address
      128.43.0.1 on DRENET and the gateways to be explicitly passed
      through are ISI-WB-GW, LL-GW, and CRC-GW.  Each gateway has two
      addresses, one on each directly connected network.

      +-----+
      |     | 128.9.0.12
      |ISI  |-------
      |  ARK|     /ISI-NET
      +-----+    /
                /
               /
              /     +-----+                                                                 /      |ISI  | 28.45.0.0
             -------|  WB |-------
         128.9.0.25 |   GW|     /WBNET
                    +-----+    /
                              /
                             /    +-----+
                            /     |     | 10.5.0.10
                           -------|LL-GW|-------
                        28.19.0.0 |     |     /ARPANET
                                  +-----+    /
                                            /
                                           /    +-----+
                                          /     |     | 128.43.1.1
                                         -------|CRC  |-------
                                      10.1.0.15 |   GW|     /DRENET
                                                +-----+    /
                                                          /
                                                         /    +-----+
                                                        /     |     |
                                                       -------|DMC  |
                                                   128.43.0.1 |  CRC|
                                                              +-----+

      When the datagram is sent from the source host (ISI-ARK) into the
      Internet the Source Address (SA), Destination Address (DA), Source
      Route List (SRL), and Source Route Pointer (SRP) the fields are:

               SA:  128.9.0.12
               DA:  128.9.0.25
               SRL: 28.19.0.0, 10.1.0.15, 128.43.0.1
               SRP: 0





Postel & Reynolds                                               [Page 6]

RFC DRAFT                                                      XXXX 1987


    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Version|  IHL  |Type of Service|          Total Length         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Identification        |Flags|      Fragment Offset    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Time to Live |    Protocol   |         Header Checksum       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       128     |       9       |       0       |      12       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       128     |       9       |       0       |      25       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       137     |      15       |       4       |      28       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        19     |       0       |       0       |      10       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         1     |       0       |      15       |     128       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        43     |       0       |       1       |    Padding    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      After the datagram arrives at gateway ISI-WB-GW, the gateway,
      notices the source route option and moves the address from the
      next element of the source route list to the destination field,
      places its own reverse direction address in the that element of
      the source route list, and increments the source route pointer.
      As the datagram leaves gateway ISI-WB-GW, the fields are:

               SA:  128.9.0.12
               DA:  28.19.0.0
               SRL: 28.45.0.0, 10.1.0.15, 128.43.0.1
               SRP: 1


















Postel & Reynolds                                               [Page 7]

RFC DRAFT                                                      XXXX 1987


    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Version|  IHL  |Type of Service|          Total Length         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Identification        |Flags|      Fragment Offset    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Time to Live |    Protocol   |         Header Checksum       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       128     |       9       |       0       |      12       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        28     |      19       |       0       |       0       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       137     |      15       |       8       |      28       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        45     |       0       |       0       |      10       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         1     |       0       |      15       |     128       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        43     |       0       |       1       |    Padding    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+






























Postel & Reynolds                                               [Page 8]

RFC DRAFT                                                      XXXX 1987


      At gateway LL-GW, the processing is similar.  The datagram leaves
      gateway LL-GW with its fields appearing:

               SA:  128.9.0.12
               DA:  10.1.0.15,
               SRL: 28.45.0.0, 10.5.0.10, 128.43.0.1
               SRP: 2

    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Version|  IHL  |Type of Service|          Total Length         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Identification        |Flags|      Fragment Offset    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Time to Live |    Protocol   |         Header Checksum       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       128     |       9       |       0       |      12       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        10     |       1       |       0       |      15       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       137     |      15       |      12       |      28       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        45     |       0       |       0       |      10       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         5     |       0       |      10       |     128       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        43     |       0       |       1       |    Padding    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      At gateway CRC-GW, the processing is similar.  The datagram leaves
      gateway CRC-GW with its fields appearing:

               SA:  128.9.0.12
               DA:  128.43.0.1
               SRL: 28.45.0.0, 10.5.0.10, 128.43.1.1
               SRP: 3














Postel & Reynolds                                               [Page 9]

RFC DRAFT                                                      XXXX 1987


    0                   1                   2                   3
    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Version|  IHL  |Type of Service|          Total Length         |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Identification        |Flags|      Fragment Offset    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Time to Live |    Protocol   |         Header Checksum       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       128     |       9       |       0       |      12       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       128     |      43       |       0       |       1       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |       137     |      15       |      16       |      28       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        45     |       0       |       0       |      10       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         5     |       0       |      10       |     128       |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |        43     |       1       |       1       |    Padding    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Finally, the datagram arrives at host DMC-CRC.  Even though the
      source route option is still present, host DMC-CRC knows it is the
      final destination because the source route pointer now indicates
      that the source route list is exhausted.

























Postel & Reynolds                                              [Page 10]

RFC DRAFT                                                      XXXX 1987


Summary *****-----> [words here]

References

   [1]   Postel, J. (ed.), "Internet Protocol - DARPA Internet Program
