Tải bản đầy đủ
[Appendix B] B.6 Interface Statements

[Appendix B] B.6 Interface Statements

Tải bản đầy đủ

[Appendix B] B.6 Interface Statements

[passive]
[simplex]
[reject]
[blackhole] ;
define address
[broadcast address] | [pointtopoint address]
[netmask mask]
[multicast] ;
};
The configuration options defined before the interface list are global options. The global options are:
strictinterfaces
Generates a fatal error if an interface is referenced in the configuration file that is not found
when gated scans the kernel at startup and is not listed in a define statement. (See the define
option later in this section.) Normally a warning message is issued and gated continues
running.
scaninterval time
Specifies how often gated scans the kernel interface list for changes. The default is every 15
seconds on most systems, and 60 seconds on systems that pass interface status changes through
the routing socket, e.g., BSD 4.4. Note that gated also scans the interface list on receipt of a
SIGUSR2.
The interface command defines the interface_list and all of the options that affect the
specified interfaces. Options available on this statement are:
preference preference
Sets the preference for this interface. The value preference is a number between 0 and 255.
gated prefers routes through interfaces with low preference numbers. The default preference
for all directly attached network interfaces is 0.
down preference preference
Sets the preference used when gated believes an interface is not functioning properly. The
default is 120.
passive
Prevents gated from downgrading the preference of the interface when it is not functioning
properly. gated assumes that an interface is down when it stops receiving routing information
through that interface. gated only performs this check if the interface is actively participating
in a routing protocol.
simplex

file:///C|/mynapster/Downloads/warez/tcpip/appb_06.htm (2 of 3) [2001-10-15 09:19:14]

[Appendix B] B.6 Interface Statements

Specifies that gated should not use packets generated by this system as an indication that the
interface is functioning properly. Only packets from remote systems are used to indicate that
the interface is operating.
reject | blackhole
Either of these keywords identifies the interface as the "blackhole interface" used to install
rejected routes in the kernel. (See the control statements for more about rejected routes.) This
is available only on BSD systems that have installed a reject/blackhole pseudo-interface.
The define address command lists interfaces that might not be present when gated scans the kernel
interface list at startup. It overrides the strictinterfaces option for the interface defined by address.
Possible options for the define command are:
broadcast address
Defines the broadcast address.
pointopoint address
Defines the local address for a point-to-point interface. (See Chapter 6, Configuring the
Interface for a discussion of point-to-point interfaces.) When this option is used, the address on
the define statement specifies the address of the remote host, and the address specified after the
pointopoint keyword defines the local address. Don't use both broadcast and pointopoint in
the same define.
netmask mask
Defines the subnet mask.
multicast
Specifies that the interface supports multicasting.

Previous: B.5 Options
Statements
B.5 Options Statements

TCP/IP Network
Administration
Book Index

Next: B.7 Definition
Statements
B.7 Definition Statements

[ Library Home | DNS & BIND | TCP/IP | sendmail | sendmail Reference | Firewalls | Practical Security ]

file:///C|/mynapster/Downloads/warez/tcpip/appb_06.htm (3 of 3) [2001-10-15 09:19:14]

[Appendix B] B.7 Definition Statements

Previous: B.6 Interface
Statements

Appendix B
A gated Reference

Next: B.8 Protocol
Statements

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.

file:///C|/mynapster/Downloads/warez/tcpip/appb_07.htm (1 of 2) [2001-10-15 09:19:14]

[Appendix B] B.7 Definition Statements

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.

Previous: B.6 Interface
Statements
B.6 Interface Statements

TCP/IP Network
Administration
Book Index

Next: B.8 Protocol
Statements
B.8 Protocol Statements

[ Library Home | DNS & BIND | TCP/IP | sendmail | sendmail Reference | Firewalls | Practical Security ]

file:///C|/mynapster/Downloads/warez/tcpip/appb_07.htm (2 of 2) [2001-10-15 09:19:14]