Appendix B. A gated ReferenceContents: The gated Command This appendix covers the syntax of the gated command and the gated configuration language for Gated 3.6 -- the publicly available version of gated. As a reference to the gated configuration language, this appendix stands on its own. But to fully understand how to configure gated, use this reference in conjunction with the sample configuration files in Chapter 7, "Configuring Routing ". gated is constantly being improved. As it is upgraded, the command language changes. Refer to the latest manpages for the most recent information about gated. B.1. The gated CommandThe syntax of the gated command is: gated [-v] [-c] [-C] [-n] [-N] [-t trace_options] [-f config_file] [trace_file] The -c and -n command-line options debug the routing configuration file without impacting the network or the kernel routing table. Frequently, these debugging options are used with a test configuration identified by the -f config_file option:
The -v option causes gated to display its version number. When this is used, no other options are used because gated terminates immediately after displaying the version information. The -N command-line option prevents gated from running in background mode as a daemon. This option is used when gated is started from inittab. By default, gated runs as a daemon. The command-line arguments trace_options and trace_file are used for protocol tracing. The trace_file argument names the file to which the trace output is written. If a file is not specified, the trace is written to the standard output. Tracing usually produces a large amount of output. The command-line options used for tracing are:
The advantage of placing a trace option on the command line is that it can trace activities that happen before the configuration file is processed. For the two options listed above, this is an essential advantage. For other options, it is not very important. Most trace options are specified in the configuration file. See the traceoptions command later in this appendix for more details. B.1.1. Signal Processinggated processes the following signals:
The following is an example of gated signal handling. First, the SIGUSR1 signal is passed to the gated process using the process ID obtained from the gated.pid file (/var/run/gated.pid in this case). # kill -USR1 'cat /var/run/gated.pid' Next, the old trace file (/usr/tmp/gated.log in this case) is removed, and gated is passed another SIGUSR1 signal. # rm /usr/tmp/gated.log # kill -USR1 'cat /etc/gated.pid' After receiving the second signal, gated opens a fresh trace file (still named /usr/tmp/gated.log). An ls shows that the new file has been created. # ls -l /usr/tmp/gated.log -rw-rw-r-- 1 root 105 Jul 6 16:41 /usr/tmp/gated.log Copyright © 2002 O'Reilly & Associates. All rights reserved. |
|