|
Static routing has disadvantages, one of which
is that it cannot adapt to topology changes. However, you can configure
static routing to have limited adaptability by creating floating static
routes.
Floating static routes are static routes
configured with an administrative distance value that is greater than that
of the primary route (or routes). Essentially, floating static routes are
fallback routes, or backup routes, that do not appear in the routing table
until another route to the same destination fails. For example, assume that RTB is connected to network 10.0.0.0/8 via two
different links, as shown in Figure .
Also, assume that RTB's preferred route to network 10.0.0.0/8 is via RTC
because that link has a higher bandwidth. This route is learned by RIP.
RTB should use the slower link to 10.0.0.0/8 via RTA only if the primary
route fails. The route to RTA is statically configured.
To statically configure RTB so that it will
use the slower link to reach 10.0.0.0/8 after the RIP route
fails, you must use a floating static route as shown:
RTB(config)#ip route 10.0.0.0
255.0.0.0 1.1.1.1 130
This ip
route command includes an
administrative distance of 130. Recall that static routes have a default
administrative distance of 1 (see Figure ).
To create a static route that will float (that is, wait for another route
to fail before entering the routing table) you must manually set an
administrative distance value. This value must be greater than the primary
route's administrative distance value. In this example, the primary route
is learned by RIP and thus has an administrative distance of 120. By
configuring the static route with an administrative distance of 130, the
static route will be less desirable than the primary route and the RIP
route via RTC is always preferred. However, if the RIP route is lost, the
floating static route takes its place in the routing table. Figure
shows RTB's routing table with the RIP route and then, after the RIP route
is lost, RTB's routing table with the floating static route.
The output in Figure
includes output from the debug ip
routing command, which details the
loss of the primary route and the subsequent installation of the floating
static route.
Floating static routes can be used in
conjunction with other static routes to create a semi-adaptable static
routing scheme. Consider this configuration :
RTZ(config)#ip route 0.0.0.0 0.0.0.0
s0
RTZ(config)#ip route 0.0.0.0 0.0.0.0 s1 5
RTZ(config)#ip route 4.0.0.0 255.0.0.0 s2
RTZ(config)#ip route 4.0.0.0 255.0.0.0 s3 5
RTZ(config)#ip route 4.0.0.0 255.0.0.0 s4 10
If RTZ is configured with these commands,
it installs one route to 0.0.0.0/0 (using S0) and one route to
4.0.0.0/8 (using S2). If S0 becomes unavailable, RTZ will install the
floating static route to 0.0.0.0/0 (using S1) into its routing table. If
S2 fails, RTZ will fall back to using S3 to reach 4.0.0.0/8. Finally, if
both S2 and S3 go down, RTZ will use the least desirable static route to
4.0.0.0/8, with an administrative distance 10.
|