.TH ROUTED 8C "3 February 1983" .UC 4 .SH NAME routed \- network routing daemon .SH SYNOPSIS .B /etc/routed [ .B \-s ] [ .B \-q ] [ .B \-t ] [ .I logfile ] .SH DESCRIPTION .I Routed is invoked at boot time to manage the network routing tables. The routing daemon utilizes a variant of the Xerox NS Routing Information Protocol in maintaining up to date kernel routing table entries. .PP In normal operation .I routed listens on .IR udp (4P) socket 520 (decimal) 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 networks. .PP When .I routed is started, it uses the SIOCGIFCONF .I ioctl 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 the host will forward packets between networks. .I Routed then transmits a .I request packet on each interface (using a broadcast packet if the interface supports it) and enters a loop, listening for .I request and .I response packets from other hosts. .PP When a .I request packet is received, .I routed formulates a reply based on the information maintained in its internal tables. The .I response 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 .IR "relative to the sender" . .PP .I Response packets received by .I routed are used to update the routing tables if one of the following conditions is satisfied: .TP (1) No routing table entry exists for the destination network or host, and the metric indicates the destination is ``reachable'' (i.e. the hop count is not infinite). .TP (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 internetwork router through which packets for the destination are being routed. .TP (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. .TP (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. .PP When an update is applied, .I routed records the change in its internal tables and generates a .I response packet to all directly connected hosts and networks. .I Routed waits a short period of time (no more than 30 seconds) before modifying the kernel's routing tables to allow possible unstable situations to settle. .PP In addition to processing incoming packets, .I routed 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 internet. .PP Hosts acting as internetwork routers gratuitously supply their routing tables every 30 seconds to all directly connected hosts and networks. .PP Supplying the .B \-s option forces .I routed to supply routing information whether it is acting as an internetwork router or not. The .B \-q option is the opposite of the .B \-s option. If the .B \-t option is specified, all packets sent or received are printed on the standard output. In addition, .I routed will not divorce itself from the controlling terminal so that interrupts from the keyboard will kill the process. Any other argument supplied is interpreted as the name of file in which .IR routed 's actions should be logged. This log contains information about any changes to the routing tables and a history of recent messages sent and received which are related to the changed route. .PP In addition to the facilities described above, .I routed supports the notion of ``distant'' .I passive and .I active gateways. When .I routed is started up, it reads the file .I /etc/gateways to find gateways which may not be identified using the SIOGIFCONF .IR 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 .I routed 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 associated route is deleted. .PP The .I /etc/gateways is comprised of a series of lines, each in the following format: .PP .nf < \fBnet\fP | \fBhost\fP > \fIname1\fP \fBgateway\fP \fIname2\fP \fBmetric\fP \fIvalue\fP < \fBpassive\fP | \fBactive\fP > .fi .PP The .B net or .B host keyword indicates if the route is to a network or specific host. .PP .I Name1 is the name of the destination network or host. This may be a symbolic name located in .I /etc/networks or .IR /etc/hosts , or an Internet address specified in ``dot'' notation; see .IR inet (3N). .PP .I Name2 is the name or address of the gateway to which messages should be forwarded. .PP .I Value is a metric indicating the hop count to the destination host or network. .PP The keyword .B passive or .B active indicates if the gateway should be treated as .I passive or .I active (as described above). .SH FILES .DT /etc/gateways for distant gateways .SH "SEE ALSO" ``Internet Transport Protocols'', XSIS 028112, Xerox System Integration Standard. .br udp(4P) .SH BUGS The kernel's routing tables may not correspond to those of .I routed for short periods of time while processes utilizing existing routes exit; the only remedy for this is to place the routing process in the kernel. .PP .I Routed should listen to intelligent interfaces, such as an IMP, and to error protocols, such as ICMP, to gather more information. .PP Messages are not currently sent in network byte order making this protocol useful only for connecting VAX's.