My Countingdown

Friday, December 16, 2011

Lab 2. IP Services - HSRP Track Route



Let’s make HSRP first in R1 and R2

R1#
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 12.12.12.1 255.255.255.0
 standby 1 ip 12.12.12.12
 standby 1 priority 110
 standby 1 preempt
 standby 1 authentication md5 key-string cisco
!
interface Serial0/0
 ip address 13.13.13.1 255.255.255.0
!
router eigrp 1
 network 0.0.0.0
 no auto-summary

R2#
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
 ip address 12.12.12.2 255.255.255.0
 standby 1 ip 12.12.12.12
 standby 1 preempt
 standby 1 authentication md5 key-string cisco
!
interface Serial0/0
 ip address 23.23.23.2 255.255.255.0
!
router eigrp 1
 network 0.0.0.0
 no auto-summary

R3#
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface Serial0/0
 ip address 13.13.13.3 255.255.255.0
!
interface Serial0/1
 ip address 23.23.23.3 255.255.255.0
!
router eigrp 1
 network 0.0.0.0
 no auto-summary

Verify hsrp before add route tracking

R1#show standby brief
                     P indicates configured to preempt.                     |
Interface   Grp  Pri  P State   Active          Standby         Virtual IP
Fa0/0        1    110 P Active  local           12.12.12.2      12.12.12.12

R2(config-if)#do sh stan bri
                     P indicates configured to preempt.                  |
Interface   Grp  Pri  P State   Active          Standby         Virtual IP
Fa0/0        1    100 P Standby 12.12.12.1      local           12.12.12.12

Now let’s add route tracking in R1. So if R1 doesn’t have 3.3.3.3/32 in routing table, the priority in R1 will decrease 20. Then the active HSRP will change to R2.

R1#
track 1 ip route 3.3.3.3 255.255.255.255 reachability
!
interface fa0/0
  standby 1 track 1 decrement 20

Let’s test by shutdown interface loopback 0 in R3 which is 3.3.3.3/32.

R3(config)#int lo0
R3(config-if)#shut

Just wait… then

*Mar  1 00:18:11.755: %TRACKING-5-STATE: 1 ip route 3.3.3.3/32 reachability Up->Down
R1(config-if)#
*Mar  1 00:18:12.899: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 1 state Active -> Speak
R1(config-if)#
*Mar  1 00:18:22.899: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 1 state Speak -> Standby

Verify HSRP

R1(config-if)#do sh stand brie
                     P indicates configured to preempt.                     |
Interface   Grp  Pri  P State   Active          Standby         Virtual IP
Fa0/0         1    90  P Standby 12.12.12.2      local           12.12.12.12

R2(config-if)#do sh stand bri
                     P indicates configured to preempt.                     |
Interface   Grp  Pri  P State   Active          Standby         Virtual IP
Fa0/0         1    100 P Active  local           12.12.12.1      12.12.12.12

No comments:

Post a Comment