4.3BSD-UWisc/man/cat8/routed.8c




ROUTED(8C)          UNIX Programmer's Manual           ROUTED(8C)



NAME
     routed - network routing daemon

SYNOPSIS
     /etc/routed [ -d ] [ -g ] [ -s ] [ -q ] [ -t ] [ _l_o_g_f_i_l_e ]

DESCRIPTION
     _R_o_u_t_e_d is invoked at boot time to manage the network routing
     tables.  The routing daemon uses a variant of the Xerox NS
     Routing Information Protocol in maintaining up to date ker-
     nel routing table entries.  It used a generalized protocol
     capable of use with multiple address types, but is currently
     used only for Internet routing within a cluster of networks.

     In normal operation _r_o_u_t_e_d listens on the _u_d_p(4P) socket for
     the _r_o_u_t_e service (see _s_e_r_v_i_c_e_s(5)) for routing information
     packets.  If the host is an internetwork router, it periodi-
     cally supplies copies of its routing tables to any directly
     connected hosts and networks.

     When _r_o_u_t_e_d is started, it uses the SIOCGIFCONF _i_o_c_t_l to
     find those directly connected interfaces configured into the
     system and marked ``up'' (the software loopback interface is
     ignored).  If multiple interfaces are present, it is assumed
     that the host will forward packets between networks.  _R_o_u_t_e_d
     then transmits a _r_e_q_u_e_s_t packet on each interface (using a
     broadcast packet if the interface supports it) and enters a
     loop, listening for _r_e_q_u_e_s_t and _r_e_s_p_o_n_s_e packets from other
     hosts.

     When a _r_e_q_u_e_s_t packet is received, _r_o_u_t_e_d formulates a reply
     based on the information maintained in its internal tables.
     The _r_e_s_p_o_n_s_e packet generated 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 _r_e_l_a_-
     _t_i_v_e _t_o _t_h_e _s_e_n_d_e_r.

     _R_e_s_p_o_n_s_e packets received by _r_o_u_t_e_d are used to update the
     routing tables if one of the following conditions is satis-
     fied:

     (1)  No routing table entry exists for the destination net-
          work or host, and the metric indicates the destination
          is ``reachable'' (i.e. the hop count is not infinite).

     (2)  The source host of the packet is the same as the router
          in the existing routing table entry.  That is, updated
          information is being received from the very internet-
          work router through which packets for the destination
          are being routed.




Printed 12/27/86          May 24, 1986                          1






ROUTED(8C)          UNIX Programmer's Manual           ROUTED(8C)



     (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 destina-
          tion 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, _r_o_u_t_e_d records the change in its
     internal tables and updates the kernel routing table.  The
     change is reflected in the next _r_e_s_p_o_n_s_e packet sent.

     In addition to processing incoming packets, _r_o_u_t_e_d also
     periodically checks the routing table entries.  If an entry
     has not been updated for 3 minutes, the entry's metric is
     set to infinity and marked for deletion.  Deletions are
     delayed an additional 60 seconds to insure the invalidation
     is propagated throughout the local internet.

     Hosts acting as internetwork routers gratuitously supply
     their routing tables every 30 seconds to all directly con-
     nected 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 interface 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 is available.

     _R_o_u_t_e_d _s_u_p_p_o_r_t_s _s_e_v_e_r_a_l _o_p_t_i_o_n_s:

     -d   Enable additional debugging information to be logged,
          such as bad packets received.

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

     -s   Supplying this option forces _r_o_u_t_e_d 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.



Printed 12/27/86          May 24, 1986                          2






ROUTED(8C)          UNIX Programmer's Manual           ROUTED(8C)



     -t   If the -t option is specified, all packets sent or
          received are printed on the standard output.  In addi-
          tion, _r_o_u_t_e_d will not divorce itself from the control-
          ling terminal so that interrupts from the keyboard will
          kill the process.

     Any other argument supplied is interpreted as the name of
     file in which _r_o_u_t_e_d'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 mes-
     sages sent and received which are related to the changed
     route.

     In addition to the facilities described above, _r_o_u_t_e_d sup-
     ports the notion of ``distant'' _p_a_s_s_i_v_e and _a_c_t_i_v_e gateways.
     When _r_o_u_t_e_d is started up, it reads the file /_e_t_c/_g_a_t_e_w_a_y_s
     to find gateways which may not be located using only infor-
     mation from the SIOGIFCONF _i_o_c_t_l.  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 informa-
     tion (i.e.  they should have a _r_o_u_t_e_d process running on the
     machine).  Passive gateways are maintained in the routing
     tables forever and information regarding their existence is
     included in any routing information transmitted.  Active
     gateways are treated equally to network interfaces.  Routing
     information is distributed to the gateway and if no routing
     information is received for a period of the time, the asso-
     ciated route is deleted.  External gateways are also pas-
     sive, but are not placed in the kernel routing table nor are
     they included in routing updates.  The function of external
     entries is to inform _r_o_u_t_e_d that another routing process
     will install such a route, and that alternate routes to that
     destination should not be installed.  Such entries are only
     required when both routers may learn of routes to the same
     destination.

     The /_e_t_c/_g_a_t_e_w_a_y_s is comprised of a series of lines, each in
     the following format:

     < net | host > _n_a_m_e_1 gateway _n_a_m_e_2 metric _v_a_l_u_e < passive | active | external >

     The net or host keyword indicates if the route is to a net-
     work or specific host.

     _N_a_m_e_1 is the name of the destination network or host.  This
     may be a symbolic name located in /_e_t_c/_n_e_t_w_o_r_k_s or
     /_e_t_c/_h_o_s_t_s (or, if started after _n_a_m_e_d(8), known to the name
     server), or an Internet address specified in ``dot'' nota-
     tion; see _i_n_e_t(3N).





Printed 12/27/86          May 24, 1986                          3






ROUTED(8C)          UNIX Programmer's Manual           ROUTED(8C)



     _N_a_m_e_2 is the name or address of the gateway to which mes-
     sages should be forwarded.

     _V_a_l_u_e is a metric indicating the hop count to the destina-
     tion host or network.

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

     Internetwork routers that are directly attached to the
     Arpanet or Milnet should use the Exterior Gateway Protocol
     (EGP) to gather routing information 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.  Sites needing assistance with such
     configurations should contact the Computer Systems Research
     Group at Berkeley.

FILES
     /etc/gateways  for distant gateways

SEE ALSO
     ``Internet Transport Protocols'', XSIS 028112, Xerox System
     Integration Standard.
     udp(4P), XNSrouted(8C), htable(8)

BUGS
     The kernel's routing tables may not correspond to those of
     _r_o_u_t_e_d when redirects change or add routes.  The only remedy
     for this is to place the routing process in the kernel.

     _R_o_u_t_e_d should incorporate other routing protocols, such as
     Xerox NS (_X_N_S_r_o_u_t_e_d(8C)) and EGP.  Using separate processes
     for each requires configuration options to avoid redundant
     or competing routes.

     _R_o_u_t_e_d should listen to intelligent interfaces, such as an
     IMP, and to error protocols, such as ICMP, to gather more
     information.  It does not always detect unidirectional
     failures in network interfaces (e.g., when the output side
     fails).












Printed 12/27/86          May 24, 1986                          4