Home > HSRP IP Route Tracking

HSRP IP Route Tracking

May 13th, 2013 in Guide Go to comments

In this article we will discuss about HSRP and do a lab on it.

Quick reminder about HSRP

+ Hot Standby Router Protocol (HSRP) is a Cisco proprietary protocol.
+ With HSRP, two or more devices support a virtual router with a fictitious MAC address and unique IP address
+ Hosts use this IP address as their default gateway and the MAC address for the Layer 2 header
+ The virtual router’s MAC address is 0000.0c07.ACxx , in which xx is the HSRP group. Multiple groups (virtual routers) are allowed.
+ The Active router forwards traffic. The Standby router is backup and monitors periodic hellos (multicast to,
UDP port 1985) to detect a failure of the active router.
+ The active router is chosen because it has the highest HSRP priority (default priority is 100). In case of a tie, the router
with the highest configured IP address wins the election
+ A new router with a higher priority does not cause an election unless it is configured to preempt.

HSRP States

+ Initial: HSRP is not running.
+ Learn: The router does not know the virtual IP address and is waiting to hear from the active router.
+ Listen: The router knows the IP and MAC of the virtual router, but it is not the active or standby router.
+ Speak: Router sends periodic HSRP hellos and participates in the election of the active router.
+ Standby: Router monitors hellos from active router and assumes responsibility if active router fails.
+ Active:Router forwards packets on behalf of the virtual router.

Load balancing traffic across two uplinks to two HSRP routers with a single HSRP group is not possible. The trick is to use two
HSRP groups:
+ One group assigns an active router to one switch.
+ The other group assigns another active router to the other switch.

(Reference: SWITCH official Certification Guide)

That is all for the boring HSRP theory, let do a lab to understand more about HSRP! We will use the topology below for this lab:


IOS used: c3640-jk9s-mz.124-16.bin

Tasks in this lab:

+ Configure IP addresses as shown and run EIGRP on R2, R3, R4
+ Configure HSRP: R2 is the Active HSRP while R3 is the Standby HSRP
+ Tracking route to, traffic should goes to R3 once the route to is lost in R2 or the metric to R4’s loopback interface increases.

IP Address and EIGRP Configuration

R1 (configured as a host)
no ip routing
ip default-gateway //This is the virtual IP of HSRP group
interface FastEthernet0/0
ip address
no shutdown
interface FastEthernet0/0
ip address
no shutdown
interface FastEthernet1/0
ip address
no shutdown
router eigrp 1
interface FastEthernet0/0
ip address
no shutdown
interface FastEthernet1/0
ip address
no shutdown
router eigrp 1
interface Loopback0
ip address
interface FastEthernet0/0
ip address
no shutdown
interface FastEthernet1/0
ip address
no shutdown
router eigrp 1

HSRP Configuration

interface FastEthernet0/0
standby 10 ip
standby 10 priority 200
standby 10 preempt
interface FastEthernet0/0
standby 10 ip
standby 10 priority 150
standby 10 preempt

Note: The virtual IP address of HSRP group must be in the same subnet of the IP address on this interface (Fa0/0)

After entering above commands we will see R2 takes Active state after going from Speak to Standby:

%HSRP-5-STATECHANGE: FastEthernet0/0 Grp 10 state Speak -> Standby
*Mar 1 00:10:22.487: %HSRP-5-STATECHANGE: FastEthernet0/0 Grp 10 state Standby -> Active
*Mar 1 00:10:22.871: %SYS-5-CONFIG_I: Configured from console by console

The “show standby” command on R2 confirms its state:


Now R2 is in HSRP Active state with virtual MAC address of 00000c07.ac0a. Notice that the last two numbers of the MAC address (0a) is the HSRP group number in hexadecimal form (0a in hexa = 10 in decimal)

The “show standby” command on R3 reveals it is in Standby state:


Now we will see what happens if we turn off interface Fa0/0 on R2:
R2(config)#interface fa0/0



As we can see, the HSRP state of R2 went back to Init while the HSRP state of R3 moved to Active.

HSRP Tracking IP Route

In this part instead of tracking an interface going up or down we can track if the metric of a route to a destination changes or not. In particular we will try to track the route to the loopback interface of R4 ( First we should check the routing table of R2:


We learn that the metric to the loopback interface of R4 ( is 156160 and is summarized to prefix because EIGRP summarizes route by default.

Now add tracking ip routing to R2

R2(config)#track 1 ip route metric threshold
R2(config-track)#threshold metric up 61 down 62

and on interface fa0/0 add these commands to apply the track:

R2(config)#interface fa0/0
R2(config-if)#standby 10 track 1 decrement 60

The command track ip route metric threshold is used to track the metric change of a route. For example in this case the second command threshold metric up 61 down 62 specifies the low and high thresholds.

up: Specifies the up threshold. The state is up if the scaled metric for that route is less than or equal to the up threshold. The default up threshold is 254.
down: Specifies the down threshold. The state is down if the scaled metric for that route is greater than or equal to the down threshold. The default down threshold is 255.

Then, how do we indicate the up value should be 61 and down value should be 62? This is because EIGRP routes are scaled by means of 2560 so if we divide the EIGRP metric (156160 in this case) by 2560 we will get 61 (156160 / 2560 = 61). 2560 is the default metric resolution value for EIGRP and can be modified by the track resolution command (for example: track resolution ip route eigrp 400). The table below lists the metric resolution for popular routing protocols.

Routing protocol Metric Resolution
Static 10
EIGRP 2560
RIP is scaled directly to the range from 0 to 255 because its maximum metric is less than 255

In this case if the metric for route to in the routing table is less than or equal to 61 then the state is up. If the metric is greater or equal to 62, the state is down. We can verify if the track is working correctly by the show track command.


When the state is Down, R2’s priority will be deduced by 60: 200 – 60 = 140 which is less than the priority of R3 (150) -> R3 will take the Active state of R2.



A very important note we wish to mention here is: the route for tracking should be exactly same as displayed in the routing table or the track would go down because no route is found. For example if we try tracking the route to the more specific route or the track would go down because EIGRP summarizes route by default before advertising through another major network. Let’s try this!

R2(config)#no track 1 ip route metric threshold
R2(config)#track 1 ip route metric threshold
R2(config-track)#threshold metric up 61 down 62

Now check if the track is working or not:


The track on R2 goes down so R2’s priority is reduced by 60 which causes R3 takes the Active state.

In this case if we wish to bring up the track route to we just need to use the “no auto-summary” command on R4 which causes R4 to advertise the more specific route of

R4(config)#router eigrp 1
R4(config-router)#no auto-summary

Now R4 advertises the detailed network and it matches with our tracking process so the tracking process will go up.



The GNS3 initial and final configs can be downloaded here:

Initial Configs: https://www.networktut.com/download/HSRP_initial.zip
Final Configs: https://www.networktut.com/download/HSRP_finalConfigs.zip

(Good reference: http://www.cisco.com/en/US/docs/ios/12_2sb/feature/guide/sbaiptrk.html)

Comments (28) Comments
Comment pages
1 2 3 324
  1. Anonymous
    September 24th, 2016

    you are rockkkkkkkkkkkkkkkkk starrrrrrrrrrrrrrrrrrrrrrrrrrrrr…make me fully impressed

  2. ccnp
    November 9th, 2016

    do they mail your certificate automatically or do you have to pay for it???

  3. Anonymous
    November 16th, 2016

    good explanation

  4. Maani
    November 16th, 2016

    Thanks Networktut :)

  5. blog
    December 17th, 2016

    You’ll find it practically impossible to encounter well-informed people on this issue, however , you appear like you fully grasp exactly what you’re raving about! Excellent


  6. Queen
    January 10th, 2017

    breaking dawn mp3 – myfreemp3.review/search/breaking-dawn-mp3/
    download free music

  7. edi
    January 26th, 2017

    excellent explanation! Thank you Networktut!

  8. Anonymous
    February 27th, 2017


  9. Anonymous
    February 27th, 2017

    does any body know where to find 642-691 CCIP BGP + MPLS Exam (BGP + MPLS) sims? any help will be apperciated.

  10. AJ
    August 28th, 2017

    thanks for the tutorial

  11. Anonymous
    September 26th, 2017


  12. jou
    December 7th, 2017

    Why HSRP changes so fast if dead timer is 10s?

  13. Lorraine Montano
    January 2nd, 2018

    I do acdept aas true with all of the ideas you have offered to your post.
    They’re very convincing and can definitely work.
    Nonetheless, the posts are very brief for novices. Could you please extend thhem a little from subsequent time?

    Thanks for the post.

  14. stau
    January 24th, 2018

    Can anyone help where to get a free copy of GNS3 I am new to this forum and apology for that. I need it to run HSRP prac. Thanks.

  15. Edu Aguirre
    February 2nd, 2018

    No need to apologize for that, if you want a free copy of GNS3 you can find it using the below link, it is pretty usefull.


    I hope that helps.

  16. Anonymous
    February 28th, 2018


    Instant DOWNLOAD
    Copy below Link:

    thnku all
    passed with 9xx no removed lab..
    12 ticket
    4 dnd
    2 mcq
    i lab bgp

    thnx all who cmnt and share experience here..
    All this files in link above enough to secure pass easily.

  17. Anonymous
    May 28th, 2018


  18. forsho
    June 7th, 2018

    I think you have noted some very interesting points, thank you for
    the post. http://www.afasdffsdfasfewfe.com

  19. forsho is fake
    August 15th, 2018

    don’t click forsho’s link!

  20. Michael
    September 21st, 2018

    Please help me CCNP Tshoot Dump latest file.
    I have to take exam soon. Please help!

  21. PingPong
    December 7th, 2018

    Excellent explanation @Networktut, thanks!

  22. Anonymous
    April 5th, 2019

    Super tutorial made so easy to understand

  23. Anonymous
    June 24th, 2019

    Thanks for sharing this fantastic explanation!

  24. kloo
    June 27th, 2019

    The best preparation for the Cisco exam, I passed the cisco exam with the help of it.
    good luck guys

  25. PingPong
    November 22nd, 2019
    Web Server


    R1 Lo6 2026::102:1




    DSW1══════DSW2 Lo0 2026::102:1



  26. TopoLongshoot
    December 4th, 2019 | |-( HSRP)-|
    | | | | DHCP| | 10.2.1.x
    v6 1 2026::12:x 2-1 2026::1:x 2-1 2026::34:x 2-1 2026::2:x 2

  27. TopoLongShoot2
    December 4th, 2019…………….…….………………………….……………|-( HSRP)-|

  28. peternetworktutmember
    January 27th, 2020

    Great explanation, especially the metric/track resolution part!
    Big thanks!

Comment pages
1 2 3 324