Knowledge Base

Our knowledge base for your self-education


Design & Configure

NHRP: HSRP config (Cisco)

Technology: Routing
Area: NHRP
Vendor: Cisco
Software: 10.0, 10.2-3, 11.0-3, 12.0, 12.0T, 12.1, 12.1T
Platform: Catalyst platforms, Routing platforms

The Hot Standby Routing Protocol is a proprietary protocol from Cisco. It is a routing protocol that provides backup to a router in the event of link or hardware failure. Using HSRP, several routers are connected to the same segment of an Ethernet, FDDI or token-ring network and work together to present the appearance of a single virtual router on the LAN. The routers share the same IP and MAC addresses, therefore in the event of failure of one router, the hosts on the LAN are able to continue forwarding packets to a consistent IP and MAC address. The process of transferring the routing responsibilities from one device to another is transparent to the user. This technology is very useful in High-Availability network infrastructures.

how to configure hsrp on cisco ios

Before router will become an active it has to go through several HSRP states:

  • disabled,
  • initial – state which is entered through a configuration change or when an interface first becomes available,
  • learn – router still waits to hear from the active router,
  • listen –  router listens for hello messages form active/standby routers,
  • speak – router sends periodic hello messages and actively participates in the election of the active and/or standby router,
  • standby – router is a candidate to become the next active router and sends periodic hello messages,
  • active – router currently forwards packets that are sent to the group virtual MAC address. The router sends periodic hello messages.

How to configure HSRP on Cisco IOS?

To configure router 1 as active HSRP router follow commands bellow:

R1(config)# interface GigabitEthernet 0/1
R1(config-if)# ip address
R1(config-if)# standby 1 ip
R1(config-if)# standby 1 priority 105
R1(config-if)# standby 1 preempt delay minimum 10

To configure also router 2 as a standby HSRP router:

R2(config)# interface GigabitEthernet 0/1
R2(config-if)# ip address
R2(config-if)# standby 1 ip
R2(config-if)# standby 1 priority 120
R2(config-if)# standby 1 preempt delay minimum 10

Router with the the highest priority become the Active Router immediately. Priority is determined first by the value that is configured at the interface, and then by highest interface IP address. Default priority is set to 100. Changing standby priority will not take any results as long as preempt is not enabled.

To allow router advertise its routing table in the network, the preempt delay function comes in handy. Preempt delay feature delays preemption for a configurable period of time. This feature is disabled by default.

HSRP v1 vs. v2

Version 1 provides:

  • MAC addresses used: 0000.0c07.ac00 – 0000.0c07.acff,
  • Supported no. of groups: 256,
  • Default version,
  • Only clear text authentication,
  • Timers are not advertised or learned,
  • Active router will send hello messages with source MAC address of the HSRP virtual MAC address,
  • Hello packet multicast address is

Version 2 provides:

  • MAC address used: 0000.0c9f.f000 – 0000.0c9f.ffff,
  • Supported no. of groups: 4096,
  • Need to enable version 2 explicitly,
  • Supports MD5 authentication.
  • Timers can be advertised or learned,
  • Active router will send hello messages with source MAC address of the physical interface MAC address,
  • Hello packets multicast address is

Other features for v1 and v2:

  • HSRP versions 1 and 2 have different packets format,
  • Both are not compatible to each other – both sides of interfaces must have identical version.

More than 2 routers in HSRP group

One HSRP instance can only have 1 active and 1 standby routers. Every next configured router in this group will be participating in election but officially will never be a standby router. It will hang around and listen HSRP messages as long as it will not be needed. Change of router state from listen to standby will be preformed only if previous standby router will change its own status, e.g. from standby to active or its link goes down.

how to configure hsrp on cisco ios

To configure router 3 as a “backup standby” HSRP router:

R3(config)# interface GigabitEthernet 0/1
R3(config-if)# ip address
R3(config-if)# standby 1 ip
R3(config-if)# standby 1 priority 101
R3(config-if)# standby 1 preempt delay minimum 10

Notice that R3’s HSRP priority is set lower than R1’s and R2’s. Otherwise, when preempt is enabled, it could make change in standby/active routers what is not desired in production network.

Check also how to configure GLBP on Cisco IOS.
Check also how to configure VRRP on Cisco IOS.


Author: Łukasz Sadowski

Cisco SD-WAN Offer

Grandmetric delivers Cisco SD-WAN
and SD-WAN as a service.
We provide full portfolio
of Cisco sdwan routers from
C1000, ISR and industrial series.