Guest

Cisco IOS Software Releases 12.3 T

Hot Standby Router Protocol Version 2

Table Of Contents

Hot Standby Router Protocol Version 2

Contents

Restrictions for HSRP Version 2

Information About HSRP Version 2

HSRP Version 2 Feature Design

How to Configure HSRP Version 2

Changing to HSRP Version 2

Configuration Examples for HSRP Version 2

HSRP Version 2: Example

Additional References

Related Documents

Standards

MIBs

RFCs

Technical Assistance

Command Reference

show standby

standby ip

standby version


Hot Standby Router Protocol Version 2


The Hot Standby Router Protocol (HSRP) Version 2 feature was introduced to prepare for further enhancements and to expand the capabilities beyond what is possible with HSRP version 1. HSRP version 2 has a different packet format than HSRP version 1.

Feature History for the Hot Standby Router Protocol Version 2 Feature

Release
Modification

12.3(4)T

This feature was introduced.

12.2(25)S

This feature was integrated into Cisco IOS Release 12.2(25)S.


Finding Support Information for Platforms and Cisco IOS Software Images

Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.

Contents

Restrictions for HSRP Version 2

Information About HSRP Version 2

How to Configure HSRP Version 2

Configuration Examples for HSRP Version 2

Additional References

Command Reference

Restrictions for HSRP Version 2

HSRP version 2 is not available for ATM interfaces running LAN emulation.

HSRP version 2 will not interoperate with HSRP version 1. An interface cannot operate both version 1 and version 2 because both versions are mutually exclusive. However, the different versions can be run on different physical interfaces of the same router. You cannot change from version 2 to version 1 if you have configured groups above the group number range allowed for version 1 (0 to 255).

Information About HSRP Version 2

To use the HSRP version 2 feature, you should understand the following concept:

HSRP Version 2 Feature Design

HSRP Version 2 Feature Design

HSRP version 2 is designed to address the following issues relative to HSRP version 1:

Previously, millisecond timer values are not advertised or learned. HSRP version 2 advertises and learns millisecond timer values. This change ensures stability of the HSRP groups in all cases.

Group numbers are restricted to the range from 0 to 255. HSRP version 2 expands the group number range from 0 to 4095.

HSRP version 2 provides improved management and troubleshooting. With HSRP version 1, there is no method to identify from HSRP active hello messages which physical router sent the message because the source MAC address is the HSRP virtual MAC address. The HSRP version 2 packet format includes a 6-byte identifier field that is used to uniquely identify the sender of the message. Typically, this field is populated with the interface MAC address.

The multicast address 224.0.0.2 is used to send HSRP hello messages. This address can conflict with Cisco Group Management Protocol (CGMP) leave processing.

Version 1 is the default version of HSRP.

HSRP version 2 uses the new IP multicast address 224.0.0.102 to send hello packets instead of the multicast address of 224.0.0.2, which is used by version 1. This new multicast address allows CGMP leave processing to be enabled at the same time as HSRP.

HSRP version 2 permits an expanded group number range, 0 to 4095, and consequently uses a new MAC address range 0000.0C9F.F000 to 0000.0C9F.FFFF. The increased group number range does not imply that an interface can, or should, support that many HSRP groups. The expanded group number range was changed to allow the group number to match the VLAN number on subinterfaces.

When the HSRP version is changed, each group will reinitialize because it now has a new virtual MAC address.

HSRP version 2 has a different packet format than HSRP version 1. The packet format uses a type-length-value (TLV) format. HSRP version 2 packets received by an HSRP version 1 router will have the type field mapped to the version field by HSRP version 1 and subsequently ignored.

The Gateway Load Balancing Protocol (GLBP) also addresses the same issues relative to HSRP version 1 that HSRP version 2 does. See the Gateway Load Balancing Protocol feature document for more information on GLBP.

How to Configure HSRP Version 2

This following section describes configuration tasks for HSRP version 2:

Changing to HSRP Version 2 (required)

Changing to HSRP Version 2

This task describes how to change to HSRP version 2.

SUMMARY STEPS

1. enable

2. configure terminal

3. interface type number

4. ip address ip-address mask

5. standby version {1 | 2}

6. standby [group-number] ip [ip-address [secondary]]

7. end

8. show standby

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure terminal

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

interface type number

Example:

Router(config)# interface vlan 400

Configures an interface type and enters interface configuration mode.

Step 4 

ip address ip-address mask

Example:

Router(config-if)# ip address 10.10.28.1 255.255.255.0

Sets an IP address for an interface.

Step 5 

standby version {1 | 2 }

Example:

Router(config-if)# standby version 2

Changes the HSRP version.

Step 6 

standby [group-number] ip [ip-address [secondary]]

Example:

Router(config-if)# standby 400 ip 10.10.28.5

Activates HSRP.

The group number range for HSRP version 2 is expanded to 0 through 4095. The group number range for HSRP version 1 is 0 through 255.

Step 7 

end

Example:

Router(config-if)# end

Ends the current configuration session and returns to privileged EXEC mode.

Step 8 

show standby

Example:

Router> show standby

(Optional) Displays HSRP information.

HSRP version 2 information will be displayed if configured.

Configuration Examples for HSRP Version 2

This section provides the following configuration example:

HSRP Version 2: Example

HSRP Version 2: Example

The following example shows how to configure HSRP version 2 on an interface with a group number of 350:

! 
interface vlan350
 standby version 2
 standby 350 ip 172.20.100.10 
 standby 350 priority 110 
 standby 350 preempt 
 standby 350 timers 5 15

Additional References

The following sections provide references related to HSRP Version 2.

Related Documents

Related Topic
Document Title

HSRP configuration tasks

"Configuring IP Services" chapter in the Cisco IOS IP Configuration Guide

HSRP commands: complete command syntax, command mode, defaults, usage guidelines, and examples

Cisco IOS IP Command Reference, Volume 1 of 4: Addressing and Services, Release 12.3 T

GLBP configuration tasks

Gateway Load Balancing Protocol feature document, Release 12.2(15)T


Standards

Standards
Title

No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.


MIBs

MIBs
MIBs Link

No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature.

To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

http://www.cisco.com/go/mibs


RFCs

RFCs
Title

No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.


Technical Assistance

Description
Link

Technical Assistance Center (TAC) home page, containing 30,000 pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.

http://www.cisco.com/public/support/tac/home.shtml


Command Reference

This section documents new and modified commands. All other commands used with this feature are documented in the Cisco IOS Release 12.3 T command reference publications.

show standby

standby ip

standby version

show standby

To display Hot Standby Router Protocol (HSRP) information, use the show standby command in user EXEC or privileged EXEC mode.

show standby [type number [group]] [active | init | listen | standby] [brief]

Syntax Description

type number

(Optional) Interface type and number for which output is displayed.

group

(Optional) Group number on the interface for which output is displayed.

active

(Optional) Displays HSRP groups in the active state.

init

(Optional) Displays HSRP groups in the initial state.

listen

(Optional) Displays HSRP groups in the listen or learn state.

standby

(Optional) Displays HSRP groups in the standby or speak state.

brief

(Optional) A single line of output summarizes each standby group.


Command Modes

User EXEC
Privileged EXEC

Command History

Release
Modification

10.0

This command was introduced.

12.1(3)T

The following keywords were added:

active

init

listen

standby

12.2(8)T

The output for the command was made clearer and easier to understand.

12.3(2)T

The output was enhanced to display information about Message Digest 5 (MD5) authentication.

12.3(4)T

The output was enhanced to display information about HSRP version 2.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.


Usage Guidelines

To specify a group, you must specify an interface type and number.

Examples

The following is sample output from the show standby command when HSRP version 2 is configured:

Router# show standby

Ethernet0/1 - Group 1 (version 2)
  State is Speak
  Virtual IP address is 10.21.0.10
  Active virtual MAC address is unknown
   Local virtual MAC address is 0000.0c9f.f001 (v2 default)
  Hello time 3 sec, hold time 10 sec
   Next hello sent in 1.804 secs
  Preemption enabled
  Active router is unknown
  Standby router is unknown
  Priority 20 (configured 20)
  IP redundancy name is "hsrp-Et0/1-1" (default)

Ethernet0/2 - Group 1
  State is Speak
  Virtual IP address is 10.22.0.10
  Active virtual MAC address is unknown
    Local virtual MAC address is 0000.0c07.ac01 (v1 default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 1.804 secs
  Preemption disabled
  Active router is unknown
  Standby router is unknown
  Priority 90 (default 100)
    Track interface Serial2/0 state Down decrement 10
  IP redundancy name is "hsrp-Et0/2-1" (default)

The following is sample output from the show standby command:


Router# show standby

Ethernet0/1 - Group 1
  State is Active
    2 state changes, last state change 00:30:59
  Virtual IP address is 10.1.0.20
    Secondary virtual IP address 10.1.0.21
  Active virtual MAC address is 0004.4d82.7981
    Local virtual MAC address is 0004.4d82.7981 (bia)
  Hello time 4 sec, hold time 12 sec
    Next hello sent in 1.412 secs
  Preemption enabled, min delay 50 sec, sync delay 40 sec
  Active router is local
  Standby router is 10.1.0.6, priority 75 (expires in 9.184 sec)
  Priority 95 (configured 120)
    Tracking 2 objects, 0 up
      Down Interface Ethernet0/2, pri 15
      Down Interface Ethernet0/3
  IP redundancy name is "HSRP1", advertisement interval is 34 sec

The following is sample output from the show standby command with an interface and the brief and init keywords specified:

Router# show standby ethernet0/1 1 init brief

Interface   Grp Prio P State    Active addr     Standby addr    Group addr     
Et0         0   120    Init     10.0.0.1        unknown         10.0.0.12 

The following is sample output from the show standby command when HSRP MD5 authentication is configured:


Router# show standby

Ethernet0/1 - Group 1
  State is Active
    5 state changes, last state change 00:17:27
  Virtual IP address is 10.21.0.10
  Active virtual MAC address is 0000.0c07.ac01
    Local virtual MAC address is 0000.0c07.ac01 (default)
  Hello time 3 sec, hold time 10 sec
    Next hello sent in 2.276 secs
  Authentication MD5, key-string "f33r45", timeout 30 secs
  Preemption enabled
  Active router is local
  Standby router is unknown
  Priority 110 (configured 110)
  IP redundancy name is "hsrp-Et0/1-1" (default)

Table 1 describes the significant fields shown in the displays.

Table 1 show standby Field Descriptions 

Field
Description

Ethernet - Group

Interface type and number and Hot Standby group number for the interface. If HSRP version 2 is configured, the version number is shown in parentheses.

State is

State of local router; can be one of the following:

Active—Indicates the current Hot Standby router.

Standby—Indicates the router next in line to be the Hot Standby router.

Speak—Router is sending packets to claim the active or standby role.

Listen—Router is neither in the active nor standby state, but if no messages are received from the active or standby router, it will start to speak.

Learn—Router is neither in the active nor standby state, nor does it have enough information to attempt to claim the active or standby roles.

Init or Disabled—Router is not yet ready or able to participate in HSRP, possibly because the associated interface is not up. HSRP groups configured on other routers on the network that are learned via snooping are displayed as being in the Init state. Locally configured groups with an interface that is down or groups without a specified interface IP address appear in the Init state. For these cases, the Active addr and Standby addr fields will show "unknown." The state is listed as disabled in the fields when the standby ip command has not been specified.

Virtual IP address is, secondary virtual IP addresses

All secondary virtual IP addresses are listed on separate lines. If one of the virtual IP addresses is a duplicate of an address configured for another device, it will be marked as "duplicate." A duplicate address indicates that the router has failed to defend its Address Resolution Protocol (ARP) cache entry.

Active virtual MAC address

Virtual MAC address being used by the current active router.

Local virtual MAC address

Virtual MAC address that would be used if this router became the active router. The origin of this address (displayed in parentheses) can be "default," "bia," (burned-in address) or "confgd" (configured).

Hello time, hold time

The hello time is the time between hello packets (in seconds) based on the command. The hold time is the time (in seconds) before other routers declare the active or standby router to be down, based on the standby timers command. All routers in an HSRP group use the hello and hold-time values of the current active router. If the locally configured values are different, the variance appears in parentheses after the hello time and hold-time values.

Next hello sent in ...

Time in which the Cisco IOS software will send the next hello packet (in hours:minutes:seconds).

Authentication...

Authentication type configured based on the standby authentication command.

key string

Key string used for authentication. Key chains are displayed if configured.

timeout

Duration (in seconds) that HSRP will accept message digests based on both the old and new keys.

Preemption enabled, sync delay

Indicates whether preemption is enabled. If enabled, the minimum delay is the time a higher-priority nonactive router will wait before preempting the lower-priority active router. The sync delay is the maximum time (in seconds) a group will wait to synchronize with the IP redundancy clients.

Active router is

Value can be "local," "unknown," or an IP address. Address (and the expiration date of the address) of the current active Hot Standby router.

Standby router is

Value can be "local," "unknown," or an IP address. Address (and the expiration date of the address) of the "standby" router (the router that is next in line to be the Hot Standby router).

expires in

Time (in hours:minutes:seconds) in which the standby router will no longer be the standby router if the local router receives no hello packets from it.

Tracking

List of interfaces that are being tracked and their corresponding states. Based on the standby track command.

IP redundancy name is

Name of IP redundancy service. The default name is derived from the interface and group number.


Related Commands

Command
Description

standby authentication

Configures an authentication string for the HSRP.

standby ip

Activates the HSRP.

standby mac-address

Specifies the virtual MAC address for the virtual router.

standby mac-refresh

Refreshes the MAC cache on the switch by periodically sending packets from the virtual MAC address.

standby preempt

Configures HSRP preemption and preemption delay.

standby priority

Configures Hot Standby priority of potential standby routers.

standby timers

Configures the time between hello messages and the time before other routers declare the active Hot Standby or standby router to be down.

standby track

Configures an interface so that the Hot Standby priority changes based on the availability of other interfaces.

standby use-bia

Configures HSRP to use the BIA of the interface as its virtual MAC address, instead of the preassigned MAC address (on Ethernet and FDDI) or the functional address (on Token Ring).


standby ip

To activate the Hot Standby Router Protocol (HSRP), use the standby ip command in interface configuration mode. To disable HSRP, use the no form of this command.

standby [group-number] ip [ip-address [secondary]]

no standby [group-number] ip [ip-address]

Syntax Description

group-number

(Optional) Group number on the interface for which HSRP is being activated. The default is 0. The group number range is from 0 to 255 for HSRP version 1 and from 0 to 4095 for HSRP version 2.

ip-address

(Optional) IP address of the Hot Standby router interface.

secondary

(Optional) Indicates the IP address is a secondary Hot Standby router interface. Useful on interfaces with primary and secondary addresses; you can configure primary and secondary HSRP addresses.


Defaults

The default group number is 0.
HSRP is disabled by default.

Command Modes

Interface configuration

Command History

Release
Modification

10.0

This command was introduced.

10.3

The group-number argument was added.

11.1

The secondary keyword was added.

12.3(4)T

The group number range was expanded for HSRP version 2.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.


Usage Guidelines

The standby ip command activates HSRP on the configured interface. If an IP address is specified, that address is used as the designated address for the Hot Standby group. If no IP address is specified, the designated address is learned through the standby function. For HSRP to elect a designated router, at least one router on the cable must have been configured with, or have learned, the designated address. Configuring the designated address on the active router always overrides a designated address that is currently in use.

When the standby ip command is enabled on an interface, the handling of proxy ARP requests is changed (unless proxy ARP was disabled). If the Hot Standby state of the interface is active, proxy ARP requests are answered using the MAC address of the Hot Standby group. If the interface is in a different state, proxy ARP responses are suppressed.

When group number 0 is used, no group number is written to NVRAM, providing backward compatibility.

HSRP version 2 permits an expanded group number range from 0 to 4095. The increased group number does not imply that an interface can, or should, support that many HSRP groups. The expanded group number range was changed to allow the group number to match the VLAN number on subinterfaces.

Examples

The following example activates HSRP for group 1 on Ethernet interface 0. The IP address used by the Hot Standby group will be learned using HSRP.

interface ethernet 0
 standby 1 ip

In the following example, all three virtual IP addresses appear in the ARP table using the same (single) virtual MAC address. All three virtual IP addresses are using the same HSRP group (group 0).

ip address 10.1.1.1. 255.255.255.0
ip address 10.2.2.2. 255.255.255.0 secondary
ip address 10.3.3.3. 255.255.255.0 secondary
ip address 10.4.4.4. 255.255.255.0 secondary
standby ip 10.1.1.254
standby ip 10.2.2.254 secondary
standby ip 10.3.3.254 secondary

standby version

To change the version of the Hot Standby Router Protocol (HSRP), use the standby version command in interface configuration mode. To change to the default version, use the no form of this command.

standby version {1 | 2}

no standby version {1 | 2}

Syntax Description

1

HSRP version 1.

2

HSRP version 2.


Defaults

HSRP version 1 is the default HSRP version.

Command Modes

Interface configuration

Command History

Release
Modification

12.3(4)T

This command was introduced.

12.2(25)S

This command was integrated into Cisco IOS Release 12.2(25)S.


Usage Guidelines

HSRP version 2 addresses limitations of HSRP version 1 by providing an expanded group number range of 0 to 4095.

HSRP version 2 will not interoperate with HSRP version 1. An interface can not operate both version 1 and version 2 because both versions are mutually exclusive. However, the different versions can be run on different physical interfaces of the same router. You can not change from version 2 to version 1 if you have configured groups above 255. Using the no standby version command sets the HSRP version to the default version, version 1.

If an HSRP version is changed, each group will reinitialize because it now has a new virtual MAC address.

Examples

The following example shows how to configure HSRP version 2 on an interface with a group number of 500:

! 
interface vlan500
 standby version 2
 standby 500 ip 172.20.100.10 
 standby 350 priority 110 
 standby 350 preempt 
 standby 350 timers 5 15

Related Commands

Command
Description

show standby

Displays HSRP information.