next up previous contents index
Next: gdc Up: Operation Guide Previous: Starting gated

The Gated command


Command line options


gated [ -c ] [ -C ] [ -n ] [ -N ] [ -t trace_options ] [ -f config_file ] [ trace_file ]

The command-line options are:

Signal processing


The following signals may be used to control gated:

  Re-read configuration.

A SIGHUP causes gated to reread the configuration file. Gated first performs a clean-up of all allocated policy structures. All BGP and EGP peers are flagged for deletion and the configuration file is re-parsed.

If the re-parse is successful, any BGP and EGP peers that are no longer in the configuration are shut down, and new peers are started. Gated attempts to determine if changes to existing peers require a shutdown and restart. OSPF is not capable of reconfiguring, it is shutdown and restarted during a reconfiguration. This may have an adverse impact on the routing system.

It should also be possible to enable/disable any protocol without restarting gated.

  Snap-shot of current state.

The current state of all gated tasks, timers, protocols and tables are written to /usr/tmp/gated_dump.

On systems supporting fork(), this is done by forking a subprocess to dump the table information so as not to impact gated's routing functions. On systems where memory management does not support copy-on-write, fork() will cause the gated address space to be duplicated; this may be cause a noticeable impact on the system. On system not supporting fork(), the main process immediately processes the dump, which may impact gated's routing functions.

  Graceful shutdown.

On receipt of a SIGTERM, gated attempts a graceful shutdown. All tasks and protocols are asked to shutdown. Most will terminate immediately, the exception being EGP peers which wait for confirmation. It may be necessary to repeat the SIGTERM once or twice if it this process takes too long.

All protocol routes are removed from the kernel forwarding table on receipt of a SIGTERM. Interface routes, routes with RTF_STATIC set (from the route command where supported) and static routes specifying retain will remain. To terminate gated with the exterior routes intact, use SIGKILL.

  Toggle tracing.

On receipt of a SIGUSR1, gated will close the trace file. A subsequent SIGUSR1 will cause it to be reopened. This will allow the file to be moved regularly.

It is not possible to use SIGUSR1 if a trace file has not been specified, or tracing is being performed to stderr.

  Check for interface changes.

On receipt of a SIGUSR2, gated will rescan the kernel interface list looking for changes.


Many of default filenames listed below contain the string %s, which is replaced by the name with which gated is invoked. Normally this is gated, but if invoked as gated-test, gated will by default look for /etc/gated-test.conf. These paths may all be changed at compilation time.

  Where gated writes status information. The default is /usr/tmp/%s_dump. Another common path is /var/tmp/%s_dump.

  Where gated looks for its configuration file. The default is /etc/%s.conf.

  Where gated writes its process id (PID). The default is /etc/, but /var/run/ is common.

next up previous contents index
Next: gdc Up: Operation Guide Previous: Starting gated

Laurent Joncheray
Wed Jun 12 15:35:22 EDT 1996