|
» |
|
|
|
When gated starts, it reads a configuration file to find
out how each protocol should be used to manage routing. By default,
it uses the configuration file called /etc/gated.conf. Creating the configuration file is usually the
responsibility of the system administrator. The configuration file may include up to eight sections (called classes)
of configuration statements. Statements can
be further defined with optional clauses.
The eight classes of configuration statements are: Directives are statements that are
immediately acted upon by the gated parser. Trace statement controls gated tracing options. Options statements define global gated options. Interface statements define router interface options. Definition statements identify the autonomous system
that the router belongs to the router ID and "martian" addresses
(any addresses for which routing information should be ignored). Protocol statements enable or disable gated protocols and set protocol options. Static statements define static routes or default
routers that are installed in the kernel routing table. Control statements define routes that are imported
to the router from other routing protocols and routes that the router
exports to other routing protocols.
Type man 4 gated.conf at the HP-UX prompt for a description of each configuration
class and to determine which statements belong to which class. With version 3.5 of gated, the two statements previously in the Trace class
(tracefile and traceoptions) have been combined into one traceoptions statement. So, the tracefile statement has been eliminated. Also, some of the
global options have been removed, some new global options have been
added, and options have been added for some of the protocols. For
details about the new syntax, type man 4 gated.conf at the HP-UX prompt. How to Configure gated | |
To configure gated: Create the gated configuration file /etc/gated.conf. If the protocols are not explicitly specified, gated assumes the following: Determine how you want to configure each routing
protocol by reading the rest of this chapter and the gated.conf(4) man page. Then add the appropriate statements
for each protocol in /etc/gated.conf. The section “Configuring the OSPF
Protocol” describes statements
in the configuration file that affect OSPF routing. RIP configuration
is described in “Configuring the RIP
Protocol”. For more detailed descriptions
of the configuration statements, type man 4 gated.conf at the HP-UX prompt. Add statements as needed for any additional configuration information.
See “Customizing Routes”, “Specifying Tracing
Options”, and “Specifying Route Preference” for other configuration options. In particular, you may want to prevent gated from deleting interfaces from the routing table
if gated receives no routing protocol information from
that interface. One way to do this is to insert passive interface
definitions in the interfaces statements. For example: interfaces { interface all passive ; } ; : : <protocol statements follow>
|
If you normally use default routes, you must configure
a static default route in the gated configuration file. If the default route is a
gateway node, add the following entry to /etc/gated.conf (enter the gateway node's IP address
for gateway_IP_Address): static { default gateway gateway_IP_Address retain ; } ;
|
The default route may be a local interface, such as in topologies
where there is a Proxy ARP server on the local network. If the default
route is a local interface, add the following entry to /etc/gated.conf: static { default interface local_IP_Address retain ; } ;
|
The local_IP_Address is the local system's IP address of the interface
or network interface name (that is, lan0, lan1, etc.) that acts as
the default route. If a Proxy ARP server is used, this is the local address
of the interface attached to the same network as the Proxy ARP server. For more information, refer to the section “Customizing Routes” and the section covering “Common Problems” in
the section “Troubleshooting gated”. To check for syntax errors in the configuration
file, run gated with the -c or -C option. (gated exits after parsing the configuration file.) Set the environment variable GATED to 1 in the file /etc/rc.config.d/netconf. This causes gated to start automatically whenever the system is
booted. To start gated, reboot your system or run the gated startup script with the following command:
Examples of gated configuration files are included in the sections “Configuring the OSPF
Protocol” and “Configuring the RIP
Protocol”. They are
also included in the /usr/newconfig/gated/conf directory. | | | | | NOTE: It is best to use IP addresses in dot notation (for
example, a.b.c.d) when you specify an address for a configuration
option such as a router, host, or interface. Host names that have
multiple IP addresses associated with them are considered an error. | | | | |
Converting the Configuration File
from 3.0 to 3.5 | |
To convert a gated 3.0 configuration file to the gated 3.5 syntax, run the conv_config conversion tool by following these
steps: If you want to use the same file for
the 3.5 configuration as you have been using for 3.0, make a copy
of the 3.0 file. The reason for this is that you cannot specify
the same file for input and output when running the conv_config conversion tool. For example,
if you were using /etc/gated.conf for 3.0, the command might look like this: cp /etc/gated.conf /etc/gated.conf.30
|
Issue this command: conv_config < input_config_file_name > output_config_file
|
where input_config_file_name is the name of the gated 3.0 file you want to convert. Note that you must specify
this name (the tool does not assume that you are converting the
default file, /etc/gated.conf). output_config_file is the name of the file you want to be the gated 3.5 file. Note that you must specify
this name (the tool does not assume that you are giving the output
file the default name, /etc/gated.conf).
Continuing the example from step 1, the command would look
like this: conv_config < /etc/gated.conf.30 > /etc/gated.conf
|
When the conversion tool has finished running, you might want
to check the new file for compatibility, by using the gated -c command (see the Note under “Configuration Overview”).
|