Re: IP source routing questions

15 Oct 1986 11:53-EDT


This has become a rather long message, but a brief answer to your
questions is that all of the routing takes place in the IP layer; as
far as TCP is concerned, nothing is different (except that TCP should
be notified that IP options were received); thus TCP has no difficulty
mapping the datagram to the proper connection. I do not think that I
have a different interpretation of the source routing option; I do
think that before the routing options can be specified so that they
provide maximum functionality one has to consider several factors
which are not usually mentioned.

1) One is that it is highly desirable for an ultimate destination
    IP entity that receives a source routed datagram to be able to
    construct a return source route. This requires that the IP
    addresses of the interfaces over which a datagram was sent,
    by the originating IP entity and each intermediate entity
    in the source route, be available to the ultimate destination.

2) Another is the "name" vs "address" problem and how it is handled
    in the DARPA Protocol Suite: the (TCP) pseudo-header. This means,
    for example, that the "name" which TCP chooses to use to identify
    the ends of a connection, and are "specified" in the pseudo-header,
    must be communicated from the source to the ultimate destination.
    This information is normally (and nobody has suggested changing it)
    carried in the IP "Source Address" and "Destination Address" fields
    (of the datagram delivered to the TCP in the ultimate destination).

3) The "catch-22" is that originating entity may be multi-homed.
    This means that the "address" (interface) which the IP routing
    algorithms use to send a (TCP) datagram may not be the same as
    the "address" (name) TCP selected (or was given by a higher
    level application) to identify the connection. Consequently the
    IP "Source Address" field cannot (always) be used for the sending
    interface address, it has to be communicated elsewhere -- in the
    source route option's Route Data area.

The critical point for obtaining the maximal functionality from source
routing is that there must be room in the source route option for the
originating IP entity (host or gateway) to insert the address it uses
to actually send the datagram; the IP Source Identifier (aka Address)
field cannot be used for this purpose due to its significance at
higher protocol levels.

Discussions of "what should be passed to IP", for example as the
"destination" and "source route", so that it can construct an IP
Source Route Option are essentially "local implementation" issues,
which may vary from operating system to operating system. (Although
portability of application software would suggest that all
implementations use the same method; but user interfaces are not
currently part of the IP/TCP specs.) What an IP datagram on a network
should look like is specified in the specs.

     host A gate B gate C host D
    +------+ +------+ +------+ +------+
    | | | | net 2 | | | |
    | A1|---------|B1 B2|----+----|C2 C3|---------|D3 |
    | A2 | net 1 | | | | | net 3 | D4 |
    +------+ +------+ | +------+ +------+
       | | |

4) Consider the above topology and a TCP connection between A and D
    which, for whatever reason, TCP has "named" by A2 and D3. A
    datagram from A to D on nets 2 and 3 would contain IP Source Address
    A2 and IP Destination Address D3; return datagrams would have IP
    Source Address D3 and IP Destination Address A2. Normal Internet
    routing would get datagrams to their destination.

5) Next consider the case where a source route is used to explicitly
    route the datagrams via C. (The contents of IP datagram on the
    nets is left as an exercise to the reader.)

6) Now consider the case where the source route specifies B(1) instead
    of C(2). Is it the case that the only difference between 5) and 6)
    is that C2 has been replaced by B1 and C3 by B2? It shouldn't be --
    there should be an A1 in case 6) but not in 5). From the above
    discussion, the TCP datagram from A to D on net 1 should contain

        IP Source Address A2
        IP Destination Address B1
        LSR Option Type 131
                    Length "11"
                    Pointer "8"
                    Route Data A1,->D3

    On nets 2 and 3 it would be

        IP Source Address A2
        IP Destination Address D3
        LSR Option Type 131
                    Length "11"
                    Pointer "12"
                    Route Data A1,B2,->

    When the Route Data is inverted to form a return route note that
    a final entry for the ultimate destination (A2) must be inserted.
    A datagram from D to A on nets 3 and 2 would have

        IP Source Address D3
        IP Destination Address B2
        LSR Option Type 131
                    Length "15"
                    Pointer "8"
                    Route Data D3,->A1,A2

    On net 1

        IP Source Address D3
        IP Destination Address A1
        LSR Option Type 131
                    Length "15"
                    Pointer "12"
                    Route Data D3,B1,->A2

    What should A do with this? (Consider what is should do if the
    "A2" were "Zn".) EVERY IP Entity (no distinction between gateways
    and hosts) processes routing options in the way specified in RFC 791,
    pg 19, first paragraphs:

    "If the address in the destination address field has been
     reached and the pointer is not greater than the length,
     the next address in the source route replaces the address
     in the destination address field, and the recorded route
     address replaces the source address just used, and the
     pointer is increased by four. The recorded route address
     is the internet module's own internat address as known in
     the environment into which this datagram is being forwarded."
    The "easy" part gets

        IP Source Address D3
        IP Destination Address A2
        LSR Option Type 131
                    Length "15"
                    Pointer "16"
                    Route Data D3,B1,?,->

    The question mark has to be filled in and the datagram sent to A2.
    What should appear where the question mark is shown is probably
    a "local implementation" decision; most operating systems have
    some capability to support TCP connections between processes
    within the host, even if there is no functioning network interface
    or even if no physical network connection exists. The os can do
    several things, the only requirements are that it be consistent,
    that any "applications" understand what it does, and that no
    "funnny addresses" end up being "interpreted" in the wrong context.

There is much more that could be discussed if there is sufficient
interest. Does anyone have a different solution to the "Source
Interface Address" problem. Is the additional robustness worth the


This archive was generated by hypermail 2.0b3 on Thu Mar 09 2000 - 14:36:58 GMT