[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 4

routed Daemon

Purpose

Manages network routing tables.

Syntax

Note: Use SRC commands to control the routed daemon from the command line. Use the rc.tcpip file to start the daemon at each system startup.

/usr/sbin/routed -d ] [ -g ] [ -t ] { -s | -q } [ LogFile ]

Description

The /usr/sbin/routed daemon manages the network routing tables in the kernel. Unlike the gated daemon, which supports all TCP/IP gateway protocols, the routed daemon only implements the Routing Information Protocol (RIP). Do not use the routed daemon when Exterior Gateway Protocol (EGP), Simple Network Management Protocol (SNMP), or Defense Communications Network Local-Network Protocol (HELLO) routing is needed. Use the gated daemon for these protocols.

Note: Results are unpredictable when the gated and routed daemons run on the same host.

The routed daemon finds interfaces to directly connected hosts and networks that are configured into the system and marked as up. (Mark networks as up using the ifconfig command.) If multiple interfaces are present, the routed daemon assumes that the local host forwards packets between networks. The routed daemon transmits a RIP request packet on each interface, using a broadcast message if the interface supports it.

The routed daemon then listens for RIP routing requests and response packets from other hosts. When the routed daemon supplies RIP information to other hosts, it sends RIP update packets every 30 seconds (containing copies of its routing tables) to all directly connected hosts and networks.

When the routed daemon receives a Routing Information Protocol (RIP) request packet to supply RIP routing information, the routed daemon generates a reply in the form of a response packet. The response packet is based on the information maintained in the kernel routing tables and contains a list of known routes. Each route is marked with a hop-count metric, which is the number of gateway hops between the source network and the destination network. The metric for each route is relative to the sending host. A metric of 16 or greater is considered infinite or beyond reach.

The routed daemon writes information about its actions to a LogFile. This log file contains information about any changes to the routing tables. The file also contains a history of recent route-change messages both sent and received.

Updating Routing Tables

The routed daemon uses information contained in RIP response and update packets from other hosts to update its routing tables when at least one of the following conditions exists:

When the routed daemon updates its internal routing tables, it generates a RIP update packet to all directly connected hosts and networks. Before updating the kernel routing tables, the routed daemon pauses briefly to allow any unstable conditions to stabilize.

Besides processing incoming RIP packets, the routed daemon also checks the internal routing table entries periodically. The metric for any entry that has not been updated for three minutes is set to infinity and marked for deletion. The deletion is delayed for 60 seconds so that information about the route that is not valid can be distributed throughout the network. A host that acts as a RIP router supplies its routing tables to all directly connected hosts and networks every 30 seconds.

Using Gateways

Besides its ability to manage routes to directly connected hosts and networks, the routed daemon also uses distant and external gateways. These gateways cannot be identified by RIP queries, so the routed daemon reads the /etc/gateways file for information about these distant and external gateways.

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.

An external gateway is identified to inform the routed daemon that another routing process will install such a route and that the routed daemon should not install alternative routes to that destination. External gateways are not maintained in the routing tables and information about them is not included in any RIP routing information transmitted.

Note: Routes through external gateways must be to networks only.

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:

startsrc
                          Starts a subsystem, group of subsystems, or subserver.
stopsrc
                          Stops a subsystem, group of subsystems, or subserver.
traceson
                          Enables tracing of 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:

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.

Flags

-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.

Examples

  1. To start the routed daemon manually, enter:
    startsrc -s routed -a "-s"
    Note: The routed daemon is not started by default at each system startup. Use the rc.tcpip file format and a System Resource Controller (SRC) command to start the routed daemon. You can also start the routed daemon using the System Management Interface Tool (SMIT).

    The -s flag causes the routed daemon to return routing information regardless of whether the routed daemon is an internetwork router.

  2. To stop the routed daemon normally, enter the following:
    stopsrc -s routed
    This command stops the daemon.
  3. To get a short-status report from the routed daemon, enter the following:
    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).
  4. To enable tracing for routed daemon, enter the following:
    traceson -s routed
    This command enables socket-level debugging. Use the trpt command to look at the output of this example command.
  5. To trace and log all the packet routing information into the temporary file logfile, enter the following:
    startsrc -s routed -a "-t /tmp/logfile"

Related Information

The route command.

The gated daemon.

The /etc/gateways file format, /etc/networks file format.

TCP/IP Routing, TCP/IP Daemons, TCP/IP Protocols in AIX Version 4.3 System Management Guide: Communications and Networks.


[ Previous | Next | Contents | Glossary | Home | Search ]