[c-nsp] Forcing all HSRP interfaces to failover

Phil Mayers p.mayers at imperial.ac.uk
Fri Apr 24 07:30:27 EDT 2009


Ross Vandegrift wrote:
> Hi everyone,
> 
> Is there any good way to have IOS abdicate the active status on all of
> its HSRP interfaces?  Of course I could change each of a few thousand
> SVIs, but I'd like a better way.
> 
> The only thing I can come up with is to create an unnumbered loopback
> just to use as a tracking target.  Admin down that interface when you
> want to take down one of the routers for maintenance.

What platform/IOS? Under later IOS e.g. SXH/SXI on 6500 you can track 
the tracking "objects". We do this:

track 10 interface Vlan4000 ip routing
track 11 interface Vlan4001 ip routing
track 100 stub-object
  default-state up
track 101 list boolean or
  object 10
  object 11

int VlanXX
  standby 0 track 100 decrement 4
  standby 0 track 101 decrement 4
  standby 0 preempt delay reload 180


...and then do:

conf t
track 100
default-state down

...or use an EEM script to put the tracking object "down". Obviously the 
EEM script opens up a load more possibilities.

Note you can also do this:

int VlanXX
  standby 0 track 100 shutdown

...which will shutdown the HSRP group, but you'll then have to wait for 
the timers to expire - I prefer the priority decrement with appropriate 
pre-empt statements on the standby/master.

Some versions of IOS have HSRP "follow groups":

http://www.cisco.com/en/US/docs/ios/ipapp/configuration/guide/ipapp_hsrp.html#wp1055821

...but on the switch platforms e.g. 6500 this seems to work with 
sub-ints only, not SVIs. Sigh.


More information about the cisco-nsp mailing list