To setup HSRP on a pair of routers,
From the Interface Configuration Mode add the IP Address of the Interface
Set the Virtual IP Addresshsrp-router1#conf thsrp-router1(config)# int fa0/0hsrp-router1(config-if)# ip address 192.168.0.2 255.255.255.0
Sets the Virtual IP Address for the interface where "1" is the HSRP group and "188.8.131.52" is the Virtual IP for the HSRP group.
Enable Preempthsrp-router1(config-if)# standby 1 ip 192.168.0.1
This is required to make the router from being a Standby Router to an Active Router when it finds the Active Router is down or if it has become the higher priority router in the group
Set Router Priorityhsrp-router1(config-if)# standby 1 preempt
The default priority is "100". We set here as "110" to make the Router 1 as active.
Set Authentication Stringhsrp-router1(config-if)# standby 1 priority 110
This is an optional plain text 8 character string that can be used in the multicast "hello" packets to authenticate the HSRP group.
Set Timershsrp-router1(config-if)# standby 1 authentication LocalLAN
Sets the time period between the "hello" packets and the hold time before assuming an active router is down. Default is 3seconds and 10 seconds respectively.
Track Interfacehsrp-router1(config-if)# standby 1 timers 5 15
If you track interface to check link status then the following command will track an interface and when the tracked link is down, the active router will mark its priority low so as to allow a Standby router to take over.
Repeat the procedure altering the IP Address of the Local interface and the priority and the tracked interface.hsrp-router1(config-if)# standby 1 track se0/0
Thats it. HSRP configuration is complete. You may test the connectivity to a remote route and see for yourself the redudancy in place.hsrp-router2#conf thsrp-router2(config)# int fa0/0hsrp-router2(config-if)# ip address 192.168.0.3 255.255.255.0hsrp-router2(config-if)# standby 1 ip 192.168.0.1hsrp-router2(config-if)# standby 1 preempthsrp-router2(config-if)# standby 1 priority 100hsrp-router2(config-if)# standby 1 authentication LocalLANhsrp-router2(config-if)# standby 1 timers 5 15hsrp-router2(config-if)# standby 1 track se0/0