HPUX gated-confi[4]

gated.conf(4) gated.conf(4)
NAME
gated.conf - gated configuration file syntax
SYNOPSIS
/etc/gated.conf
DESCRIPTION
The gated config file consists of a sequence of statements terminated
by a semicolon (;). Statements are composed of tokens separated by
white space, which can be any combination of blanks, tabs and new-line
characters.
Comments can be specified in either of two forms:
o Starting with a # character and running to the end of the
line.
o ``C'' style, which starts with a /* and continues until it
reaches */.
Statement Classes
There are six classes of statements. The first two classes can be
specified in the configuration file in any order:
Directive statements
These statements are acted upon immediately by the
parser, and are used to specify included files and
the directory in which included files reside.
Unlike other statements which terminate with a
semicolon (;), directive statements terminate with
a new-line character.
Trace option statements
These statements control tracing options.
The four remaining classes must be specified in order:
Definition statements
These statements specify options, the autonomous
system, martian networks, and interface options.
Protocol statements
These statements enable or disable protocols and
set protocol options.
Static route statements
Static routes are defined by route statements.
Control statements
Control statements define routes that are accepted
from routing peers and routes that are propagated
Hewlett-Packard Company - 1 - HP-UX Release 9.0: August 1992
gated.conf(4) gated.conf(4)
to those peers.
Each of these statement classes are described in detail later in this
manual entry.
Statement Primitives
The following primitives are used in statement definitions:
host Any host. A host can be specified by its IP address or
by a domain name. If a domain name is specified that
has multiple IP address it is considered an error. The
host bits in the IP address must be non-zero.
network Any network. A network can be specified by its IP
address or a network name. The host bits in a network
specification must be zero. default can also be used
to specify the default network (0.0.0.0).
destination Any host or network.
dest_mask Any host or network with an optional mask:
all
network
network mask mask
A mask is a dotted quad specifying which bits of the
destination are significant. all can be used to
specify that any IP address may be matched.
gateway Must be a host on an attached network.
interface Specified by IP address, domain name, or interface
name. Be careful when using interface names because
future UNIX operating systems may allow more than one
address per interface.
gateway_list List of one or more gateways.
interface_list List of one or more interface names or addresses, or
the token all, which refers to all interfaces. The
token all, cannot be used with any of the control
statements (such as accept, propagate, and proto).
preference Used to determine the order of routes to the same
destination in the routing table. gated allows one
route to a destination per protocol per autonomous
system. In the case of multiple routes, the route to
use is chosen by preference, which is a number between
0 and 255, with 0 being the most preferred and 255
being the least preferred.
Hewlett-Packard Company - 2 - HP-UX Release 9.0: August 1992
gated.conf(4) gated.conf(4)
In case of a preference tie, if the two routes are from
the same protocol and from the same autonomous system,
gated chooses the route with the lowest metric.
Otherwise gated chooses the route with the lowest
numeric next-hop gateway address.
metric A valid metric for the specified protocol.
Directive Statements
%directory "path_name"
Sets the current directory to path_name. This is the directory
where gated looks for included files that do not begin with /.
Note that this statement does not actually change the current
directory; it only specifies the prefix applied to included file
names.
%include "filename"
Causes the specified file to be parsed completely before resuming
with this file. Nesting up to 10 levels is supported.
Trace Statements
tracefile "filename" [replace] ;
Specifies the file to contain tracing output. Trace information
is appended to this file unless replace is specified.
traceoptions traceoption [traceoption [...]] ;
Changes the tracing options to those specified. If none is the
only option specified, tracing is turned off. Trace flags are:
all Turn on all of the following options, except
nostamp.
general Turn on internal, external and route.
internal Internal errors and informational messages.
external External errors.
nostamp Do not timestamp all messages in the trace
file.
mark Output a message to the trace log every 10
minutes to ensure gated is still running.
task Task scheduling, signal handling and packet
reception.
timer Timer scheduling.
Hewlett-Packard Company - 3 - HP-UX Release 9.0: August 1992
gated.conf(4) gated.conf(4)
lex Objects the lexical analyzer locates in the
config file.
parse Tokens the parser recognizes in the config
file.
config Redisplays statements read from the config
file after they are parsed. This allows
verification that the statements were parsed
correctly.
route Changes to the gated routing table.
kernel Changes to the kernel's routing table.
bgp BGP packets sent and received. May be
modified by "update" and "protocol".
egp EGP packets sent and received. May be
modified by "update" and "protocol".
rip RIP packets sent and received. May be
modified by "update".
hello HELLO packets sent and received. May be
modified by "update".
icmp ICMP redirect packets sent and received. May
be modified by "update".
Note that redirects processed are traced
under the "route" option.
protocol Provide messages about protocol state machine
transitions when used with "egp" or "bgp".
update Trace the contents of protocol packets.
Definition Statements
options option_list ;
Sets gated options:
noinstall Do not change kernel's routing table. Useful
for verifying configuration files.
gendefault BGP and EGP neighbors should cause the
internal generation of a default route when
up. This route is not installed in the
kernel's routing table, but can be announced
by other protocols. Announcement is
controlled by referencing the special
Hewlett-Packard Company - 4 - HP-UX Release 9.0: August 1992
gated.conf(4) gated.conf(4)
protocol default.
autonomoussystem autonomous_system ;
Sets the autonomous system of this router to be
autonomous_system. This option is required if BGP or EGP is
being used.
interface interface_list interface_options ;
Sets interface options on the specified interfaces. An
interface list is all or a list of interface names (see
previous warning about interface names), domain names, or
numeric addresses.
Interface options are:
metric metric Set the interface metric for this
interface. This metric is used by RIP
and HELLO. Specifying the metric here
overrides for internal use, but does not
change the metric set by ifconfig.
preference pref
Sets the preference for routes to this
interface.
passive Prevents gated from deleting the route
to this interface if it is believed to
be down due to routing information not
received.
martians {
martian_list
} ;
Defines a list of martian addresses
about which all routing information is
ignored. The <martian_list> is a semi-
colon separated list of symbolic or
numeric hosts with optional masks. See
dest_mask.
Protocol Statements
Enables or disables use of a protocol and controls protocol options.
These can be specified in any order.
For all protocols, preference controls the choice of routes learned
via this protocol or from this autonomous system in relation to routes
learned from other protocols and/or autonomous systems. The default
metric used when propagating routes learned from other protocols is
specified with defaultmetric which itself defaults to the highest
valid metric for this protocol; for many protocols this signifies a
Hewlett-Packard Company - 5 - HP-UX Release 9.0: August 1992
gated.conf(4) gated.conf(4)
lack of reachability.
For distance vector IGPs (RIP and HELLO) and redirects (ICMP), the
trustedgateways clause supplies a list of gateways providing valid
routing information; routing packets from others are ignored. This
defaults to all gateways on the attached networks. In addition to
routing packets to the remote end of point-to-point (pointopoint)
links and the broadcast address of broadcast-capable interfaces,
routing updates can be sent to specific gateways if they are listed in
a sourcegateways clause and pointopoint or supplier is specified.
Disabling the transmission and reception of routing packets for the
protocols can be specified with the interface clause.
For exterior protocols (BGP, EGP), the autonomous system advertised to
the peer is specified by the global autonomoussystem clause unless
overridden by the asout parameter. The incoming autonomous system
number is not verified unless asin is specified. Specifying metricout
fixes the outgoing metric for all routes propagated to this peer. If
the peer does not share a network, interface can be used to specify
which interface address to use when communicating with this peer and
gateway can be used to specify the next hop to use for all routes
learned from this peer. An internal default is generated when routing
information is learned from a peer unless the nogendefault parameter
is specified.
Routing Information Protocol (RIP):
rip yes|no|on|off|quiet|pointopoint|supplier [ {
preference preference ;
defaultmetric metric ;
interface interface_list [noripin] [noripout] ;
...
trustedgateways gateway_list ;
sourcegateways gateway_list ;
} ] ;
If yes or on is specified, RIP assumes quiet if there is only one
interface and supplier if there are more than two or more. quiet
specifies that no RIP packets are to be generated. supplier
specifies that RIP packets are to be generated. pointopoint
specifies that RIP packets are to be sent only to gateways listed
in the sourcegateways clause. If the RIP clause is not
specified, the default is on.
The default metric is 16, the default preference is 100.
HELLO Protocol:
hello yes|no|on|off|quiet|pointopoint|supplier [ {
preference preference ;
defaultmetric metric ;
Hewlett-Packard Company - 6 - HP-UX Release 9.0: August 1992
gated.conf(4) gated.conf(4)
interface interface_list [nohelloin] [nohelloout] ;
...
trustedgateways gateway_list ;
sourcegateways gateway_list ;
} ] ;
If yes or on is specified, HELLO assumes quiet if there is only
one interface and supplier if there are two or more. quiet
specifies that no HELLO packets are to be generated. supplier
specifies that HELLO packets are to be generated. Pointopoint
specifies that HELLO packets are to be sent only to gateways
listed in the sourcegateways clause. If the HELLO clause is not
specified the default is off.
The default metric is 30000, the default preference is 90.
Exterior Gateway Protocol (EGP):
egp yes|no|on|off [ {
preference preference ;
defaultmetric metric ;
packetsize maxpacketsize ;
group [asin autonomous_system]
[asout autonomous_system]
[maxup number]
[preference preference] {
neighbor host
[metricout metric]
[nogendefault]
[acceptdefault]
[propagatedefault]
[gateway gateway]
[interface interface]
[sourcenet network]
[minhello min_hello]
[minpoll min_poll]
;
...
} ;
...
} ] ;
packetsize specifies the size, in bytes, of the largest EGP
packet to be accepted or sent. A group lists a group of EGP
peers in one autonomous system. maxup specifies the maximum
number of peers to be maintained in the Up state. acceptdefault
and propagatedefault tell gated to accept or propagate the
default network (0.0.0.0) in updates exchanged with an EGP
neighbor. If not specified, the default network is ignored when
exchanging EGP updates. sourcenet specifies the network to query
in EGP Poll packets, this is normally the shared network. The
Hewlett-Packard Company - 7 - HP-UX Release 9.0: August 1992
gated.conf(4) gated.conf(4)
minimum acceptable EGP hello and poll intervals can be specified
with the minhello and minpoll arguments, respectively. These are
both specified as a time in seconds, minutes:seconds, or
hours:minutes:seconds. Any number of group clauses can be
specified containing any number of neighbor clauses. Any
parameters from the neighbor clause can be specified in the group
clause to provide defaults for the group.
The default metric is 255, the default preference is 200.
Border Gateway Protocol (BGP ):
Note that although BGP is available with this version of gated, it is
currently not supported by HP.
bgp yes|no|on| off [ {
preference preference ;
defaultmetric metric ;
peer host
[linktype [up|down|horizontal|internal]]
[metricout metric]
[asin autonomous_system]
[asout autonomous_system]
[nogendefault]
[gateway gateway]
[interface interface]
;
...
} ] ;
peer specifies the address of each BGP peer. A linktype internal is
assumed if the neighbor's autonomous system is the same as my
autonomous system. Otherwise linktype horizontal is assumed.
The default metric is 65535 and the default preference is 150 for
external BGP and 250 for internal BGP.
Redirect (ICMP):
redirect yes|no|on|off [ {
preference preference ;
interface interface_list [noicmpin] ;
trustedgateways gateway_list ;
} ] ;
Controls whether gated makes routing table changes based on ICMP
redirects when not functioning as a router. When functioning as
a router (i.e. any interior routing protocols (RIP, HELLO) are
participating in routing on any interface, ICMP redirects are
disabled. When ICMP redirects are disabled, gated must actively
remove the effects of redirects from the kernel as the kernel
Hewlett-Packard Company - 8 - HP-UX Release 9.0: August 1992
gated.conf(4) gated.conf(4)
always processes ICMP redirects.
The default preference is 20.
Static Statements
Static routes are specified with static clauses.
static {
destination gateway gateway [preference
preference] ;
...
destination interface interface [preference
preference] ;
...
} ;
Any number of static statements can be specified, each containing
any number of static route definitions. The first form defines a
static route through a gateway. The second defines a static
interface route which is used for primitive support of multiple
networks on a single interface.
The preference for static routes defaults to 50.
Control Statements
Acceptance of routes from routing protocol peers and propagation of
routes to routing protocol peers are controlled by accept and
propagate clauses.
Accept Clauses:
accept proto bgp|egp as autonomous_system [preference preference]
{
acceptance_list
} ;
accept proto rip|hello|redirect {
acceptance_list
} ;
accept proto rip|hello|redirect interface interface_list
[preference preference] {
acceptance_list
} ;
accept proto rip|hello|redirect gateway gateway_list
[preference preference] {
acceptance_list
} ;
Hewlett-Packard Company - 9 - HP-UX Release 9.0: August 1992
gated.conf(4) gated.conf(4)
where acceptance_list is defined as:
listen dest_mask [preference preference] ;
nolisten dest_mask ;
If no acceptance list is specified, all routes are accepted. If one
or more acceptance lists are specified, the relevant acceptance lists
are scanned for a match from most-specific to least-specific (gateway,
interface, protocol). If no match is found, the route is discarded.
In other words, a nolisten all entry is assumed after all relevant
acceptance lists are processed.
Propagate Clauses:
propagate proto bgp|egp as autonomous_system [metric metric] {
propagation_list
} ;
propagate proto rip|hello [metric metric] {
propagation_list
} ;
propagate proto rip|hello interface interface_list
[metric metric] {
propagation_list
} ;
propagate proto rip|hello gateway gateway_list
[metric metric] {
propagation_list
} ;
where propagation_list specifies propagation based on the origination
of a destination:
proto bgp | egp as autonomous_system [metric metric] [ {
announce_list
} ] ;
proto rip|hello|direct|static|default [metric metric] [ {
announce_list
} ] ;
proto rip|hello|direct|static|default interface interface_list
[metric metric] [ {
announce_list
} ] ;
proto rip|hello gateway gateway_list [metric metric] [ {
announce_list
} ] ;
Hewlett-Packard Company - 10 - HP-UX Release 9.0: August 1992
gated.conf(4) gated.conf(4)
where announce_list is defined as:
announce dest_mask [metric metric] ;
noannounce dest_mask ;
If no announce_list is specified, all destinations are
announced. If an announce list relevant to this protocol,
interface, gateway, or autonomous system is specified, a
noannounce all is assumed if no match is found after all
relevant lists are examined. Therefore, an empty announce
list is the equivalent of noannounce all. Announce lists
are scanned from the most specific to the least specific, in
the order specified in the config file. All lists
specifying gateways are first, followed by interface lists,
and finally lists that specify only the protocol.
Note that to announce routes that specify a next hop of the
loopback interface (i.e., static and internally generated
default routes) via RIP or HELLO it is necessary to specify
the metric at some level in the propagate clause. Just
setting a default metric for RIP or HELLO is not sufficient.
EXAMPLES
Several sample gated configuration files are provided in directory
/etc/newconfig/gated/conf.
FILES
/etc/gated.conf
AUTHORS
gated was developed by Mark Fedor, PSI
Jeffrey C Honig, Cornell University.
SEE ALSO
arp(1m), gated(1m), ifconfig(1m), netstat(1m).
RFC 891 DCN Local-Network Protocols (HELLO)
RFC 904 Exterior Gateway Protocol Formal Specification
RFC 911 EGP Gateway under Berkeley UNIX 4.2
RFC 1058 Routing Information Protocol
RFC 1163 A Border Gateway Protocol (BGP)
RFC 1164 Application of the Border Gateway Protocol in the
Internet
Hewlett-Packard Company - 11 - HP-UX Release 9.0: August 1992