Manages network routing tables.
The /etc/gateways file contains information about routes through distant and external gateways to hosts and networks that should be advertised through RIP. These routes can be either static routes to specific destinations or default routes for use when a static route to a destination is unknown. The format of the /etc/gateways file is:
{ net | host } name1 gateway name2 metric { passive | active | external }
When a gateway specified in the /etc/gateways file supplies RIP routing information, it should be marked as active. Active gateways are treated like network interfaces. That is, RIP routing information is distributed to the active gateway. If no RIP routing information is received from the gateway for a period of time, the routed daemon deletes the associated route from the routing tables.
A gateway that does not exchange RIP routing information should be marked as passive. Passive gateways are maintained in the routing tables indefinitely. Information about passive gateways is included in any RIP routing information transmitted.
The routed daemon can also perform name resolution when routing to different networks. For example, the following command adds a route to the network called netname through the gateway called host1. The host1 gateway is one hop count away.
route add net netname host1 1
To perform network name resolution, the routed daemon uses the /etc/networks file to get information on the network addresses and their corresponding names. To perform host name resolution, the routed daemon must take additional steps before the routing is complete. First the daemon checks for the existence of the /etc/resolv.conf file. This file indicates whether the host is running under a domain name server, and if so, gives the IP address of the host machine running the named daemon.
If the /etc/resolv.conf file does not exist, the routed daemon uses the /etc/hosts file to find the host for which it is routing.
The routed daemon should be controlled using the System Resource Controller (SRC) or the System Management Interface Tool (SMIT). Entering the routed daemon at the command line is not recommended.
Manipulating the routed Daemon with the System Resource Controller
The routed daemon is a subsystem controlled by the System Resource Controller (SRC). The routed daemon is a member of the SRC tcpip system group. This daemon is disabled by default and can be manipulated by the following SRC commands:
Item | Description |
---|---|
startsrc | Starts a subsystem, group of subsystems, or subserver. |
stopsrc | Stops a subsystem, group of subsystems, or subserver. |
tracesoff | Disables tracing of a subsystem, group of subsystems, or subserver. |
lssrc | Gets the status of a subsystem, group of subsystems, or subserver. |
Signals
The following signals have the specified effect when sent to the routed process using the kill command:
Item | Description |
---|---|
SIGINT | Restarts the routed daemon and flushes the routing table. |
SIGHUP, SIGTERM, or SIGQUIT | Broadcasts RIP packets with hop counts set to infinity. These signals disable the local host as a router. After a second SIGHUP, SIGTERM, or SIGQUIT signal, the routed daemon terminates. |
SIGUSR1 | Turns packet tracing on or, if packet tracing is already on, steps up the tracing one level. The first level traces transactions only. The second level traces transactions plus packets. The third level traces the packet history, reporting packet changes. The fourth level traces packet contents. This command increments the level of tracing through four levels. |
SIGUSR2 | Turns packet tracing off. |
Item | Description |
---|---|
-d | Enables additional debugging information, such as bad packets received, to be logged. |
-g | Runs the routing daemon on a gateway host. The -g flag is used on internetwork routers to offer a route to the default destination. |
-q | Prevents the routed daemon from supplying routing information regardless of whether it is functioning as an internetwork router. The -q flag indicates "quiet". Do not use the -q flag and the -s flag together. |
-s | Supplies routing information regardless of whether it is functioning as an internetwork router. The -s flag indicates "supply". Do not use the -q flag and the -s flag together. |
-t | Writes all packets sent or received to standard output or to the file specified in the LogFile parameter. The routed daemon remains under control of the controlling terminal that started it. Therefore, an interrupt from the controlling terminal keyboard stops the routed process. |
startsrc -s routed -a "-s"
The -s flag causes the routed daemon to return routing information regardless of whether the routed daemon is an internetwork router.
stopsrc -s routed
lssrc -s routed
This command returns the
name of the daemon, the process ID of the daemon, and the state of
the daemon (active or inactive).traceson -s routed
This
command enables socket-level debugging. Use the html