7.2 The GateD Command
NAME
GateD - gateway routing daemon
SYNOPSIS
GateD[ -c ] [ -C ] [ -n ] [ -N ] [ -t trace_options ] [ -f config_file ] [ trace_file ]
GateD -v
DESCRIPTION
GateD is a routing daemon that handles multiple routing protocols and replaces routed (8) and
egpup (8). GateD currently handles the RIP, BGP, EGP, HELLO, and OSPF routing protocols.
The GateD process can be configured to perform all routing protocols or any subset of them.
7.2.1 The Command-line Options
The command-line options are:
- -c
- Specifies that the configuration file will be parsed for syntax errors and then
GateDwill exit, if there were no errors, GateD will leave a dump file in
/usr/tmp/gated_dump. Gated does not need to be run as the super user to use the
-coption but it may not be possible to read the kernel forwarding table and interface
configuration if not run as super user. The -c option implies -tgeneral. All
traceoption clauses in the configuration file will be ignored.
- -C
- Specifies that the configuration file will just be parsed for syntax errors. Gated will
exit with a status 1 if there were any errors, and 0 if there were not. Gated does not
need to be run as the super user to use the -C option but it may not be possible to
read the kernel forwarding table and interface configuration if not run as super user.
- -n
- Specifies that GateD will not modify the kernel forwarding table. This is used for
testing GateD configurations with actual routing data.
- -N
- Specifies that GateD will not daemonize. Normally, if tracing to stderr is not specified
GateD will daemonize if the parent process ID is not 1. This allows the use of an
/etc/inittab-like method of invoking GateD that does not have a PID of 1.
- -t trace_options
- Specifies a comma separated list of trace options to be enabled on startup. If no flags
are specified, general is assumed. No space is allowed between this option and its
arguments.
- 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 the GateD Configuration Guide for valid trace options and a more detailed
explanation of tracing.
- -f config_file
- Use an alternate config file. By default, GateDuses /etc/gated.conf.
- -v
- Specifies that GateD should show its version information and quit.
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.
7.2.2 SIGNAL PROCESSING
The following signals may be used to control GateD:
SIGHUP
- 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.
SIGINT
- 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.
SIGTERM
- 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
SIGTERMonce 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.
SIGUSR1
- Toggle tracing.
- On receipt of a SIGUSR1, GateDwill 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.
SIGUSR2
- Check for interface changes.
- On receipt of a SIGUSR2, GateD will rescan the kernel interface list looking for
changes.
7.2.3 FILES
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.
- /usr/tmp/gated_dump
- Where GateD writes status information. The default is /usr/tmp/%s_dump.
Another common path is /var/tmp/%s_dump.
- /etc/gated.conf
- Where GateD looks for its configuration file. The default is /etc/%s.conf.
- /etc/gated.pid
- Where GateD writes its process id (PID). The defalt is /etc/%s.pid, but
/var/run/%s.pid is common.
AUTHORS
Mark Fedor <fedor@psi.com>
Jeffrey C Honig <jch@gated.cornell.edu>
Rob Coltun <rcoltun@ni.umd.edu>
Dennis Ferguson <dennis@ans.net>
SEE ALSO
arp (8), gdc (8), fork (2), ifconfig (8), netstat (8), ospf_monitor (8), ripquery (8), routed (8),
route (8)
GateD Documentation
GateD Configuration Guide
COPYRIGHT INFORMATION
This package and associated documentation is Copyright (c) 1990,1991,1992,1993,1994,1995
Cornell University., all rights reserved. This software contains code that is Copyright (c) 1988
Regents of the University of California., all rights reserved.;
This package contains code that is Copyright (c) 1989, 1990, 1991 The University of Maryland,
College Park, Maryland., all rights reserved.
This package contains code that is Copyright 1991 D.L.S. Associates., all rights reserved.
<!--
------------------------------------------------------------------------ GateD, Release 4.0 Copyright (c)
1996 The Regents of the University of Michigan All Rights Reserved License to use, copy,
modify, and distribute this software and its documentation can be obtained from Merit at the
University of Michigan. Merit GateDaemon Project 4251 Plymouth Road, Suite C
Ann Arbor, MI 48105 THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE REGENTS OF THE UNIVERSITY OF MICHIGAN AND MERIT DO NOT
WARRANT THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET
LICENSEE'S REQUIREMENTS OR THAT OPERATION WILL BE UNINTERRUPTED OR
ERROR FREE. The Regents of the University of Michigan and Merit shall not be liable for any
special, indirect, incidental or consequential damages with respect to any claim by Licensee or any
third party arising from use of the software. GateDaemon was originated and developed through
release 3.0 by Cornell University and its collaborators. Please forward bug fixes, enhancements
and questions to the gated mailing list: gated-people@gated.merit.edu.
------------------------------------------------------------------------ Portions of this software may
fall under the following copyrights: Copyright (c) 1988 Regents of the University of California.
All rights reserved. Redistribution and use in source and binary forms are permitted provided that
the above copyright notice and this paragraph are duplicated in all such forms and that any
documentation, advertising materials, and other materials related to such distribution and use
acknowledge that the software was developed by the University of California, Berkeley. The
name of the University may not be used to endorse or promote products derived from this
software without specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS''
AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE. >
Last updated April 27, 1997
gated@gated.merit.edu