gated.conf(4) gated.conf(4)
NAME
gated.conf - gated configuration file
SYNOPSIS
/etc/inet/gated.conf
DESCRIPTION
/etc/inet/gated.conf is the configuration file for the
gated(1M) routing daemon.
USAGE
Four sample gated configuration files are provided, showing
sample configurations using each of the supported routing
protocols. These sample files are /etc/inet/gated.rip,
/etc/inet/gated.hello, /etc/inet/gated.egp, and
/etc/inet/gated.bgp. To configure gated, copy the appropriate
sample file to /etc/inet/gated.conf and edit as necessary.
The gated configuration file consists of a sequence of
statements terminated by a semi-colon (;). Statements are
composed of tokens separated by white space, which can be any
combination of blanks, tabs and newlines.
Comments start with a pound-sign (#) and run to the end of the
line.
Statement Classes
There are six classes of statements. The first two classes
may be specified in the configuration file in any order:
directives These statements are immediately acted upon by
the parser. They are used to specify included
files and the current directory.
traceoptions These statements control tracing options.
The four remaining classes must be specified in order.
definition These statements specify options, the
autonomous system, martian networks and
interface options.
protocol These statements enable or disable protocols
and set protocol options.
Copyright 1994 Novell, Inc. Page 1
gated.conf(4) gated.conf(4)
route Static routes are defined by route statements.
control Control statements define routes that are
accepted from routing peers and routes that are
propagated to these peers.
Detailed definitions of these classes of statements follow
below.
Primitives
Primitives that are used in the following definitions are:
host Any host. A host may 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 may be specified by its
IP address or a network name. The host bits in
a network specification must be zero. default
may 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
destination
destination mask mask
A mask is a dotted quad specifying which bits
of the destination are significant. The token
all may be used to specify any IP address may
be matched.
gateway A gateway must be a host on an attached
network.
interface An interface may be specified by IP address,
domain name, or interface name. Be careful
with the use of interface names as future UNIX
systems may allow more than one address per
interface.
Copyright 1994 Novell, Inc. Page 2
gated.conf(4) gated.conf(4)
gateway_list A gateway list is a list of one or more
gateways.
interface_list An interface list is a list of one or more
interface names or addresses, or the token all,
which refers to all interfaces.
preference A preference is used to determine the order of
routes to the same destination in 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.
In case of a preference tie, gated will choose
the route with the shortest autonomous system
path. If the autonomous system path lengths
are identical, gated will choose the route with
the lowest numeric next-hop gateway address.
metric Is 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 gated remembers its current directory
before parsing the configuration file and
returns there after the parsing is complete.
This ensures that when the configuration file
is reparsed the %directory statements will work
correctly. It also ensures that core dumps,
except those which occur during parsing, will
be written to the directory from which gated is
started.
%include filename;
Causes the specified file to be parsed
completely before resuming with this file.
Nesting up to 10 levels is supported. The
maximum nesting level may be increased by
changing the definition of FI_MAX in parse.h.
Copyright 1994 Novell, Inc. Page 3
gated.conf(4) gated.conf(4)
Trace Statements
tracefile filename [replace] ;
Specifies the file to contain tracing output.
Trace information is appended to this file
unless replace is specified.
Note that there is a potential interaction
between %directory and tracefile. It is best
to specify a rooted path name for filename.
traceoptions . . . ;
Changes the tracing options to those specified.
If only the option none is specified, tracing
is turned off. Trace flags are:
all Turn on all of the following
options.
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.
lex Objects the lexical analyzer
locates in the configuration
file.
parse Tokens the parser recognizes in
the configuration file.
Copyright 1994 Novell, Inc. Page 4
gated.conf(4) gated.conf(4)
config Redisplays statements read from
the configuration 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:
Copyright 1994 Novell, Inc. Page 5
gated.conf(4) gated.conf(4)
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 will not be installed in
the kernel's routing table, but
may be announced by other
protocols. Announcement is
controlled by referencing the
special protocol "default".
autonomoussystem autonomous system ;
Sets the autonomous system of
this router to be autonomous
system. This option is required
if BGP or EGP are in use.
interface interface_list interface_options ;
Sets interface options on the
specified interfaces. An
interface list is "all" or a
list of interface names (see
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, but does not
change, the metric set with
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 lack of received
Copyright 1994 Novell, Inc. Page 6
gated.conf(4) gated.conf(4)
routing information.
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
destination/mask lists.
Protocol Statements
Enables or disables use of a protocol and controls protocol
options. These may 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/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 lack of
reachability.
For distance vector protocols (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 pointopoint links and the broadcast address of
broadcast capable interfaces, routing updates may 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 may 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
Copyright 1994 Novell, Inc. Page 7
gated.conf(4) gated.conf(4)
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.
RIP Protocol Statements
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 will assume quiet if there is
only one interface and supplier if there are more than one.
quiet specifies that no RIP packets will be generated.
supplier specifies that RIP packets will be generated.
pointopoint specifies that RIP packets will only be sent 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 Statements
hello 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, HELLO will assume quiet if there is
only one interface and supplier if there are more than one.
quiet specifies that no HELLO packets will be generated.
supplier specifies that HELLO packets will be generated.
pointopoint specifies that HELLO packets will only be sent to
gateways listed in the sourcegateways clause. If the HELLO
clause is not specified, the default is off.
Copyright 1994 Novell, Inc. Page 8
gated.conf(4) gated.conf(4)
The default metric is 30000, the default preference is 90.
EGP Protocol Statements
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]
[gateway gateway]
[interface interface]
[sourcenet network]
[minhello min_hello]
[minpoll min_poll]
;
. . .
} ;
. . .
}] ;
group lists a group of EGP peers in one autonomous system.
maxup specifies the maximum number of peers that will be
maintained in the ``up'' state. sourcenet specifies the
network to query in EGP Poll packets; this is normally the
shared network. The minimum acceptable EGP hello and poll
intervals may 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 may be specified containing any number
of neighbor clauses. Any parameters from the neighbor clause
may be specified on the group clause to provide defaults for
the group.
The default metric is 255, the default preference is 200.
BGP Protocol Statements
bgp yes|no|on|off [{
preference preference ;
defaultmetric metric ;
peer host
Copyright 1994 Novell, Inc. Page 9
gated.conf(4) gated.conf(4)
[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 your 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.
ICMP Protocol Statements
redirect yes|no|on|off [{
preference preference ;
interface interface_list [noicmpin] ;
trustedgateways gateway_list ;
}] ;
These statements control whether ICMP redirects are listened
to. If not specified, the default is to listen to ICMP
redirects unless RIP or HELLO are enabled and there is more
than one interface. When ICMP redirects are disabled, gated
must actively remove the effects of redirects from the kernel
as the kernel 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] ;
. . .
} ;
Copyright 1994 Novell, Inc. Page 10
gated.conf(4) gated.conf(4)
Any number of static statements may be specified, each
containing any number of 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 one 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.
acceptance_list
accept proto bgp|egp as autonomous system [preference preference] {
acceptance_list
} ;
accept proto rip|hello|icmp {
acceptance_list
} ;
accept proto rip|hello|icmp interface interface_list [preference preference] {
acceptance_list
} ;
accept proto rip|hello|icmp gateway gateway_list [preference preference] {
acceptance_list
} ;
listen dest_mask [preference preference] ;
nolisten dest_mask ;
If no acceptance_list is specified, all routes will be
accepted. If one or more acceptance_lists are specified, the
relevant lists are scanned for a match from most specific to
least specific (gateway, interface, protocol). If no match is
found, the route is discarded. That is, a nolisten all entry
is assumed after all relevant acceptance_lists are processed.
propagation_list
The propagation list specifies propagation based on the
origination of a destination.
propagate proto bgp|egp as autonomous system [metric metric] {
propagation_list
} ;
propagate proto rip|hello [metric metric] {
propagation_list
Copyright 1994 Novell, Inc. Page 11
gated.conf(4) gated.conf(4)
} ;
propagate proto rip|hello interface interface_list [metric metric] {
propagation_list
} ;
propagate proto rip|hello gateway gateway_list [metric metric] {
propagation_list
} ;
announce_list
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
[metricmetric] [{
announce_list
}] ;
announce dest_mask [metric metric] ;
noannounce dest_mask ;
If no announce_list is specified, all destinations are
announced. If an announce_list 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 configuration file.
All lists specifing gateways are first, followed by interface
lists and finally lists that just specify the protocol.
REFERENCES
arp(1M), ifconfig(1M), netstat(1M), routed(1M)
RFC 891, RFC 904, RFC 911, RFC 1058, RFC 1163, RFC 1164
Copyright 1994 Novell, Inc. Page 12