Protocol Statements

Protocol statements enable or disable protocols and set protocol options. The protocol statements occur after the definition statements and before the static statements. There are many protocol statements, and more may be added at any time. There are statements for the various interior and exterior routing protocols and for other things that are not really routing protocols.

In this section we begin with the interior protocols, move on to the exterior protocols, and finish with the special "protocols."

The ospf Statement

ospf yes | no | on | off [{ defaults {
 preference preference ; cost cost ; tag [as] tag ; type 1 | 2 ; inherit-metric;
}
; exportlimit routes ; exportinterval time ; traceoptions trace_options ; syslog [first count] [every count]; monitorauthkey key ; backbone | area number {
 authtype 0 | 1 | none | simple ; stub [cost cost] ; networks {
 address [mask mask | masklen number] [restrict] ; host address [restrict] ;
}
; stubhosts {
 address cost cost ;
}
; interface interface_list [nonbroadcast] [cost cost] {
 pollinterval time ; routers {
 address [eligible] ;
}
; interface_parameters
}
; virtuallink neighborid router_id transitarea area {
 interface_parameters
}
;
}
;
}
] ;

The ospf statement enables or disables the Open Shortest Path First (OSPF) routing protocol. By default, OSPF is disabled. It is enabled by specifying yes or on (it doesn't matter which you use) and it is disabled with no or off.

WARNING: For the sake of brevity, this text explains only the first occurrence of any gated.conf parameter if it is used the same way in subsequent commands. Only differences between commands are explained. For example, yes | no | on | off is not explained again because it is always used in the same way to enable or disable a protocol.

The ospf statement has many configuration parameters:

The rip Statement

rip yes | no | on | off [ {
 broadcast ; nobroadcast ; nocheckzero ; preference preference ; defaultmetric metric ; query authentication [none | [simple | md5 password]] ; interface interface_list [noripin] | [ripin] [noripout] | [ripout] [metricin metric] [metricout metric] [version 1 | 2 [multicast | broadcast]] [[secondary] authentication [none | [simple | md5 password]] ; trustedgateways gateway_list ; sourcegateways gateway_list ; traceoptions trace_options ;
}
] ;

The rip statement enables or disables RIP. By default RIP is enabled. The rip statement options are:

The isis Statement

isis on | off {
 [ area areaid ; ] [ area auth simple key ; ] [ domain auth simple key ; ] [ domain-wide on | off ; ] [ export-defaults ; ] [ export-defaults level 1 | 2 ; ] [ export-defaults metric metric | inherit ; ] [ export-defaults metric-type internal | external ; ] [ external preference preference ; ] [ level 1 | 2 | 1 and 2 ; ] [ interface name | address [ {
 [ enable | disable ; ] [ auth simple key ; ] [ csn-interval interval [ level 1 | 2 | 1 and 2 ] ; ] [ dis-hello-interval interval [ level 1 | 2 | 1 and 2 ] ; ] [ encap [ iso | ip ] ; ] [ hello-interval interval [ level 1 | 2 | 1 and 2 ] ; ] [ hello-multiplier number [ level 1 | 2 | 1 and 2 ] ; ] [ lsp-interval interval ; ] [ level 1 | 2 | 1 and 2 ; ] [ max-burst number ; ] [ metric metric [ level 1 | 2 | 1 and 2 ] ; ] [ passive on | off ; ] [ priority priority [ level 1 | 2 | 1 and 2 ] ; ] [ retransmit-interval interval ; ]
}
] ; ] [ overload-bit on | off ; ] [ preference preference ; ] [ psn-interval intervalt ; ] [ require-snp-auth on | off ; ] [ ribs unicast | unicast multicast ; ] [ spf-interval interval ; ] [ inet6 on | off ; ] [ summary-originate [ inet | inet6 ] {
 [network (mask mask | masklen n ) metric cost-value ; ]
}
; ] [ summary-filter [ inet | inet6 ] {
 [network mask mask | masklen number ; ]
}
; ] [ systemid systemid ; ] [ traceoptions traceoptions ; ] [ config-time seconds ; ] [ es-config-time seconds ; ] [ hold-time seconds ; ] }; 

The isis statement enables the IS-IS protocol. By default, it is disabled. The options that may appear in the isis statement are:

The bgp Statement

bgp yes | no | on | off [{ preference preference ; defaultmetric metric ; traceoptions trace_options ; group type external peeras as_number | internal peeras as_number | igp peeras as_number proto proto | routing peeras as_number proto proto interface interface_list | test peeras as_number {
 allow {
 address mask mask | masklen number all host address
}
; peer address [metricout metric] [localas as_number] [nogendefault] [gateway address] [preference preference] [preference2 preference] [lcladdr address] [holdtime time] [version number] [passive] [sendbuffer number] [recvbuffer number] [indelay time] [outdelay time] [keep all | none] [showwarnings] [noaggregatorid] [keepalivesalways] [v3asloopokay] [nov4asloop] [logupdown] [ttl ttl] [traceoptions trace_options] ;
}
;
}
] ;

This statement enables or disables BGP. By default, BGP is disabled. The default preference is 170. By default, BGP does not advertise a metric. Unlike the RIP metric, the BGP metric does not play a primary role in determining the best route. The BGP metric is simply an arbitrary 16-bit value that can be used as one criterion for choosing a route. The defaultmetric statement can be used to define a metric that BGP will use when advertising routes.

Trace options can be specified for all of BGP or for individual BGP peers. BGP supports most of the standard trace options as well as the following:

BGP peers must be members of a group. The group statement declares the group, defines which peers are members of the group, and defines the group "type." Multiple group statements may be specified, but each must have a unique combination of type and autonomous system number. There are five possible group types:

A group clause contains peer subclauses. Any number of peer subclauses may belong to a group. Peers are specified explicitly with a peer statement, or implicitly with the allow statement.

The BGP peer subclause allows the following parameters, which can also be specified on the group clause. If placed on the group clause, the parameters affect all peers in the group. The available options are:

The BGP trace options were covered previously.

The egp Statement

egp yes | no | on | off [{ preference preference ; defaultmetric metric ; packetsize maxpacketsize ; traceoptions trace_options ; group [peeras as_number] [localas as_number] [maxup number] {
 neighbor address [metricout metric] [preference preference] [preference2 preference] [ttl ttl] [nogendefault] [importdefault] [exportdefault] [gateway address] [lcladdr address] [sourcenet network] [minhello | p1 interval] [minpoll | p2 interval] [traceoptions trace_options] ;
}
;
}
] ;

This statement enables or disables EGP. By default, EGP is disabled. The default metric for announcing routes via EGP is 255, and the default preference for routes learned from EGP is 200.

The packetsize argument defines the size of the largest EGP packet that will be sent or accepted. maxpacketsize is the size in bytes. The default is 8192 bytes. If gated receives a packet larger than maxpacketsize, the packet is discarded, but maxpacketsize is increased to the size of the larger packet so that future packets won't have to be discarded.

The traceoptions statement defines the tracing for EGP. Tracing can be specified for the EGP protocol or for an individual EGP neighbor. The EGP trace options are:

The egp statement has two clauses: the group clause and the neighbor clause. EGP neighbors must be part of a group, and all of the neighbors in a group must be members of the same autonomous system. Use the group clause to define parameters for a group of EGP neighbors. Values set in a group clause apply to all neighbor clauses in the group. There can be multiple group clauses. The following parameters are set by the group clause:

The neighbor clause defines one EGP neighbor. The only part of the clause that is required is the address argument, which is the hostname or IP address of the neighbor. All other parameters are optional. All of these optional parameters can also be specified in the group clause if you want to apply the parameter to all neighbors. The neighbor clause parameters are:

The smux Statement

smux yes | no | on | off [ {
 port port ; password string ; traceoptions trace_options ;
}
] ;

This command replaces the snmp statement used in previous versions of gated. The smux command controls whether gated informs the SNMP management software of its status. SNMP is not a routing protocol and is not started by this command. You must run SNMP software independently. This statement only controls whether gated keeps the management software apprised of its status. The default is on, so gated does inform SNMP of its status.

The smux statement supports three options:

The redirect Statement

redirect yes | no | on | off [{ preference preference ; interface interface_list [noredirects | redirects] ; trustedgateways gateway_list ; traceoptions trace_options ;
}
] ;

This statement controls whether ICMP redirects are allowed to modify the kernel routing table. It does not prevent a system from sending redirects, only from listening to them. If no or off is specified, gated attempts to remove the effects of ICMP redirects from the kernel routing table whenever the redirects are detected. Remember that ICMP is part of IP, and the redirects may be installed in the kernel table before they are seen by gated. If you disable redirects, gated actively removes the redirected routes from the routing table. By default, ICMP redirects are enabled on hosts that quietly listen to interior routing protocols, and disabled on gateways that actively participate in interior routing protocols.

The default preference of a route learned from a redirect is 30, which can be changed with the preference option. The interface statement controls how redirects are handled on an interface-by-interface basis. Redirects are ignored if noredirects is specified, and are permitted if redirects, which is the default, is specified. The trustedgateways statement enables redirects on a gateway-by-gateway basis. By default, redirects are accepted from all routers on the local network. If the trustedgateways statement is used, only redirects received from a gateway listed in the gateway_list are accepted. The gateway_list is simply a list of hostnames or addresses. The trace_options defined on the traceoptions statement are the standard gated trace options.

The icmp Statement

icmp {
 traceoptions trace_options ;
}

On some systems, gated listens to all ICMP messages but only processes the ICMP redirect packets. That processing is controlled by the redirect statement. In the future, more functionality may be added. At present the icmp statement is used only to enable tracing of ICMP messages. The tracing options supported by the icmp statement are:

The routerdiscovery Statement

The Router Discovery Protocol informs hosts of the routers that are available on the network. It provides an alternative to static routes, routing protocols, and ICMP redirects for hosts that simply need to know the address of their default router. The Router Discovery Protocol is implemented as a server running on the router and a client running on the host. Both the server (router) software and the client (host) software are provided by gated.

First let's look at the server configuration statement:

routerdiscovery server yes | no | on | off [{ traceoptions trace_options ; interface interface_list [minadvinterval time] [maxadvinterval time] [lifetime time] ; address interface_list [advertise | ignore] [broadcast | multicast] [ineligible | preference preference] ;
}
] ;

The routerdiscovery statement for both the client and server supports tracing. The state trace flag can be used to trace finite state machine transitions. Router discovery packet tracing, however, is not done here. It is enabled via the ICMP statement.

The interface clause defines the physical interfaces and the parameters that apply to them. Only physical interfaces can be defined in the interface clause. Addresses are specified in the address clauses shown below. The interface parameters are:

The address clause defines the IP addresses used and the parameters that apply to them. The address clause parameters are:

For routerdiscovery to work, the hosts must have the routerdiscovery client software. It is part of gated and is configured by the routerdiscovery client statement.

The routerdiscovery client statement

routerdiscovery client yes | no | on | off [{ traceoptions trace_options ; preference preference ; interface interface_list [enable | disable | multicast] [quiet | solicit] ;
}
] ;

The client uses the same trace options as the server. Other options are different, however. The full list of client options is:

The kernel Statement

kernel {
 options [nochange] [noflushatexit] [protosync]; remnantholdtime ; routes number ; flash [limit number] [type interface | interior | all] ; background [limit number] [priority flash | higher | lower] ; traceoptions trace_options ;
}
;

The kernel statement defines the interactions between gated and the kernel.

Many tracing options work for the kernel interface because, in many cases, the interface is handled as a routing protocol. The command-line trace options, symbols and iflist, provide information about the kernel. The kernel statement trace options are:

The remaining trace options apply only to systems that use the routing socket to exchange routing information with the kernel.