network routing daemon
routed [-d] [-g] [-q] [-s] [-t] [logfile]
The routed daemon is invoked at boot time to manage the network routing tables. The daemon uses a variant of the Xerox NS Routing Information Protocol in maintaining up-to-date routing table entries. While it uses a generalized protocol that can be applied to multiple address types, routed is currently used only for Internet routing within a cluster of networks.
In most cases, routed listens on the UDP socket for the route service (see the services file) for routing information packets. If the host is an internetwork router, routed periodically supplies copies of its routing tables to any directly connected hosts and networks.
When started, routed uses the SIOCGIFCONF ioctl() to find those directly connected interfaces that are configured into the system and marked “up” (the software loopback interface is ignored). If multiple interfaces are present, it's assumed that the host will forward packets between networks. The routed daemon then transmits a request packet on each interface (using a broadcast packet if the interface supports it) and enters a loop, listening for request and response packets from other hosts.
When it receives a request packet, routed formulates a reply based on the information maintained in its internal tables. The 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 relative to the sender.
With the response packets that it receives, routed updates the routing tables if one of the following conditions is satisfied:
When an update is applied, routed records the change in its internal tables and updates the routing table. The change is reflected in the next response packet that's sent.
In addition to processing incoming packets, routed also periodically checks the routing table entries. If an entry hasn't 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 ensure that the invalidation of this entry is propagated throughout the local internet.
Hosts acting as internetwork routers supply their routing 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 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.
In addition to the facilities described above, routed supports the notion of “distant” passive and active gateways.
When started, routed reads the file /etc/gateways to find gateways that may not be located using only information from the SIOGIFCONF ioctl(). Gateways specified in this manner should be marked passive if they aren't 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 are installed in the routing tables once upon startup. Such routes aren't 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. Gateways marked external are also passive, but aren't placed in the routing table nor are they included in routing updates.
The function of external entries is to inform routed that another routing process will install such a route, and that alternate routes to that destination shouldn't be installed. Such entries are required only when both routers may learn of routes to the same destination.
The /etc/gateways file comprises a series of lines, each in the following format:
<net | host> name1 gateway name2 metric value <passive | active | external>
where:
Internetwork routers that are directly attached to the Arpanet or Milnet should use the Exterior Gateway Protocol (EGP) to gather routing information rather than use a static routing table of passive gateways. EGP is required to provide routes for local networks to the rest of the Internet system. Since gated supports EGP, you should it instead of routed.
The routing tables may not correspond to those of routed when redirects change or add routes. The routed daemon should note any redirects received by reading the ICMP packets received via a raw socket.
gated,
udp and icmp protocols
Internet Transport Protocols, XSIS 028112,
Xerox System Integration Standard.