interfaces {
options
[ strictinterfaces ]
[ scaninterval time ]
;
interface interface_list
[ preference preference ]
[ down preference preference ]
[ passive ]
[ simplex ]
[ reject ]
[ blackhole ]
;
define address
[ broadcast address ] | [ pointtopoint address ]
[ netmask mask ]
[ multicast ]
;
} ;
An interface is the connection between a router and one of its
attached networks. A physical interface may be specified by interface
name, by IP address, or by domain name, (unless the network is an
unnumbered point-to-point network.) Multiple levels of reference in
the configuration language allow identification of interfaces using
wildcard, interface type name, or delete word address. Be careful
with the use of interface names as future Unix operating systems may
allow more than one address per interface. The interface_list is a
list of one or more interface names including wildcard names (names
without a number) and names which may specify more than one interface
or address, or the token all for all interfaces.
define statement. Without this option a
warning message will be issued but GateD will continue.
SIGUSR2.
all or a list of interface names (see
warning about interface names), domain names, or numeric
addresses. Options available on this statement are:
0.
120.
strictinterfaces is defined. Possible
define keywords are:
define
statement references the address of the host on the
remote end of the interface, the
address specified after this
pointopoint keyword defines the address on
the local side of the interface.
ie, and a unit number, like 0,
5 or 22. Reference to the name contain
only alphabetic characters and match any interfaces that have the
same alphabetic part.
For example, ie on a Sun would refer to all Interlan
Ethernet interfaces, le would refer to all Lance
Ethernet interfaces. But ie would not match
iel0.
ef1 will match an interface named
ef1, but not an interface named ef10.
For example, consider a system with three interfaces,
le0, le1 and du0.
rip yes {
interface all noripin noripout ;
interface le ripin ;
interface le1 ripout ;
} ;
RIP packets would only be accepted from interfaces le0
and le1, but not from du0. RIP packets
would only be sent on interface le1.
This define statement is only used in versions 3.5/4.0 of gated. Version 4.2/5.0/6.0 of gated provide alternative different syntax. (Click here to access the current documentation on the configuration language.)
interfaces {
define 192.168.12.5 broadcast 192.168.12.255. netmask 255.255.255.0 ;
define 192.168.13.129 netmask 255.255.255.252 broadcast 192.168.13.131;
# pointtopoint - is local side, 1st address is remote
define 192.168.13.116 pointtopoint 192.168.13.114 multicast;
};
The first define has a ethernet where you need to define the broadcast address as a /24.
The second define shows how a /30 may be implemented in the define statemet. The define tells gated to treat the interface with a local address of 192.168.13.129 a netmask of 255.255.255.248, and a broadcast of 192.168.13.131.
The third define shows how a point-to-point interface is defined. The remote side of the point-to-point interface is given first and the local side (the one on this machine) is given second.
The remote address must be unique amoung all the interface addresses on a given router. The local address may be shared amoung many point-to-point and up to one non-point-to-point interface. This is technically a form of the router id method for addressless links. This technique conserves subnets as none are required when using this technique.
If a subnet mask is specified on a point-to-point interface, it is only used by RIP verison 1 and HELLO to determine which subnets may be propagated to the router on the other side of this interface.
For point-to-point interfaces, gated installs some special routes. If the local address on one or more point-to-point intefaces is not shared with a non-point-to-point interface, gated installs a route to the local address pointing at the loopback interface with a preference of 110. This insures that packets originating on this host destined for this local address are handled locally. OSPF prefers to route packets for the local interface across the point-to-point link where they will be returned by the router on the remote end. This is used to verify operation of the link. Since OSPF installs routes with a preference of 10, these routes will override the route installed with a preference of 110.
If the local address of one or more point-to-point interfaces is shared with a non-point-to-point interface, gated installs a route to the local with a preference of 0 that will not be installed in the forwarding table. This is to prevent protocols like OSPF from routing packets to this address across a serial interface when this system could be functioning as a host.
When the status of an interface changes, GateD notifies all the protocols, which take the appropriate action. GateD assumes that interfaces which are not marked UP do not exist. While this might not be the most correct action, it is the way things currently work.
GateD ignores any interfaces that have invalid data for the local, remote or broadcast addresses or the subnet mask. Invalid data includes zeros in any field. GateD will also ignore any point-to-point interface that has the same local and remote addresses, it assumes it is in some sort of loopback test mode.