home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

TCP/IP Network Administration

TCP/IP Network AdministrationSearch this book
Previous: B.2 The gated Configuration Language Appendix B
A gated Reference
Next: B.4 Trace Statements

B.3 Directive Statements

Directive statements provide direction to the gated command language parser about "include" files. An include file is an external file whose contents are parsed into the configuration as if it were part of the original gated.conf file. Include files can contain references to other include files, and these references can be nested up to 10 levels deep.

The two directive statements are:

%include filename

Identifies an include file. The contents of the file are "included" in the gated.conf file at the point in the gated.conf file where the %include directive is encountered. filename is any valid UNIX filename. If filename is not fully qualified, i.e., does not begin with a / , it is considered to be relative to the directory defined in the %directory directive.

%directory pathname

Defines the directory where the include files are stored. When it is used, gated looks in the directory identified by pathname for any include file that does not have a fully qualified filename.

Unless you have a very complex routing configuration, avoid using include files. In a complex environment, segmenting a large configuration into smaller, more easily understood segments can be helpful, but most gated configurations are very small. One of the great advantages of gated is that it combines the configuration of several different routing protocols into a single file. If that file is small and easy to read, segmenting the file unnecessarily complicates things.

Previous: B.2 The gated Configuration Language TCP/IP Network Administration Next: B.4 Trace Statements
B.2 The gated Configuration Language Book Index B.4 Trace Statements