Group-number is an optional value with a default of 0. It can be any number from 0 to 255. priority-value is a number form 0 to 255 which indicates the priority a router should be given to become an active router. The higher the number, the more it will be preferred. The default setting is 100.
For example:
Router(config)#int fa0/0
Router(config-if)#ip address 10.1.1.1 255.255.255.0
Router(config-if)#standby 1 priority 200
Router(config-if)#standby 1 ip 10.1.1.65
1w0d: %STANDBY-6-STATECHANGE: Standby: 1:
FastEthernet0/0 state
Speak -> Standby
1w0d: %STANDBY-6-STATECHANGE: Standby: 1:
FastEthernet0/0 state
Standby -> Active
Comments (0)
By default, if the active router fails and is replaced by the backup, if that router were to come back up again it would not resume active status. However, if you would prefer the router do that, you can use the following command.
Router(config-if)#standbygroup-numberpreempt
This would be handy in a situation where a significantly less capable router is a backup for your main router. If the main router were to go down, the less-capable router would take over. However, once the main router came back up again, by default it would go into standby mode for the inferior router. With this command, it would resume operations as the main, active router.
Comments (0)
To change the default timer intervals, use the following commands:
Group-number is optional (default 0) and specifies to which group to apply the timer change. hellotime is the Hello interval in seconds. 1-255 are valid settings with 3 being the default. holdtime is the time between the last receipt of a hello message and the declaration that an active or standby router is down. 1-255 are valid settings with 10 being the default.
Comments (0)
In some situations, an interface on a router going down may have a detrimental effect on its importance as a router. Take the following example. An active router has a single link to the internet. The backup router also has a link to the internet. If the active router's internet link went down, it would remain the active router on the network, since it's network-side interface is still active (it's still broadcasting hello packets). However, all traffic sent to it would be sent back into the network to the backup router, which would then forward packets to the internet. This increases traffic on the local network, adds latency, and introduces an additional, unnecessary hop.
To combat this, one can use interface tracking. Interface tracking watches a specified interface and, should that interface go down, will automatically reduce the priority of the router. For instance, if a router has a priority of 150, interface tracking can be set to reduce its priority by 60 points if its internet connection drops. That way, if the internet link goes down, the priority of the router drops to 90. Another router with a default priority of 100 would then grab control of the active router position. The following flash animation should demonstrate the use of HSRP interface tracking.
HSRP tracking is configured with the following commands:
Router(config-if)#standbygroup-numbertracktype number interface-priority
An example of the syntax follows:
Router(config-if)#standby 1 track serial 0/0 100
This command applies to standby group 0 and tells the router to track serial port 0/0. If serial 0/0 were to go down, the router's priority (whatever that may be) gets decremented 100 points.
Comments (0)
Troubleshooting HSRP
The following commands can be used to troubleshoot HSRP.
show standby [type-number] [group] [brief]
This will show information about (a) standby group(s). The type, number, group, and brief keywords are optional and can be used to trim your output to be more or less specific
debug standby
This displays real-time information on HSRP states and packets for all standby groups on all interfaces.
debug standby condition interfacegroup
This allows setting conditions for standby debug. The interface must be a valid interface capable of supporting HSRP, while group needs to be a value of 0-255. You can set up conditions for a group prior to enabling it so you can watch HSRP initialize. Note that this command only set debug standby options... you still have to issue the debug standby command before debugging information is produced.
Following are examples of the usage of the above commands:
The first will show a brief synopsis of HSRP information for s0/0 regarding HSRP group 1. The second line sets 'debug standby' to only display information about s0/0 and HSRP group 1. The third line actually begins the debug.