SUNWcsu
In normal operation, in.routed listens on udp(7P) 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.
When in.routed is started, it uses the SIOCGIFCONF ioctl(2) 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. in.routed 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, in.routed formulates a reply based on the information maintained in its internal tables. The 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.
request packets received by in.routed are used to update the routing tables if one of the following conditions is satisfied:
When an update is applied, in.routed records the change in its internal tables and generates a response packet to all directly connected hosts and networks. in.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.
In addition to processing incoming packets, in.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.
Hosts acting as internetwork routers gratuitously supply their routing tables every 30 seconds to all directly connected hosts and networks.
In addition to the facilities described above, in.routed supports the notion of ‘distant’ passive and active gateways. When in.routed is started up, it reads the file gateways to find gateways which may not be identified using 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 (that is, they should have a in.routed process running on the machine). Passive gateways are maintained in the routing tables forever. Information regarding their existence is not 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 time, the associated route is deleted.
The gateways is comprised of a series of lines, each in the following format:
The net or host keyword indicates if the route is to a network or specific host.
filename1 is the name of the destination network or host. This may be a symbolic name located in networks or hosts, or an Internet address specified in ‘dot’ notation; see inet(3N) .
filename2 is the name or address of the gateway to which messages should be forwarded.
value is a metric indicating the hop count to the destination host or network.
The keyword passive or active indicates if the gateway
should be treated as passive or active (as described above).
in.routed should listen to intelligent interfaces, such as an IMP , and to error protocols, such as ICMP , to gather more information.