The /etc/gateways file identifies gateways for the routed daemon. Ordinarily, the routed daemon queries the network and builds routing tables. The routed daemon builds the tables from routing information transmitted by other hosts directly connected to the network. However, there may be gateways that this command cannot identify through its queries. These unidentified gateways are known as distant gateways. Such gateways should be identified in the /etc/gateways file, which the routed daemon reads when it starts.
The general format of an file entry in the /etc/gateways file is: Destination Name1 gateway Name2 metric Value Type
The following is a brief description of each element in an /etc/gateways file entry: A keyword that indicates whether the route is to a network or to a specific host. The two possible keywords are net and host. The name associated with Destination. Name1 can be either a symbolic name (as used in the /etc/hosts or /etc/networks file) or an Internet address specified in dotted-decimal format. An indicator that the following string identifies the gateway host. The name or address of the gateway host to which messages should be forwarded. An indicator that the next string represents the hop count to the destination host or network. The hop count, or number of gateways, from the local network to the destination network. A keyword that indicates whether the gateway should be treated as active, passive, or external. The three possible keywords are as follows: An active gateway is treated like a network interface. That is, it is expected to exchange RIP (Routing Information Protocol) routing information. Information about it is maintained in the internal routing tables as long as it is active and is included in any routing information that is transmitted through RIP. If it does not respond for a period of time, the route associated with it is deleted from the internal routing tables. A passive gateway is not expected to exchange RIP routing information. Information about it is maintained in the routing tables indefinitely and is included in any routing information that is transmitted through RIP. An external gateway is identified to inform the routed daemon that another routing process will install such a route and that alternative routes to that destination should not be installed. Information about external gateways is not maintained in the internal routing tables and is not transmitted through RIP.
Note that these routes must be to networks.
Daemons: gated(8), routed(8) delim off