routed off
routed status [ -n ]
When routed is started with the routed on command, it reads the /etc/dgateways file to create a list of potential default gateways. The /etc/dgateways file is comprised of a series of lines, each in the following format:
gateway metric
gateway is the name or address of a gateway to be used as a potential default gateway.
metric is a metric indicating the preference weighting of the gateway. 1 is the value to use for highest preference, 15 for the least. If no value is specified, metric will default to the value 1.
There can be a maximum of 128 valid entries in the /etc/dgateways file - additional ones will be ignored, with an error message being displayed. Duplicate gateway names or addresses are not allowed - only the first one encountered in the file will be added to the table, and the additional ones will produce error messages.
After the list of gateways is created, routed selects the one with the lowest metric value to be used as the preferred default route. If there are multiple gateways available with the same metric value, the one named first in the /etc/dgateways file will be used.
routed then listens on udp port 520 for routing information packets. When a RIP request or reply packet is received, routed marks the gateway that sent the packet ALIVE. If the gateway has a better metric than the current default gateway, or has the same metric but is listed first in /etc/dgateways, the current default gateway will be changed to the new gateway.
When a gateway is not heard from for 90 seconds, routed marks the gateway as DEAD, and if it was the current default gateway, selects a new default gateway if one is available.
In addition, when routed is running, it deletes dynamic routes, created by ICMP redirects, every 3 minutes.
off routed may be turned off at any time with the off command. This stops all RIP snooping, default gateway selection, and dynamic route timeouts. The currently selected default gateway will not be deleted when routed is turned off.
status
The status of the default gateway list may be displayed
with the routed status command. This will show whether
RIP snooping is active, the current list of default
gateways, their metrics, the state of the gateways
(ALIVE or DEAD), and the last time each gateway was
heard from:
maytag> routed status RIP snooping is on Gateway Metric State Time Last Heard alantec1 1 ALIVE Wed Mar 9 03:38:41 GMT 1994 groucho 1 ALIVE Wed Mar 9 03:38:41 GMT 1994 192.9.200.66 1 ALIVE Wed Mar 9 03:38:41 GMT 1994 192.9.200.77 1 ALIVE Wed Mar 9 03:38:41 GMT 1994 tphub1 2 ALIVE Wed Mar 9 03:38:41 GMT 1994 192.9.200.32 2 ALIVE Wed Mar 9 03:38:41 GMT 1994 192.9.200.252 3 ALIVE Wed Mar 9 03:38:41 GMT 1994 192.9.200.251 4 ALIVE Wed Mar 9 03:38:41 GMT 1994 192.9.200.250 5 ALIVE Wed Mar 9 03:38:41 GMT 1994 119 free gateway entries, 9 used
routed: duplicate gateway entry not allowed - a duplicate gateway name or address was found in the /etc/dgateways file. Only the first one found will be used.
routed: unable to open socket - a networking error has prevented routed from initializing properly.
If the "best" entry selected from /etc/dgateways is DEAD when routed starts up, there may be a period of 90 seconds before a gateway that is ALIVE is selected.