B.9. static Statementsstatic statements define the static routes used by gated. A single static statement can specify several routes. The static statements occur after protocol statements and before control statements in the gated.conf file. To gated, static routes are any routes defined with static statements. However, unlike the routes in a static routing table, these routes can be overridden by routes with better preference values. The structure of a static statement is: static { [default] | [[host] address [mask mask | masklen n]] gateway gateways [interface interface_list] [preference preference] [retain] [reject] [blackhole] [noinstall] ; address [mask mask | masklen n] interface interface [preference preference] [retain] [reject] [blackhole] [noinstall] ; } ; The static statement has two different clauses. The one with the keyword gateway is the one you'll use. This clause contains information similar to that provided by the route command. A static route is defined as a destination address reached though a gateway. The format of this clause is:
The other static statement clause uses the keyword interface instead of the keyword gateway. Use this clause only if you have a single physical network with more than one network address -- a rare occurrence. ifconfig normally creates only one destination for each interface. This special form of the static statement adds additional destinations to the interface. address [mask mask | masklen number] interface interface The preference, retain, reject, blackhole, and noinstall options are the same as described above. The default preference of a static route is 60, which prefers static routes over several other routing sources. If you want other types of routes to override static routes, use the preference argument on the static statement to increase the preference number. (Remember that high preference values mean less-preferred routes.) The following example defines a static default route through gateway 172.16.12.1. The preference is set to 125 so that routes learned from RIP are preferred over this static route: static { default gateway 128.66.12.1 preference 125 ; } ; Copyright © 2002 O'Reilly & Associates. All rights reserved. |
|