gated [ -c ] [ -C ] [ -n ] [ -N ]
[ -t trace_options ]
[ -f config_file ]
[ trace_file ]
The command-line options are:
This option must be used to trace events that take place before the config file is parsed, such as determining the interface configuration and reading routes from the kernel.
See section 4.5 for valid trace options and a more detailed explanation of tracing.
If a trace file is specified on the command line, or no trace flags are specified on the command line, gated detaches from the terminal and runs in the background. If trace flags are specified without specifying a trace file, gated assumes that tracing is desired to stderr and remains in the foreground.
The following signals may be used to control gated:
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.
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.
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.
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.
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.