Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ routed(ADMN) — TCP/IP 1.2.0.i

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctl(S)

inet(ADMP)

udp(ADMP)


 routed(ADMN)                    19 June 1992                    routed(ADMN)


 Name

    routed - network routing daemon

 Syntax

    /etc/routed[-d][-g][-q][-s][-t][logfile]

 Description

    The routed daemon is invoked by the super-user at boot time to manage the
    Internet Routing Tables (usually during init 2).  The routed daemon uses
    a variant of the Xerox NS Routing Information Protocol to maintain up-
    to-date kernel Routing Table entries.

    In normal operation, routed listens on the udp(ADMP) socket 520 (decimal)
    to provide the route service (see services(SFF)) for routing information
    packets. If the host is an internetwork router, it periodically supplies
    copies of its Routing Tables to any directly connected hosts and net-
    works.

    When routed is started, it uses the SIOCGIFCONF ioctl(S) to find those
    directly connected interfaces configured into the system and ``marked
    up'' (the software loopback interface will be ignored). If multiple
    interfaces are present, it is assumed that the host will forward packets
    between networks.  Then routed transmits a REQUEST packet on each inter-
    face (using a broadcast packet if the interface supports it) and enters a
    loop, listening for REQUEST and RESPONSE packets from other hosts.

    _________________________________________________________________________
       NOTE  No REQUEST or RESPONSE packets are sent to ignored interfaces
       [see if.ignore(SFF)].
    _________________________________________________________________________

    When a REQUEST packet is received, routed formulates a reply based on the
    information maintained in its internal tables. The generated RESPONSE
    packet contains a list of known routes, each marked with a ``hop count''
    metric (a count of 16, or greater, is considered ``infinite''). The
    metric associated with each route returned provides a metric "relative to
    the sender".

    Any RESPONSE packets received by routed are used to update the Routing
    Tables if one of the following conditions is satisfied:

    1.  No Routing Table entry exists for the destination network or host,
        and the metric indicates the destination is``reachable'' (that is,
        the hop count is not infinite).

    2.  The source host of the packet is the same as the router in the exist-
        ing Routing Table entry; that is, updated information is being
        received from the very internetwork router through which packets for
        the destination are being routed.

    3.  The existing entry in the Routing Table has not been updated for some
        time (defined to be 90 seconds) and the route is at least as cost-
        effective as the current route.

    4.  The new route describes a shorter route to the destination than the
        one currently stored in the Routing Tables; the metric of the new
        route is compared against the one stored in the table to decide this.

    When an update is applied, routed records the change in its internal
    tables and updates the kernel Routing Table and generates a RESPONSE
    packet reflecting these changes to all directly connected hosts and net-
    works.  The routed daemon will wait a short period of time (no more than
    30 seconds) before updating the kernel's Routing Tables to allow any pos-
    sible unstable situations to settle.

    In addition to processing incoming packets, routed also checks the Rout-
    ing Table entries periodically. If an entry has not been updated for 3
    minutes, this entry's metric is set to infinity and marked for deletion.
    Deletions are delayed for an additional 60 seconds to insure the invali-
    dation is propagated throughout the local internet.

    Any hosts acting as internetwork routers gratuitously supply their rout-
    ing tables every 30 seconds to all directly connected hosts and networks.
    The response is sent to the broadcast address on nets capable of that
    function, to the destination address on point-to-point links, and to the
    router's own address on other networks.  The normal Routing Tables are
    bypassed when sending gratuitous responses.  The reception of responses
    on each network is used to determine that the network and interfaces are
    functioning correctly.  If no response is received on an interface,
    another route may be chosen to route around the interface, or the route
    may be dropped if no alternative route is available.

 Options


    -d   This option will stop routed going into background, and releasing
         itself from the controlling terminal, so that interrupts from the
         keyboard will kill the process.

    -g   This flag is used on internetwork routers to offer a route to the
         ``default'' destination.  Typically, this is used on a gateway to
         the Internet, or on a gateway that uses another routing protocol
         whose routes are not reported to other local routers.

    -s   Supplying this option forces routed to supply routing information
         whether it is acting as an internetwork router or not.  This is the
         default if multiple network interfaces are present, or if a point-
         to-point link is in use.

    -q   This is the opposite of the -s option.

    -t   The -t option increments the tracing level,  successive levels are:

         routed -t               trace actions only

         routed -t -t            trace actions and packets

         routed -t -t -t      trace actions and history of packets and
                                  contents after change.

         routed -t -t -t -t              trace actions, packets and contents.

         This tracing level may also be incremented by sending a SIGUSR1 sig-
         nal to the routed process.  SIGUSR2 sets the tracing level to zero
         (off).  All tracing is sent to standard output unless routed has
         divorced itself from a controlling terminal, or a logfile has been
         specified.

    Any other argument supplied is interpreted as the name of a file in which
    routed's actions should be logged. This log contains information about
    any changes to the Routing Tables and - if not tracing all packets - a
    history of recent messages sent and received which are related to the
    changed route.

    In addition to the facilities described above, routed supports the notion
    of``distant'' passive and active gateways. When routed is started up, it
    reads the file /etc/gateways to find gateways which may not be located
    using only information from the SIOCGIFCONF ioctl.  Gateways specified in
    this manner should be marked passive if they are not expected to exchange
    routing information, while gateways marked active should be willing to
    exchange routing information (i.e., they should have a routed process
    running on the machine).  Routes through passive gateways will be
    installed in the kernel's routing tables once upon startup. Such routes
    are not included in any routing information transmitted.  The active
    gateways will be treated the same as network interfaces. Routing informa-
    tion will be distributed to the gateway; if no routing information is
    received for a period of time, the associated route will be deleted.
    External gateways are also passive, but will not be placed into the ker-
    nel Routing Table nor will they be included in the routing updates.  The
    function of these external entries is to inform routed that another rout-
    ing process will install such a route and that alternate routes to that
    destination should not be installed.  Such entries are required only when
    both routers may learn of routes to the same destination.

    The /etc/gateways table consists of a series of lines, each of the fol-
    lowing format:
       <net|host> name1 gateway name2 metric value<passive|active|external>
    where

    net host  indicates if the route is to a network or to a specific host.

    name1     the name of the destination network or host. This may be a sym-
              bolic name located in /etc/networks or /etc/hosts (or, if
              routed is started after named(ADMN), then name1 is known by the
              name server), or an Internet address specified in ``dot nota-
              tion'' (see hosts(SFF) and inet(ADMP)).

    name2     the name or address of the gateway to which messages should be
              forwarded.

    value     a metric indicating the hop count to the destination host or
              network.

    passive, active, or external
              One of these keywords indicates if the gateway should be
              treated as passive or active (as described above), or whether
              the gateway is external to the scope of the routed protocol.

    Internetwork routers that are directly attached to the Arpanet or Milnet
    should use the Exterior Gateway Protocol (EGP) to gather routing informa-
    tion rather then using a static routing table of passive gateways.  EGP
    is required in order to provide routes for local networks to the rest of
    the Internet system.  In this case, gated(ADMN) should be used instead.

 Files

    /etc/gateways           for distant gateways
    /etc/networks
    /etc/hosts
    /etc/if.ignore

 User considerations

    The kernel's Routing Tables may not correspond to those of routed for
    short time intervals while processes utilizing the existing routes exit;
    the only remedy for these temporary discrepancies would be to place the
    routing process into the kernel.

    In addition, routed should listen to any "intelligent interfaces" (such
    as an IMP) and to error protocols (such as ICMP).  For example, routed
    should listen for any "redirects" included with ICMP packets received via
    a raw socket where these ICMP "redirects" will cause changed or added
    routes.

 See also

    ioctl(S), inet(ADMP), udp(ADMP), RFC 1058


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026