There times when 2 Routers are connected to provide high availability to network and HSRP is configured on the LAN side of Routers with one acting as primary and other its HSRP backup. Such a setup would be good in some cases like ptp links on serial interfaces.However when we have Ethernet medium and direct link failure happens, HSRP cant respond to this scenario and still keeps of forwarding traffic unaware of the link failure. Below is an example scenario showing how HSRP can be configured to meet the indirect link failures by use of IP SLA configuration with HSRP.
Routers R1 and R2 have HSRP configured on LAN side (HSRP IP = 192.168.12.3). Both the routers have static routes pointing towards R3 on the remote side. In between we can see Switch SW2 which acts as layer 2 and connects segments of R1-R3 and R2-R3.
Interface FastEthernet0/0
ip address 192.168.12.1 255.255.255.0
standby 1 ip 192.168.12.3
standby 1 preempt
!
interface FastEthernet0/1
ip address 192.168.13.1 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 192.168.13.3R2#
interface FastEthernet0/0
ip address 192.168.12.2 255.255.255.0
standby preempt
standby 1 ip 192.168.12.3
standby 1 priority 90
standby 1 preempt
!
interface FastEthernet0/1
ip address 192.168.23.2 255.255.255.0
!
ip route 0.0.0.0 0.0.0.0 192.168.23.3
The solution can be reached if R1 monitors a remote IP – say Loopback 3.3.3.3 of R3 and decrements HSRP priority to a value lower than that of R2.
Now lets see how we can conifigure R1 to meet this requirement –
ip sla monitor 1
type echo protocol ipIcmpEcho 3.3.3.3
frequency 5
ip sla monitor schedule 1 life forever start-time now
!
track 1 rtr 1 reachability
!
interface FastEthernet0/0
standby 1 track 1 decrement 20
P indicates configured to preempt.
|
Interface Grp Prio P State Active Standby Virtual IP
Fa0/0 1 100 P Active local unknown 192.168.12.3R2#sh standby brief
P indicates configured to preempt.
|
Interface Grp Prio P State Active Standby Virtual IP
Fa0/0 1 90 P Standby 192.168.12.1 local 192.168.12.3
R3(config-if)#shut
R1#show standby brie
P indicates configured to preempt.
|
Interface Grp Prio P State Active Standby Virtual IP
Fa0/0 1 80 P Standby 192.168.12.2 local 192.168.12.3
R1#show standby brie
P indicates configured to preempt.
|
Interface Grp Prio P State Active Standby Virtual IP
Fa0/0 1 80 P Standby 192.168.12.2 local 192.168.12.3R2#show standby brief
P indicates configured to preempt.
|
Interface Grp Prio P State Active Standby Virtual IP
Fa0/0 1 90 P Active local 192.168.12.1 192.168.12.3
Related- Clear Counters of IP SLA