December 2006
Intermediate to advanced
1188 pages
72h 8m
English
You want to install a static route only when an interface fails or a prefix drops out of the routing table.
One of the interesting new features in IOS Versions 12.3T and 12.4 is the ability to track things like interface status or routing table objects. This first example shows how to create a static route that tracks an interface:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#track10interfaceSerial0/0line-protocolRouter(config-track)#delay down5upRouter(config-track)#30exitRouter(config)#ip route192.168.10.0 255.255.255.0 10.3.12.26trackRouter(config)#10endRouter#
This second example shows how to create a static route that tracks a prefix in the IP routing table:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#track11ip route10.2.95.0 255.255.255.0reachabilityRouter(config-track)#delay down5upRouter(config-track)#5exitRouter(config)#ip route0.0.0.0 0.0.0.010.3.12.26trackRouter(config)#11endRouter#
And the final example installs the static route when a combination of the previous conditions is met:
Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z. Router(config)#track12list boolean andRouter(config-track)#object10notRouter(config-track)#object11Router(config-track)#exitRouter(config)#ip route192.168.13.0 255.255.255.010.3.12.26