B.7. Definition Statements
Definition statements
are general configuration statements
that relate to more than one protocol. Definition statements must
appear before any protocol statements in
gated.conf. The three definition statements are:
- autonomoussystem asn [loops n] ;
-
Defines the autonomous system number (asn)
used by BGP or EGP. The loops number defines the
number of times this autonomous system may appear in an AS path for
path vector protocols, such as BGP. The default value for
n is 1.
- routerid address ;
-
Defines the router identifier used by BGP and OSPF. Use the address
of your primary OSPF or BGP interface. By default,
gated uses the address of the first interface it
encounters.
- martians {host address [allow]; address [mask mask | masklen number] [allow] ; default [allow] ; } ;
-
Changes the list of addresses about which all routing information is
ignored. Sometimes a misconfigured system sends out obviously invalid
destination addresses. These invalid addresses, called
martians, are rejected by the routing software.
This command allows changes to the list of martian addresses. A
martian address can be specified as a host address by using the
host keyword before the address, or as a network
address by simply specifying the address.
An address mask can be defined for a network address. The mask can be
defined in dotted decimal notation using the mask
keyword or as a numeric prefix length using the
masklen keyword. The address masks mask
255.255.0.0 and masklen 16 are
equivalent. If no address mask is specified, the natural mask is
used. Specifying an address in the martians
statement adds the address to the martians list. The
allow keyword is used to remove an address from
the martians list. When an address is removed from the martians list,
it then becomes a valid address for routing.
gated contains a standard
martian list of addresses that are
known to be invalid. This is the default martian list. The option
default allow removes all of the standard entries
from the martians list and permits unrestricted routing. Don't
do this if you're on a connected network.
Here is a sample of each definition statement:
autonomoussystem 249 ;
routerid 172.16.12.2 ;
martians {
host 0.0.0.26 ;
192.168.0.0 masklen 16 allow ; } ;
The statements in the sample perform the following functions:
-
The autonomoussystem statement tells
gated to use AS number 249 for its BGP or EGP
packets.
-
The routerid statement tells
gated to use 172.16.12.2 as the router identifier
for OSPF and BGP.
-
The martians statement prevents routes to 0.0.0.26
from being included in the table, but it allows routes to the private
IP addresses in the range 192.168.0.0 to 192.168.255.255.
| | | B.6. Interface Statements | | B.8. Protocol Statements |
Copyright © 2002 O'Reilly & Associates. All rights reserved.
|