我们在工作中经常遇到HSRP,常见的方法是通过track物理接口实现优先级的调整,达到主备切换的目的。

但却时常有这类问题出现:一二层没有问题,三层无法PING通(路由协议或ARP等原因),HSRP这时无法检测并即时切换,从而造成故障隐患。

使用Object Tracking可以让HSRP track ip而不仅仅是接口。
相关资料:
1、http://www.cisco.com/en/US/docs/ ... _eot.html#wp1055799
2、https://supportforums.cisco.com/message/555294#555294


In the following example, the tracking process is configured to track the reachability of IP route 10.2.2.0/24: 
Router A Configuration 
track 100 ip route 10.2.2.0/24 reachability 
!
interface Ethernet0/0 
ip address 10.1.1.21 255.255.255.0
standby 1 preempt
standby 1 ip 10.1.1.1 
standby 1 priority 110 
standby 1 track 100 decrement 10 
Router B Configuration 
track 100 ip route 10.2.2.0/24 reachability
!
interface Ethernet0/0 
ip address 10.1.1.22 255.255.255.0
standby 1 preempt
standby 1 ip 10.1.1.1 
standby 1 priority 105
standby 1 track 100 decrement 10