UNIX System Administration Handbook - Evi Nemeth [213]
routed also supports a configuration file, /etc/gateways, which was designed to provide static information about gateways to “preload” into the routed routing table. In modern times, if you find yourself needing this functionality, you should really be running gated instead.
14.5 GATED: A BETTER ROUTING DAEMON
gated is a generic routing framework that allows many different routing protocols to be used simultaneously. gated provides pinpoint control over advertised routes, broadcast addresses, trust policies, and metrics. It can share routes among several protocols, allowing routing gateways to be constructed between areas that have standardized on different routing systems. gated also has one of the nicest administrative interfaces and configuration file designs of any UNIX administrative software.
gated can be obtained from www.gated.org.
Many people have contributed to the development of gated. Work was originally coordinated by Cornell University. gated started out as freely distributable software, but in 1992 it was privatized and turned over to the Merit GateD Consortium. Current versions of gated are available only to Consortium members. Membership (ten categories! four product lines! but wait! you also get...) is open to everyone, but it requires the execution of a license agreement, and it’s expensive for nonacademic users.
Although the definition of “academic and research use” is quite broad, we recommend steering clear of the bureaucratic quagmire in which gated has become mired. Version 3 was the last gated to be unencumbered with red tape, and it works just fine. Version 3.5.10 was the current release (of version 3) as of this writing, and that’s the version we describe below.
gated supports RIP (both versions), OSPF, and IS-IS for interior routing and also the exterior protocols EGP and BGP. An older protocol called HELLO is supported for historical reasons.
Table 14.3 shows the support for routed and gated that exists on stock copies of our example systems. The current gated will compile on almost any common system, so it’s easy to upgrade.
Table 14.3 Vendor-supplied routing daemons
a. routed on FreeBSD also speaks RDP.
gated startup and control
gated is normally started at boot time with no arguments. The correct way to do this is system dependent; see the notes starting on page 366 or Chapter 2, Booting and Shutting Down, for more information.
gated takes its operating instructions from a single configuration file. The config file is normally /etc/gated.conf, but this can be changed with a command-line flag. Once running, gated can be manipulated with the gdc command, which is installed along with it. Most uses of gdc take the form
gdc command
The most common gdc commands are shown below:
interface
signals gated to recheck the kernel’s list of active network interfaces. gated does this periodically on its own, but if you have just changed an interface’s configuration, you may want to force an immediate update.
reconfig
makes gated reread its configuration file.
checkconf
parses the configuration file and checks it for syntax errors, but does not tell gated to load it.
toggletrace
starts or stops logging.
stop
terminates gated: gracefully if possible, forcibly if not.
start
spawns a new gated if one is not already running.
restart
kills and restarts gated. Equivalent to stop followed by start.
Tracing
gated can be run with debugging (called “tracing”) turned on, causing its actions to be archived to a log file. gated’s tracing features are very useful when you are first setting up the config file; they also provide a history of routing updates.
Depending on which tracing options have been enabled, the log file may grow quickly and should be restarted or truncated periodically. gdc toggletrace will completely close the log file, allowing you to rename or truncate it. A second gdc toggletrace turns logging back on.
Trace options can be specified in the configuration file or on the gated