HSRP Object Tracking

Answered Question
Jun 21st, 2007

I have 2 2811 routers with 1 T1 in each connecting to the main site. I'm running HSRP between the 2 routers and want to configure HSRP Object Tracking to track line protocol on the serial link so when the T1 goes down on the primary router, it will switch to the standby. My question is, how do I configure it, so it switches back to the original primary router once the link is up.

Here's a sample of my config:

Router A (primary):

track 100 interface Serial0/0/0:1 line-protocol

interface FastEthernet0/0

ip address x.x.x.2 255.255.255.0

standby 1 ip x.x.x.1

standby 1 priority 130

standby 1 preempt

standby 1 track 100 decrement 30

How do I configure my standby router B?

I have this problem too.
0 votes
Correct Answer by girish.malla about 9 years 5 months ago

Hi Gary,

I just tested in my lab, It is not required to put "standby 1 track 100 decrement" command on router B, Since you are only tracking the T1 link of router A.This commnad need only under router A's interfacefa0/0.

So the config will be as follows

Router A

=========

track 100 interface Serial0/0/0:1 line-protocol

interface FastEthernet0/0

ip address x.x.x.1 255.255.255.0

standby 1 ip x.x.x.3

standby 1 priority 130

standby 1 preempt

standby 1 track 100 decrement 30

Router B

=========

interface FastEthernet0/0

ip address x.x.x.2 255.255.255.0

standby 1 ip x.x.x.3

standby 1 priority 110

standby 1 preempt

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
girish.malla Thu, 06/21/2007 - 13:24

Hi Gary,

you can configure router B as follows

interface FastEthernet0/0

ip address x.x.x.3 255.255.255.0

standby 1 ip x.x.x.1

standby 1 priority 120

standby 1 preempt

"standby 1 track 100 decrement30" means when the T1 link goes down it will decrease the priority from 130 to 100. Then router B will have the highest priority and will be active. when the T1 will up the preempt command is already there in rouer A to switch back and become active.

gkushnir21 Fri, 06/22/2007 - 05:31

Hello Girish,

The Cisco document on Enhanced Object Tracking says that for Router B we should also put the decrement command. So, both Router A and Router B configs look the same except for the HSRP priority value. That confuses me, why is the standby router configured to decrement as well.

So, the config for router B would look like this:

track 100 interface Serial0/0/0:1 line-protocol

interface FastEthernet0/0

ip address x.x.x.3 255.255.255.0

standby 1 ip x.x.x.1

standby 1 priority 110

standby 1 preempt

standby 1 track 100 decrement 30

Correct Answer
girish.malla Fri, 06/22/2007 - 06:12

Hi Gary,

I just tested in my lab, It is not required to put "standby 1 track 100 decrement" command on router B, Since you are only tracking the T1 link of router A.This commnad need only under router A's interfacefa0/0.

So the config will be as follows

Router A

=========

track 100 interface Serial0/0/0:1 line-protocol

interface FastEthernet0/0

ip address x.x.x.1 255.255.255.0

standby 1 ip x.x.x.3

standby 1 priority 130

standby 1 preempt

standby 1 track 100 decrement 30

Router B

=========

interface FastEthernet0/0

ip address x.x.x.2 255.255.255.0

standby 1 ip x.x.x.3

standby 1 priority 110

standby 1 preempt

smothuku Fri, 06/22/2007 - 02:33

Hi ,

The config of both the routers is as below...

** connect the f0/1 of both the routers back to abck and assign ip address to both fastethernet interfaces...

Why we are doing it is whenever T1 connecting to router A goes down the traffic will flow through as below...

RTR A (f0/1) -> (F0/1) RTR B (Serail)-->mainoffice...

RTRA :

int f0/0

ip address x.x.x.2 255.255.255.0

standby 1 ip x.x.x.1

standby 1 preempt

standby 1 priority 150

standby track serial 0/0/0:1

int f0/1

ip address x.x.x.1 255.255.255.0

ip route x.x.x.x x.x.x.x s0/0/0:1

ip route x.x.x.x x.x.x.x f0/1 30 (flotic static route) (whenever serail of RTR A goes down traffic will be flown as shown above..)

RTR B :

int f0/0

ip address x.x.x.3 255.255.255.0

standby 1 ip x.x.x.1

standby 1 preempt

standby track serial 0/0/0:1

int f0/1

ip address x.x.x.2 255.255.255.0

ip route x.x.x.x x.x.x.x serial 0/0/0:1

when you see the above config...RTR B HSRP priority is default one i.e 100...

RTR A is the active router and router B is the standby router...

NOte : whenever T1 of RTR A comes back then Traffic switches to RTR A from RTR B because RTR A has Highest HSRP priority..

Thanks,

Satish

Actions

This Discussion