ROUTED(8c,C) AIX TCP/IP User's Guide ROUTED(8c,C) ------------------------------------------------------------------------------- routed PURPOSE Manages network routing tables. SYNTAX +--------+ | | +--------+ |-- -t --| /etc/routed ---| one of |--| |---| | +----+ | |-- -g --| +-| -s |-+ | | | -q | +-- -d --+ +----+ DESCRIPTION The routed command is invoked at boot time to manage the network routing tables. This routing daemon uses a variant of the Xerox NS Routing Information Protocol (RIP) to maintain current kernel routing table entries.( ) It uses 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 routed listens on the UDP socket for the route service (see "rc.tcpip, rc.tcpip.local") 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. When routed is started, it uses the SIOCGIFCONF ioctl to find those directly connected interfaces defined in the system configuration and marked up (the software loopback interface is ignored). If multiple interfaces are present, it is assumed that the host forwards packets between networks. The routed command 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 a request packet is received, the routed command 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 --------------- ( ) Defined in Internet Transport Protocols, XSIS 028112, Xerox System Integration Standard. Processed October 29, 1990 ROUTED(8c,C) 1 ROUTED(8c,C) AIX TCP/IP User's Guide ROUTED(8c,C) (a count of 16, or greater, is considered infinite). The metric associated with each route returned provides a metric relative to the sender. Response packets received by the routed command 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 (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 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. When an update is applied, the routed command records the change in its internal tables and updates the kernel routing table. The change is reflected in the next response packet sent. In addition to processing incoming packets, the routed command 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 automatically 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 normal routing tables are bypassed when sending automatic 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. 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 SIOGIFCONF 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 (such as, they should have a 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 Processed October 29, 1990 ROUTED(8c,C) 2 ROUTED(8c,C) AIX TCP/IP User's Guide ROUTED(8c,C) transmitted. Active gateways are treated the same as 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. External gateways are also passive, but are not placed in the kernel 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 should not be installed. Such entries are only required when both routers may learn of routes to the same destination. Internetwork routers that are directly attached to the ARPANET should use the External Gateway Protocol (EGP) to gather routing information rather than using a stationary routing table of passive gateways. EGP is required in order to provide routes for local networks to the rest of the Internet system. FLAGS The routed command options are: -d Enables additional debugging information to be logged, such as bad packets received. -g Offers a route to the default destination. This is typically 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 Forces the routed command 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 Never supplies routing information (opposite to the -s option). -t Prints all packets sent or received on the standard output. In addition, the routed command does not separate itself from the controlling terminal, so interrupts from the keyboard kills the process. Any other argument supplied is interpreted as the name of 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. FILES /etc/gateways Routes through distant and external gateways. /etc/networks Contains the network name data base. RELATED INFORMATION Internet Transport Protocols, XSIS 028112, Xerox System Integration Standard. In this book: "route" Processed October 29, 1990 ROUTED(8c,C) 3