Interface Tracking to Remove Static Route from Routing Table

In this blog post we'll see how to monitor an interface for its status based on which a static route can be tracked. The static route will be removed from routing table when the interface goes down


Create tracking object
RTR#conf t
RTR(config-track)# track 10 interface loopback 101 line-protocol
RTR(config-track)# delay down 5 up 10
RTR(config-track)# exit
In the above commands, delay indicates that the tracking will wait for 5 seconds after the interface goes down before updating the tracking status as down. And it will wait for 10 seconds after the interface comes up before making the tracking object as up.


Attach tracking object to static route that needs to be removed from routing table upon interface going down
RTR(config)# ip route 10.200.100.0 255.255.255.0 10.10.20.254 track 10
RTR(config)# exit
RTR# show track
Track 10
  Interface Loopback101 line-protocol
  Line protocol is Up
    1 change, last change 00:01:12
  Delay up 10 secs, down 5 secs
  Tracked by:
    Static IP Routing 0


Let's shut down the interface Loopback 101 and verify the tracking status
RTR#show track
Track 10
  Interface Loopback101 line-protocol
  Line protocol is Up, delayed Down (3 sec remaining) ((hw admin-down))
    1 change, last change 00:02:10
  Delay up 10 secs, down 5 secs
  Tracked by:
    Static IP Routing 0

RTR#show track
Track 10
  Interface Loopback101 line-protocol
  Line protocol is Down ((hw admin-down))
    2 changes, last change 00:00:06
  Delay up 10 secs, down 5 secs
  Tracked by:
    Static IP Routing

RTR#show ip route track-table
 ip route 10.200.100.0 255.255.255.0 10.10.20.254 track 10 state is [down]

After shutting down the interface, we can see that tracking object is visible as 'Down' and static route is removed from routing table.




Comments

Popular posts from this blog

Anyconnect SSL-Client VPN with Self-signed Certificate on Cisco ASA

Filtering Routes in BGP using Route-maps and Prefix-list

Open Shortest Path First (OSPF)

IKEv2 IPsec Site-to-Site VPN configuration on Cisco ASA 8.4(x)

IPsec VPN as a Backup for Point-to-Point Link using IP SLA

Border Gateway Protocol (BGP)

Bypassing Proxy Server in Google Chrome

Cisco ASA Active/Active Failover Configuration

Cisco ASA Active/Standby Failover Configuration