The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter describes the Cisco IOS XR software commands used to configure and monitor the Hot Standby Router Protocol (HSRP).
For detailed information about HSRP concepts, configuration tasks, and examples, refer to the Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco XR 12000 Series Router.
To enable hot standby protocol for IP, use the address (hsrp) command in the HSRP group submode. To disable hot standby protocol for IP, use the no form of this command.
address { learn | address }
no address { learn | address }
learn |
Learns virtual IP address from peer. |
address |
Hot standby IP address. |
None
HSRP Group Submode
Release | Modification |
---|---|
Release 4.2.0 |
This command was introduced. |
No specific guidelines impact the use of this command.
Task ID | Operation |
---|---|
hsrp |
read, write |
This example shows how to enable a group to learn the primary virtual IPv4 address from received HSRP control packets:
(applicable for Cisco IOS XR Releases 4.2.x and below) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 RP/0/0/CPU0:router(config-hsrp-gp)# address learn RP/0/0/CPU0:router(config-hsrp-gp)#
(applicable for Cisco IOS XR Releases 4.3.x and above) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 version 2 RP/0/0/CPU0:router(config-hsrp-gp)# address learn RP/0/0/CPU0:router(config-hsrp-gp)#
Note |
|
Command |
Description |
---|---|
Configures the secondary virtual IPv4 address for a virtual router. |
To configure the global virtual IPv6 address for the HSRP group, use the address global command in the virtual router submode. To deconfigure the global virtual IPv6 address for the HSRP group, use the no form of this command.
address global ipv6-address
no address global ipv6-address
ipv6-address |
Global HSRP IPv6 address. |
None
HSRP Group Submode, under the IPv6 address-family
Release | Modification |
---|---|
Release 4.3.0 |
This command was introduced. |
No specific guidelines impact the use of this command.
Task ID | Operation |
---|---|
hsrp |
read,write |
This example shows how to add a global virtual IPv6 address for the HSRP group:
RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv6 RP/0/0/CPU0:router(config-hsrp-address-family)# hsrp 3 RP/0/0/CPU0:router(config-hsrp-virtual-router)# address global 4000::1000 RP/0/0/CPU0:router(config-hsrp-virtual-router)#
Note |
|
To configure the global virtual IPv6 address for the slave group, use the address global command in the HSRP slave submode. To deconfigure the global virtual IPv6 address for the slave group, use the no form of this command.
address global ipv6-address
no address global ipv6-address
ipv6-address |
Global VRRP IPv6 address. |
None
HSRP Slave Submode, under the IPv6 address-family
Release | Modification |
---|---|
Release 4.3.0 |
This command was introduced. |
No specific guidelines impact the use of this command.
Task ID | Operation |
---|---|
hsrp |
read,write |
This example shows how to add a global virtual IPv6 address for the slave group:
RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv6 RP/0/0/CPU0:router(config-hsrp-address-family)# hsrp 3 slave RP/0/0/CPU0:router(config-hsrp-virtual-router)# address global 4000::1000 RP/0/0/CPU0:router(config-hsrp-virtual-router)#
Note |
|
To either configure the virtual link-local IPv6 address for the HSRP group or to specify that the virtual link-local IPv6 address should be enabled and calculated automatically from the virtual router virtual Media Access Control (MAC) address, use the address linklocal command in the HSRP group submode, under the IPv6 address-family. To deconfigure the virtual link-local IPv6 address forthe HSRP group, use the no form of this command.
address linklocal ipv6-address | autoconfig
no address linklocal ipv6-address | autoconfig
ipv6-address |
HSRP IPv6 link-local address. |
autoconfig |
Autoconfigures the HSRP IPv6 link-local address. |
None
HSRP Group Submode, under the IPv6 address-family
Release | Modification |
---|---|
Release 4.3.0 |
This command was introduced. |
When you configure HSRP for IPv6, you must also configure the linklocal IPv6 address using either the ipv6-address argument or the autoconfig keyword. If you configure only the global IPv6 address and commit the changes using the commit keyword, the router does not accept the configuration and displays an error message.
Task ID | Operation |
---|---|
hsrp |
read, write |
RP/0/0/CPU0:router#configure RP/0/0/CPU0:router(config)#router hsrp RP/0/0/CPU0:router(config-hsrp)#interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)#address-family ipv6 RP/0/0/CPU0:router(config-hsrp-address-family)#hsrp 3 version 2 RP/0/0/CPU0:router(config-hsrp-virtual-router)#address linklocal autoconfig RP/0/0/CPU0:router(config-hsrp-virtual-router)#
RP/0/0/CPU0:router#configure RP/0/0/CPU0:router(config)#router hsrp RP/0/0/CPU0:router(config-hsrp)#interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)#address-family ipv6 RP/0/0/CPU0:router(config-hsrp-address-family)#hsrp 3 RP/0/0/CPU0:router(config-hsrp-virtual-router)#address linklocal FE80::260:3EFF:FE11:6770 RP/0/0/CPU0:router(config-hsrp-virtual-router)#
Note |
|
To either configure the virtual link-local IPv6 address for the slave group or to specify that the virtual link-local IPv6 address should be enabled and calculated automatically from the virtual router virtual Media Access Control (MAC) address, use the address linklocal command in the virtual router submode. To deconfigure the virtual link-local IPv6 address for the slave group, use the no form of this command.
address linklocal ipv6-address | autoconfig
no address linklocal ipv6-address | autoconfig
ipv6-address |
HSRP IPv6 link-local address. |
autoconfig |
Autoconfigures the HSRP IPv6 link-local address. |
None
HSRP Slave Submode, under the IPv6 address-family
Release | Modification |
---|---|
Release 4.3.0 |
This command was introduced. |
When you configure HSRP for IPv6, you must also configure the linklocal IPv6 address using either the ipv6-address argument or the autoconfig keyword. If you configure only the global IPv6 address and commit the changes using the commit keyword, the router does not accept the configuration and displays an error message.
Task ID | Operation |
---|---|
hsrp |
read, write |
RP/0/0/CPU0:router#configure RP/0/0/CPU0:router(config)#router hsrp RP/0/0/CPU0:router(config-hsrp)#interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)#address-family ipv6 RP/0/0/CPU0:router(config-hsrp-address-family)#hsrp 3 slave RP/0/0/CPU0:router(config-hsrp-virtual-router)#address linklocal autoconfig RP/0/0/CPU0:router(config-hsrp-virtual-router)#
RP/0/0/CPU0:router#configure RP/0/0/CPU0:router(config)#router hsrp RP/0/0/CPU0:router(config-hsrp)#interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)#address-family ipv6 RP/0/0/CPU0:router(config-hsrp-address-family)#hsrp 3 slave RP/0/0/CPU0:router(config-hsrp-virtual-router)#address linklocal FE80::260:3EFF:FE11:6770 RP/0/0/CPU0:router(config-hsrp-virtual-router)#
Note |
|
To configure the secondary virtual IPv4 address for a virtual router, use the address secondary command in the Hot Standby Router Protocol (HSRP) virtual router submode. To deconfigure the secondary virtual IPv4 address for a virtual router, use the no form of this command.
address address secondary
no address address secondary
secondary |
Sets the secondary HSRP IP address. |
address |
HSRP IPv4 address. |
None
HSRP virtual router
Release | Modification |
---|---|
Release 4.2.0 |
This command was introduced. |
No specific guidelines impact the use of this command.
Task ID | Operation |
---|---|
hsrp |
read, write |
This example shows how to set the secondary virtual IPv4 address for the virtual router:
(applicable for Cisco IOS XR Releases 4.2.x and below) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 3 RP/0/0/CPU0:router(config-hsrp-gp)# address 10.20.30.1 secondary RP/0/0/CPU0:router(config-hsrp-gp)#
(applicable for Cisco IOS XR Releases 4.3.x and above) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 3 version 2 RP/0/0/CPU0:router(config-hsrp-gp)# address 10.20.30.1 secondary RP/0/0/CPU0:router(config-hsrp-gp)#
Note |
|
Command |
Description |
---|---|
Enables hot standby protocol for IP. |
To configure an authentication string for the Hot Standby Router Protocol (HSRP), use the hsrp authentication command in HSRP group submode. To delete an authentication string, use the no form of this command.
authentication string
no authentication [string]
string |
Authentication string. It can be up to eight characters long. The default is 'cisco'. |
The default authentication string is cisco.
HSRP Group Submode
Release |
Modification |
---|---|
Release 4.2.0 |
This command was introduced. This command replaces the hsrp authentication command. |
The authentication string is sent unencrypted in all HSRP messages. The same authentication string must be configured on all routers and access servers on a LAN to ensure interoperation. Authentication mismatch prevents a device from learning the designated Hot Standby IP address and the Hot Standby timer values from other routers configured with HSRP.
The hsrp authentication command is available for version 1 groups only
Task ID |
Operations |
---|---|
hsrp |
read, write |
This example shows how to configure “company1” as the authentication string required to allow Hot Standby routers in group 1 on tenGigE interface 0/4/0/4 to interoperate:
(applicable for Cisco IOS XR Releases 4.2.x and below) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 RP/0/0/CPU0:router(config-hsrp-gp)# authentication company1 RP/0/0/CPU0:router(config-hsrp-gp)#
(applicable for Cisco IOS XR Releases 4.3.x and above) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 version 1 RP/0/0/CPU0:router(config-hsrp-gp)# authentication company1 RP/0/0/CPU0:router(config-hsrp-gp)#
Note | The version keyword is available only if IPv4 address-family is selected. By default, version is set to 2 for IPv6 address families. |
Command |
Description |
---|---|
Displays HSRP information. |
To enable bidirectional forwarding(BFD) fast-detection on a HSRP interface, use the hsrp bfd fast-detect command in HSRP group submode. This creates a BFD session between the HSRP router and its peer, and if the session goes down while HSRP is in backup state, this will initiate a HSRP failover. To disable BFD fast-detection, use the no form of this command.
bfd fast-detect [ peer ipv4 ipv4-address interface-type interface-path-id ]
no bfd fast-detect
peer ipv4 ipv4-address |
(Optional) BFD peer interface IPv4 address. |
||
interface-type interface-path-id |
Physical interface or virtual interface.
For more information about the syntax for the router, use the question mark (?) online help function. |
BFD is disabled.
HSRP Group Submode
Release |
Modification |
---|---|
Release 4.2.0 |
This command was introduced. This command replaced the hsrp bfd-fast detect command. |
No specific guidelines impact the use of this command.
Task ID |
Operations |
---|---|
hsrp |
read, write |
This example shows how to enable bfd fast-detect:
(applicable for Cisco IOS XR Releases 4.2.x and below) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 RP/0/0/CPU0:router(config-hsrp-gp)# bfd fast-detect RP/0/0/CPU0:router(config-hsrp-gp)#
(applicable for Cisco IOS XR Releases 4.3.x and above) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 version 2 RP/0/0/CPU0:router(config-hsrp-gp)# bfd fast-detect RP/0/0/CPU0:router(config-hsrp-gp)#
Note |
|
Command |
Description |
---|---|
Configures the multiplier value for BFD. |
|
Configures the BFD minimum interval to be used for all HSRP BFD sessions on a given interface |
To reset the Hot Standby Routing Protocol Statistics (HSRP) statistics to zero, use the clear hsrp statistics command in EXEC mode.
clear hsrp statistics [ interface interface-type interface-path-id group ]
interface interface-path-id |
Physical interface or virtual interface.
For more information about the syntax for the router, use the question mark (?) online help function. |
||
group |
Group number. |
None
Release | Modification |
---|---|
Release 4.2.0 |
This command was introduced. |
No specific guidelines impact the use of this command.
Task ID | Operation |
---|---|
hsrp |
read, write |
This sample output is from the clear hsrp statistics command:
RP/0/0/CPU0:router# clear hsrp statistics
Command |
Description |
---|---|
Displays HSRP information. |
To configure an authentication string for the Hot Standby Router Protocol (HSRP), use the hsrp authentication command in HSRP interface configuration mode. To delete an authentication string, use the no form of this command.
hsrp [group-number] authentication string
no hsrp [group-number] authentication [string]
group-number |
(Optional) Group number on the interface to which this authentication string applies. Default is 0. |
string |
Authentication string. It can be up to eight characters long. The default is 'cisco'. |
The default group number is 0.
The default authentication string is cisco.
HSRP interface configuration
Release |
Modification |
---|---|
Release 3.2 |
This command was introduced. |
Release 4.2.0 |
This command has been deprecated. This command was replaced with the authentication hsrp command. |
The authentication string is sent unencrypted in all HSRP messages. The same authentication string must be configured on all routers and access servers on a LAN to ensure interoperation. Authentication mismatch prevents a device from learning the designated Hot Standby IP address and the Hot Standby timer values from other routers configured with HSRP.
Task ID |
Operations |
---|---|
hsrp |
read, write |
This example shows how to configure “company1” as the authentication string required to allow Hot Standby routers in group 1 on Ten Gigabit Ethernet interface 0/2/0/1 to interoperate:
RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface TenGigE 0/2/0/1 RP/0/0/CPU0:router(config-hsrp-if)# hsrp 1 authentication company1
Command |
Description |
---|---|
Displays HSRP information. |
To enable bidirectional forwarding(BFD) fast-detection on a HSRP interface, use the hsrp bfd fast-detect command in interface configuration mode. This creates a BFD session between the HSRP router and its peer, and if the session goes down while HSRP is in backup state, this will initiate a HSRP failover. To disable BFD fast-detection, use the no form of this command.
hsrp [ group number ] bfd fast-detect
no hsrp [ group number ] bfd fast-detect
group number |
(Optional) HSRP group number. Range is 0 to 255. |
BFD is disabled.
HSRP interface configuration
Release |
Modification |
---|---|
Release 3.9.0 |
This command was introduced. |
Release 4.2.0 |
This command has been deprecated. This command was replaced with the bfd fast-detect (hsrp) command. |
No specific guidelines impact the use of this command.
Task ID |
Operations |
---|---|
hsrp |
read, write |
This example shows how to enable bfd fast-detect:
RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface gig 0/1/1/0 RP/0/0/CPU0:router(config-hsrp-if)# hsrp 1 bfd fast-detect
Command |
Description |
---|---|
Configures the multiplier value for BFD. |
To configure the BFD minimum interval to be used for all HSRP BFD sessions on a given interface, use the hsrp bfd minimum-interval command in the interface configuration mode. To remove the configured minimum-interval period and set the minimum-interval period to the default period, use the no form of this command.
hsrp bfd minimum-interval interval
no hsrp bfd minimum-interval interval
interval |
Specify the minimum-interval in milliseconds. Range is 15 to 30000. |
Default minimum interval is 15 ms.
HSRP interface configuration
Release |
Modification |
---|---|
Release 3.9.0 |
This command was introduced. |
Minimum interval determines the frequency of sending BFD packets to BFD peers. It is the time between successive BFD packets sent for the session. Minimum interval is defined in milliseconds. The configured minimum interval applies to all BFD sessions on the interface.
Task ID |
Operations |
---|---|
hsrp |
read, write |
The following example shows how to configure a minimum interval of 100 milliseconds:
RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface gig 0/1/1/0 RP/0/0/CPU0:router(config-hsrp-if)# hsrp bfd minimum-interval 100
Command |
Description |
---|---|
Enables BFD fast-detection on a HSRP interface. |
|
Configures the multiplier value for BFD. |
To set the BFD multiplier value, use the hsrp bfd multiplier command in the interface configuration mode. To remove the configured multiplier value and set the multiplier to the default value, use the no form of this command.
hsrp bfd multiplier multiplier
no hsrp bfd multiplier multiplier
multiplier |
Specifies the BFD multiplier value. Range is 2 to 50. |
Default value is 3.
HSRP interface configuration
Release |
Modification |
---|---|
Release 3.9.0 |
This command was introduced. |
The multiplier value specifies the number of consecutive BFD packets that, if not received as expected, cause a BFD session to go down. The BFD multiplier applies to all configured BFD sessions on the interface.
Task ID |
Operations |
---|---|
hsrp |
read, write |
The following example shows how to configure a BFD multiplier with multiplier value of 10:
RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface gig 0/1/1/0 RP/0/0/CPU0:router(config-hsrp-if)# hsrp bfd multiplier 10
Command |
Description |
---|---|
Enables BFD fast-detection on a HSRP interface. |
To configure the activation delay for the Hot Standby Router Protocol (HSRP), use the hsrp delay command in HSRP interface configuration mode. To delete the activation delay, use the no form of this command.
hsrp delay minimum value reload value
no hsrp delay
minimum value |
Sets the minimum delay in seconds for every interface up event. Range is 0 to 10000. |
reload value |
Sets the reload delay in seconds for first interface up event. Range is 0 to 10000. |
minimum value : 1
reload value : 5
HSRP interface configuration
Release |
Modification |
---|---|
Release 3.4.0 |
This command was introduced. |
Release 3.6.0 |
The range was changed from 1 to 10000 to 0 to 10000. |
The hsrp delay command delays the start of the HSRP finite state machine (FSM) on an interface up event to ensure that the interface is ready to pass traffic. This ensures that there are no mistaken state changes due to loss of hello packets. The minimum delay is applied on all interface up events and the reload delay is applied on the first interface event.
The values of zero must be explicitly configured to turn this feature off.
Task ID |
Operations |
---|---|
hsrp |
read, write |
The following example shows how to configure a minimum delay of 10 seconds with a reload delay of 100 seconds:
RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface mgmtEth 0/RP0/CPU0/0 RP/0/0/CPU0:router(config-hsrp-if)# hsrp delay minimum 10 reload 100
Command |
Description |
---|---|
Displays HSRP information. |
To activate the Hot Standby Router Protocol (HSRP), use the hsrp ipv4 command in HSRP interface configuration mode. To disable HSRP, use the no form of this command.
hsrp [group-number] ipv4 [ ip-address [secondary] ]
no hsrp [group-number] ipv4 [ ip-address [secondary] ]
group-number |
(Optional) Group number on the interface for which HSRP is being activated. Range is 0 to 255. Default is 0. |
ip-address |
(Optional) IP address of the Hot Standby router interface. |
secondary |
(Optional) Indicates that 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. |
group-number : 0
HSRP is disabled by default.
HSRP interface configuration
Release |
Modification |
---|---|
Release 3.2 |
This command was introduced. |
The hsrp ipv4 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 virtual address is learned from the active router. For HSRP to elect a designated router, at least one router in the Hot Standby group must have been configured with, or must 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 hsrp ipv4 command is enabled on an interface, the handling of proxy Address Resolution Protocol (ARP) requests is changed (unless proxy ARP was disabled). If the Hot Standby state group has been configured with or has learned the designated address, the proxy ARP requests are answered using the MAC address of the Hot Standby group. Otherwise, proxy ARP responses are suppressed.
Configuring secondary Hot Standby router IP addresses is necessary when the interface has secondary IP addresses configured and redundancy must be provided for the networks of these addresses also.
A primary address must be configured before a secondary address. Likewise, a secondary address must be unconfigured before unconfiguring a primary address. All IP addresses can be unconfigured using the no hsrp ipv4 command.
Task ID |
Operations |
---|---|
hsrp |
read, write |
The following example shows how to activate HSRP for group 1 on tenGigE interface 0/2/0/1. The IP address used by the Hot Standby group is learned using HSRP.
RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:routerrouter(config-hsrp)# interface tenGigE 0/2/0/1 RP/0/0/CPU0:router(config-hsrp-if)# hsrp 1 ipv4
Command |
Description |
---|---|
Configures ICMP redirect messages to be sent when the HSRP is configured on an interface. |
|
Displays HSRP information. |
To specify a virtual MAC address for the Hot Standby Router Protocol (HSRP), use the hsrp mac-address command in HSRP interface configuration mode. To revert to the standard virtual MAC address (0000.0C07.ACn), use the no form of this command.
hsrp [group-number] mac-address address
no hsrp [group-number] mac-address
group-number |
(Optional) Group number on the interface for which HSRP is being activated. Default is 0. |
address |
MAC address. |
group-number: 0
If this command is not configured, and the hsrp use-bia command is not configured, the standard virtual MAC address is used: 0000.0C07.ACn, where n is the group number in hexadecimal. This address is specified in RFC 2281, Cisco Hot Standby Router Protocol (HSRP).
HSRP interface configuration
Release |
Modification |
---|---|
Release 3.2 |
This command was introduced. |
Release 4.2.0 |
This command has been deprecated. This command was replaced with the mac-address hsrp command. |
The hsrp mac-address command is not recommended except for IBM networking environments in which first-hop redundancy is based on being able to use a virtual MAC address and in which you cannot change the first-hop addresses in the PCs that are connected to an Ethernet switch.
HSRP is used to help end stations locate the first-hop gateway for IP routing. The end stations are configured with a default gateway. However, HSRP can provide first-hop redundancy for other protocols. Some protocols, such as Advanced Peer-to-Peer Networking (APPN), use the MAC address to identify the first-hop for routing purposes. In this case, it is often necessary to specify the virtual MAC address; the virtual IP address is unimportant for these protocols.
Use the hsrp mac-address command to specify the virtual MAC address. The MAC address specified is used as the virtual MAC address when the router is active. This command is intended for certain APPN configurations.
This table shows the parallel terms between APPN and IP.
APPN |
IP |
---|---|
end node |
host |
network node |
router or gateway |
Note | In an APPN network, an end node is typically configured with the MAC address of the adjacent network node. Use the hsrp mac-address command in the routers to set the virtual MAC address to the value used in the end nodes. |
Task ID |
Operations |
---|---|
hsrp |
read, write |
If the end nodes are configured to use 4000.1000.1060 as the MAC address of the network node, the command to configure the virtual MAC address is as follows:
RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface TenGigE 0/2/0/1 RP/0/0/CPU0:router(config-hsrp-if)# hsrp 5 mac-address 4000.1000.1060
Command |
Description |
---|---|
Configures HSRP to use the burned-in address of the interface as its virtual MAC address, instead of the preassigned MAC address. |
|
Displays HSRP information. |
To configure Hot Standby Router Protocol (HSRP) preemption and preemption delay, use the hsrp preempt command in HSRP interface configuration mode. To restore the default values, use the no form of this command.
hsrp [group-number] preempt [ delay seconds ]
no hsrp [group-number] preempt [ delay seconds ]
group-number |
(Optional) Group number on the interface to which the other arguments in this command apply. Default is 0. |
delay seconds |
(Optional) Time in seconds. The seconds argument causes the local router to postpone taking over the active role for the specified preempt delay seconds value. Range is 0 to 3600 seconds (1 hour). Default is 0 seconds (no delay). |
group-number: 0
seconds: 0 seconds (if the router wants to preempt, it does immediately)
HSRP interface configuration
Release |
Modification |
---|---|
Release 3.2 |
This command was introduced. |
Release 4.2.0 |
This command has been deprecated. This command was replaced with the preempt hsrp command. |
When the hsrp preempt command is configured, the local router should attempt to assume control as the active router if it has a hot standby priority higher than the current active router. If the hsrp preempt command is not configured, the local router assumes control as the active router only if no other router is currently in the active state.
When a router first comes up, it does not have a complete routing table. If HSRP is configured to preempt, the local HSRP group may become the active router, yet it is unable to provide adequate routing services. This problem can be solved by configuring a delay before the preempting router actually preempts the currently active router.
The preempt delay seconds value does not apply if there is no router currently in the active state. In this case, the local router becomes active after the appropriate timeouts (see the hsrp timers command), regardless of the preempt delay seconds value.
Task ID |
Operations |
---|---|
hsrp |
read, write |
In the following example, the router waits for 300 seconds (5 minutes) after having determined that it should preempt before attempting to preempt the active router. The router might become the active router in a shorter span of time despite the configured delay if no active router is present. Only preempting the active router is delayed.
RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface TenGigE 0/2/0/1 RP/0/0/CPU0:router(config-hsrp-if)# hsrp ipv4 192.168.18.1 RP/0/0/CPU0:router(config-hsrp-if)# hsrp preempt delay 300
Command |
Description |
---|---|
Configures HSRP priority. |
|
Configures an interface so that the Hot Standby priority changes based on the availability of other interfaces. |
|
Displays HSRP information. |
To configure Hot Standby Router Protocol (HSRP) priority, use the hsrp priority command in HSRP interface configuration mode. To restore the default values, use the no form of this command.
hsrp [group-number] priority priority
no hsrp [group-number] priority priority
group-number |
(Optional) Group number on the interface to which the priority applies. Default is 0. |
priority |
Priority value that prioritizes a potential Hot Standby router. Range is 1 to 255. Default is 100. |
group-number: 0
priority: 100
HSRP interface configuration
Release |
Modification |
---|---|
Release 3.2 |
This command was supported. |
Release 4.2.0 |
This command has been deprecated. This command was replaced with the preempt hsrp command. |
The assigned priority is used to help select the active and standby routers. Assuming that preemption is enabled, the router with the highest priority becomes the designated active router. In case of ties, the interface IP addresses are compared, and the interface with the higher IP address has priority.
The priority of the device can change dynamically if an interface is configured with the hsrp track command and another interface on the device goes down.
If preemption is not enabled, the router may not become active even though it might have a higher priority than other HSRP routers.
Task ID |
Operations |
---|---|
hsrp |
read, write |
In the following example, the router has a priority of 120:
RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface TenGigE 0/2/0/1 RP/0/0/CPU0:router(config-hsrp-if)# hsrp ipv4 192.168.18.1 RP/0/0/CPU0:router(config-hsrp-if)# hsrp priority 120
Command |
Description |
---|---|
Configures HSRP preemption and preemption delay. |
|
Configures an interface so that the Hot Standby priority changes based on the availability of other interfaces. |
|
Displays HSRP information. |
To configure Internet Control Message Protocol (ICMP) redirect messages to be sent when the Hot Standby Router Protocol (HSRP) is configured on an interface, use the hsrp redirects command in HSRP interface configuration mode. To revert to the default, which is that ICMP messages are enabled, use the no form of this command.
hsrp redirects disable
no hsrp redirects disable
disable |
Disables the filtering of ICMP redirect messages on interfaces configured with HSRP. |
HSRP ICMP redirects are enabled by default.
HSRP interface configuration
Release |
Modification |
---|---|
Release 3.2 |
This command was supported. |
Release 3.3.0 |
The disable keyword was made mandatory. |
The hsrp redirects command can be configured on a per-interface basis. When HSRP is first configured on an interface, the setting for that interface inherits the global value. With the hsrp redirects command is enabled, ICMP redirects messages are filtered by replacing the real IP address in the next-hop address of the redirect packet with a virtual IP address if it is known to HSRP.
Task ID |
Operations |
---|---|
hsrp |
read, write |
The following example shows how to allow HSRP to filter redirect messages on tenGigE interface 0/2/0/1:
RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/2/0/1 RP/0/0/CPU0:router(config-hsrp-if)# hsrp 1 ipv4 192.168.18.1 RP/0/0/CPU0:router(config-hsrp-if)# hsrp redirects disable
Command |
Description |
---|---|
Displays HSRP information. |
To configure the time between hello packets and the time before other routers declare the active Hot Standby or standby router to be down, use the hsrp timers command in HSRP interface configuration mode. To restore the timers to their default values, use the no form of this command.
hsrp [group-number] timers { hello-seconds | msec hello-milliseconds } { hold-seconds | msec hold-milliseconds }
no hsrp [group-number] timers
group-number |
(Optional) Group number on the interface to which the timers apply. Default is 0. |
hello-seconds |
Hello interval in seconds. Range is 1 to 255. Default is 3 seconds. |
msec hello-milliseconds |
Hello interval in milliseconds. Range is 100 to 3000 milliseconds. |
hold-seconds |
Time in seconds before the active or standby router is declared to be down. Range is 1 to 255. Default is 10 seconds. |
msec hold-milliseconds |
Time in milliseconds before the active or standby router is declared to be down. Range is 100 to 3000 milliseconds. |
group-number: 0
hello-seconds: 3 seconds (If the msec keyword is specified, there is no default value.)
hold-seconds: 10 seconds (If the msec keyword is specified, there is no default value.)
HSRP interface configuration
Release |
Modification |
---|---|
Release 3.2 |
This command was introduced. |
Release 4.2.0 |
This command has been deprecated. This command was replaced with the timers (hsrp) command. |
Nonactive routers learn timer values from the active router, unless millisecond timer values are being used. If millisecond timer values are being used, all routers must be configured with the millisecond timer values. This rule applies if either the hello time or the hold time is specified in milliseconds.
The timers configured on the active router always override any other timer settings. All routers in a Hot Standby group should use the same timer values. Normally, the hold time is greater than or equal to three times the hello time (holdtime > 3 * hellotime).
You must specify either the hello-seconds argument or the msec keyword and hello-milliseconds argument, depending on whether you want the hello time in seconds or milliseconds. You must also specify either the hold-seconds argument or msec keyword and hold-milliseconds argument, depending on whether you want the hold time in seconds or milliseconds.
Task ID |
Operations |
---|---|
hsrp |
read, write |
The following example shows how to set, for group number 1 on Ten Gigabit Ethernet interface 0/2/0/1, the time between hello packets to 5 seconds and the time after which a router is considered to be down to 15 seconds. The configured timer values are used only if the router is active (or before they have been learned).
RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface TenGigE 0/2/0/1 RP/0/0/CPU0:router(config-hsrp-if)# hsrp 1 ipv4 RP/0/0/CPU0:router(config-hsrp-if)# hsrp 1 timers 5 15
The following example shows how to set, for group number 1 on Ten Gigabit Ethernet interface 0/2/0/1, the time between hello packets to 200 milliseconds and the time after which a router is considered to be down to 1000 milliseconds. The configured timer values are always used because milliseconds have been specified.
RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface TenGigE 0/2/0/1 RP/0/0/CPU0:router(config-hsrp-if)# hsrp 1 ipv4 RP/0/0/CPU0:router(config-hsrp-if)# hsrp 1 timers msec 200 msec 1000
Command |
Description |
---|---|
Displays HSRP information. |
To configure an interface so that the Hot Standby priority changes on the basis of the availability of other interfaces, use the hsrp track command in HSRP interface configuration mode. To remove the tracking, use the no form of this command.
hsrp [group-number] track type interface-path-id [priority-decrement]
no hsrp [group-number] track type interface-path-id [priority-decrement]
group-number |
(Optional) Group number on the interface to which the tracking applies. Default is 0. |
||
type |
Interface type. For more information, use the question mark (?) online help function. |
||
interface-path-id |
Physical interface or virtual interface.
For more information about the syntax for the router, use the question mark (?) online help function. |
||
priority-decrement |
(Optional) Amount by which the Hot Standby priority for the router is decremented (or incremented) when the interface goes down (or comes back up). Range is 1 to 255. |
group-number: 0
priority-decrement: 10
HSRP interface configuration
Release |
Modification |
---|---|
Release 3.2 |
This command was introduced. |
Release 4.2.0 |
This command has been deprecated. This command was replaced with the track (hsrp)command. |
The hsrp track command ties the Hot Standby priority of the router to the availability of its interfaces. It is useful for tracking interfaces that are not configured for the Hot Standby Router Protocol (HSRP). Only IP interfaces are tracked. A tracked interface is up if IP on that interface is up. Otherwise, the tracked interface is down.
When a tracked interface goes down, the Hot Standby priority decreases by 10. If an interface is not tracked, its state changes do not affect the Hot Standby priority. For each group configured for Hot Standby, you can configure a separate list of interfaces to be tracked.
The optional priority-decrement argument specifies by how much to decrement the Hot Standby priority when a tracked interface goes down. When the tracked interface comes back up, the priority is incremented by the same amount.
When multiple tracked interfaces are down and priority-decrement values have been configured, these configured priority decrements are cumulative. If tracked interfaces are down, but none of them were configured with priority decrements, the default decrement is 10 and it is cumulative.
The hsrp preempt command must be used in conjunction with this command on all routers in the group whenever the best available router should be used to forward packets. If the hsrp preempt command is not used, then the active router stays active, regardless of the current priorities of the other HSRP routers.
Task ID |
Operations |
---|---|
hsrp |
read, write |
In the following example, Ten Gigabit Ethernet interface 0/2/0/1 tracks interface 0/1/0/1 and 0/3/0/1. If one or both of these two interfaces go down, the Hot Standby priority of the router decreases by 10. Because the default Hot Standby priority is 100, the priority becomes 90 when one of the tracked interfaces goes down and the priority becomes 80 when both go down.
RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface TenGigE 0/2/0/1 RP/0/0/CPU0:router(config-hsrp-if)# hsrp track TenGigE 0/1/0/1 RP/0/0/CPU0:router(config-hsrp-if)# hsrp track TenGigE 0/3/0/1 RP/0/0/CPU0:router(config-hsrp-if)# hsrp preempt RP/0/0/CPU0:router(config-hsrp-if)# hsrp ipv4 192.92.72.46
Command |
Description |
---|---|
Configures HSRP preemption and preemption delay. |
|
Configures HSRP priority. |
|
Displays HSRP information. |
To configure the Hot Standby Router Protocol (HSRP) to use the burned-in address of the interface as its virtual MAC address, instead of the preassigned MAC address or the functional address, use the hsrp use-bia command in HSRP interface configuration mode. To restore the default virtual MAC address, use the no form of this command.
hsrp use-bia
no hsrp use-bia
HSRP uses the preassigned MAC address on Ethernet.
HSRP interface configuration
Release |
Modification |
---|---|
Release 3.2 |
This command was introduced. |
It is desirable to configure the hsrp use-bia command on an interface if there are devices that reject Address Resolution Protocol (ARP) replies with source hardware addresses set to a functional address.
Task ID |
Operations |
---|---|
hsrp |
read, write |
In the following example, the burned-in address of tenGigE interface 0/2/0/1 will be the virtual MAC address mapped to the virtual IP address for all Hot Standby groups configured on tenGigE interface 0/1/0/1:
RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/2/0/1 RP/0/0/CPU0:router(config-hsrp-if)# hsrp use-bia
Command |
Description |
---|---|
Specifies a virtual MAC address for HSRP. |
|
Displays HSRP information. |
To enable Hot Standby Router Protocol (HSRP) interface configuration command mode, use the interface command in router configuration mode. To terminate interface mode, use the no form of this command.
interface type interface-path-id
no interface type interface-path-id
type |
Interface type. For more information, use the question mark (?) online help function. |
||
interface-path-id |
Physical interface or virtual interface.
For more information about the syntax for the router, use the question mark (?) online help function. |
HSRP is disabled.
Router HSRP configuration
Release |
Modification |
---|---|
Release 3.2 |
This command was supported. |
All the commands used to configure HSRP are used in HSRP interface configuration mode.
Task ID |
Operations |
---|---|
hsrp |
read, write |
The following example show how to enable HSRP interface configuration mode on tenGigE 0/2/0/1:
RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/2/0/1 RP/0/0/CPU0:router(config-hsrp-if)#
Command |
Description |
---|---|
Enables HSRP. |
To configure Hot Standby Router Protocol (HSRP) preemption and preemption delay, use the hsrp preempt command in HSRP group submode. To restore the default values, use the no form of this command.
preempt [ delay seconds ]
no preempt [ delay seconds ]
delay seconds |
(Optional) Time in seconds. The seconds argument causes the local router to postpone the taking over the active role for the specified preempt delay seconds value. Range is from 0 to 3600 (1 hour). Default is 0 (no delay). |
The default delay is 0.
HSRP Group Submode
Release |
Modification |
---|---|
Release 4.2.0 |
This command was introduced. This command replaced the hsrp preempt command. |
When the hsrp preempt command is configured, the local router should attempt to assume control as the active router, if it has a hot standby priority higher than the current active router. If the hsrp preempt command is not configured, the local router assumes control as the active router only if no other router is currently in the active state.
When a router first comes up, it does not have a complete routing table. If HSRP is configured to preempt, the local HSRP group may become the active router, yet it is unable to provide adequate routing services. This problem can be solved by configuring a delay before the preempting router actually preempts the currently active router.
The preempt delay seconds value does not apply if there is no router currently in the active state. In this case, the local router becomes active after the appropriate timeouts (see the hsrp timers command), regardless of the preempt delay seconds value.
Task ID |
Operations |
---|---|
hsrp |
read, write |
This example, the router waits for 300 seconds (5 minutes) after having determined that it should preempt before attempting to preempt the active router. The router might become the active router in a shorter span of time despite the configured delay, if no active router is present. Only preempting the active router is delayed.
(applicable for Cisco IOS XR Releases 4.2.x and below) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 RP/0/0/CPU0:router(config-hsrp-gp)# preempt delay 300 RP/0/0/CPU0:router(config-hsrp-gp)#
(applicable for Cisco IOS XR Releases 4.3.x and above) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 version 2 RP/0/0/CPU0:router(config-hsrp-gp)# preempt delay 300 RP/0/0/CPU0:router(config-hsrp-gp)#
Note |
|
Command |
Description |
---|---|
Configures HSRP priority. |
|
Configures an interface so that the Hot Standby priority changes based on the availability of other interfaces. |
|
Displays HSRP information. |
To configure Hot Standby Router Protocol (HSRP) priority, use the priority command in HSRP group submode. To restore the default values, use the no form of this command.
priority priority
no priority priority
priority |
Priority value that prioritizes a potential Hot Standby router. Range is from 1 to 255. Default is 100. |
The default priority is 100.
HSRP interface configuration
Release |
Modification |
---|---|
Release 4.2.0 |
This command was introduced. This command replaced the hsrp priority command |
The assigned priority is used to help select the active and standby routers. Assuming that preemption is enabled, the router with the highest priority becomes the designated active router. In case of ties, the interface IP addresses are compared, and the interface with the higher IP address has priority.
The priority of the device can change dynamically if an interface is configured with the hsrp track command and another interface on the device goes down.
If preemption is not enabled, the router may not become active even though it might have a higher priority than other HSRP routers.
Task ID |
Operations |
---|---|
hsrp |
read, write |
In this example, the router has a priority of 120:
(applicable for Cisco IOS XR Releases 4.2.x and below) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 RP/0/0/CPU0:router(config-hsrp-gp)# priority 120 RP/0/0/CPU0:router(config-hsrp-gp)#
(applicable for Cisco IOS XR Releases 4.3.x and above) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 version 2 RP/0/0/CPU0:router(config-hsrp-gp)# priority 120 RP/0/0/CPU0:router(config-hsrp-gp)#
Note |
|
Command |
Description |
---|---|
Configures HSRP preemption and preemption delay. |
|
Configures an interface so that the Hot Standby priority changes based on the availability of other interfaces. |
|
Displays HSRP information. |
To enable the Hot Standby Router Protocol (HSRP), use the router hsrp command in Global Configuration mode. To disable HSRP, use the no form of this command.
router hsrp
no router hsrp
This command has no keywords or arguments.
HSRP is disabled.
Release |
Modification |
---|---|
Release 3.2 |
This command was introduced. |
HSRP configuration commands must be configured in the HSRP interface configuration mode.
Task ID |
Operations |
---|---|
hsrp |
read, write |
The following example shows how to configure an HSRP redundancy process that contains a virtual router group 1 on Ten Gigabit Ethernet 0/2/0/1:
RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/2/0/1 RP/0/0/CPU0:router(config-hsrp-if)# hsrp 1 priority 254
To configure an HSRP session name, use the session name command in the HSRP group submode. To deconfigure an HSRP session name, use the no form of this command.
name name
name |
MGO session name |
None
HSRP Group Submode
Release | Modification |
---|---|
Release 4.2.0 |
This command was introduced. |
No specific guidelines impact the use of this command.
Task ID | Operation |
---|---|
hsrp |
read |
This example shows how to configure an HSRP session name.
(applicable for Cisco IOS XR Releases 4.2.x and below) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 RP/0/0/CPU0:router(config-hsrp-gp)# name s1 RP/0/0/CPU0:router(config-hsrp-gp)#
(applicable for Cisco IOS XR Releases 4.3.x and above) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 version 2 RP/0/0/CPU0:router(config-hsrp-gp)# name s1 RP/0/0/CPU0:router(config-hsrp-gp)#
Note |
|
Command |
Description |
---|---|
Configures a virtual MAC address for the Hot Standby Router Protocol (HSRP). |
To display Hot Standby Router Protocol (HSRP) information, use the show hsrp command in EXEC mode mode.
show hsrp [ interface interface-type interface-path-id ] [ group-number ] [ brief | detail ]
interfaceinterface-type |
Interface type. For more information, use the question mark (?) online help function. |
||
interface-path-id |
Physical interface or virtual interface.
For more information about the syntax for the router, use the question mark (?) online help function. |
||
group-number |
(Optional) Group number on the interface for which output is displayed. |
||
brief |
(Optional) A single line of output summarizes each standby group. The brief keyword is the default if detail is not specified. |
||
detail |
(Optional) This keyword has the same effect as not specifying brief; more output is provided. |
||
(Optional) After this vertical bar (|), specify one of these output modifiers and a keyword from the output: |
By default, a single line of output summarizing each standby group is displayed.
Release |
Modification |
---|---|
Release 3.2 |
This command was introduced. |
Use the show hsrp command to display HSRP information.
If you want to specify a value for the group-number argument, you must also specify an interface type and number.
Task ID |
Operations |
---|---|
hsrp |
read |
This is sample output from the show hsrp detail command:
RP/0/0/CPU0:router# show hsrp detail
0/4/0/0 - Group 1
Local state is Active, priority 100
Hellotime 3 sec holdtime 10 sec
Next hello sent in 0.539
Minimum delay 1 sec, reload delay 5 sec
BFD enabled: state none, interval 15 ms multiplier 3
Hot standby IP address is 4.0.0.100 configured
Active router is local
Standby router is unknown expired
Standby virtual mac address is 0000.0c07.ac01
2 state changes, last state change 00:05:20
Command |
Description |
---|---|
Configures an authentication string for HSRP. |
|
Activates the HSRP. |
|
Specifies a virtual MAC address for HSRP. |
|
Configures HSRP preemption and preemption delay. |
|
Configures HSRP priority. |
|
Configures the time between hello packets and the time before other routers declare the active Hot Standby or standby router to be down. |
|
Configures an interface so that the Hot Standby priority changes based on the availability of other interfaces. |
|
Configures HSRP to use the burned-in address of the interface as its virtual MAC address, instead of the preassigned MAC address. |
To display Hot Standby Router Protocol (HSRP) bfd information across all interfaces, use the show hsrp bfd command in EXEC mode mode.
show hsrp bfd [ interface-type interface-path-id ip-address ]
interface-type interface-path-id |
(Optional) Physical interface or virtual interface.
For more information about the syntax for the router, use the question mark (?) online help function. |
||
ip-address |
(Optional) Destination IP address for BFD session. |
None
Release | Modification |
---|---|
Release 4.2.0 |
This command was introduced. |
No specific guidelines impact the use of this command.
Task ID | Operation |
---|---|
hsrp |
read |
This example shows Hot Standby Router Protocol (HSRP) bfd information across all interfaces.
RP/0/0/CPU0:router# show hsrp bfd
BFD Interface Destination IP State Intv Mult HSRP Interface Grp
------------- -------------- ----- ---- ---- -------------- ---
Gi0/3/0/2 10.0.0.2 up 100 3 Gi0/3/0/2 1
Gi0/3/0/2 2
Gi0/3/0/2 10.0.0.3 inactive 100 3 Gi0/3/0/2 3
Gi0/3/0/2 6
Gi0/3/0/3.1 10.0.1.2 down 15 3 Gi0/3/0/2 4
This example shows Hot Standby Router Protocol (HSRP) bfd information for the 0/3/0/2 interface.
RP/0/0/CPU0:router# show hsrp bfd gigabitethernet 0/3/0/2 10.0.0.2
BFD Interface Destination IP State Intv Mult HSRP Interface Grp
------------- -------------- ----- ---- ---- -------------- ---
Gi0/3/0/2 10.0.0.2 up 100 3 Gi0/3/0/2 1
Gi0/3/0/2 2
Command |
Description |
---|---|
Displays HSRP information. |
To display Hot Standby Router Protocol (HSRP) mgo information across all interfaces, use the show hsrp mgo command in EXEC mode.
show hsrp mgo [ brief | session-name ]
brief |
(Optional) Displays information in a brief format. |
session-name |
(Optional) Display information for a single MGO Session. |
None
Release | Modification |
---|---|
Release 4.2.0 |
This command was introduced. |
No specific guidelines impact the use of this command.
Task ID | Operation |
---|---|
hsrp |
read |
This example shows Hot Standby Router Protocol (HSRP) mgo information for interface HSRP3.
RP/0/0/CPU0:router# show hsrp mgo HSRP3
HSRP3
Primary group Bundle-Ether1.1 IPv4 group 1
State is Active
Slave groups:
Interface Grp
Bundle-Ether1.2 2
Bundle-Ether1.3 3
Bundle-Ether1.4 4
Bundle-Ether1.5 5
This example shows Hot Standby Router Protocol (HSRP) mgo information across all interfaces in a brief format.
RP/0/0/CPU0:router# show hsrp mgo brief
Name Interface AF Grp State Slaves
HSRP1 Gi0/0/0/1 IPv4 1 Active 100
HSRP2 Te0/1/0/0.1 IPv4 2 Standby 50
HSRP3 BE1 IPv4 1 Active 4
HSRP4 BE1 IPv6 10 Active 11
Command |
Description |
---|---|
Displays HSRP information. |
To display Hot Standby Router Protocol (HSRP) statistics information across all interfaces, use the show hsrp statistics command in EXEC mode.
show hsrp [ interface-type interface-path-id | group-number ] statistics
interface-type interface-path-id |
Physical interface or virtual interface.
For more information about the syntax for the router, use the question mark (?) online help function. |
||
group-number |
(Optional) Group number of the interface. |
Release | Modification |
---|---|
Release 4.2.0 |
This command was introduced. |
No specific guidelines impact the use of this command.
Task ID | Operation |
---|---|
hsrp |
read |
This sample output is from the show hsrp statistics command:
RP/0/0/CPU0:router# show hsrp statistics
Protocol:
Transitions to Active 2
Transitions to Standby 2
Transitions to Speak 0
Transitions to Listen 2
Transitions to Learn 0
Transitions to Init 0
Packets Sent: 12
Hello: 7
Resign: 0
Coup: 2
Adver: 3
Valid Packets Received: 13
Hello: 8
Resign: 2
Coup: 0
Adver: 3
Invalid packets received: 0
Too long: 0
Too short: 0
Mismatching/unsupported versions: 0
Invalid opcode: 0
Unknown group: 0
Inoperational group: 0
Conflicting Source IP: 0
Failed Authentication: 2
Invalid Hello Time: 0
Mismatching Virtual IP: 0
Command |
Description |
---|---|
Displays HSRP information. |
To display Hot Standby Router Protocol (HSRP) summary information across all interfaces, use the show hsrp summary command in EXEC mode mode.
show hsrp summary
This command has no keywords or arguments.
None
Release | Modification |
---|---|
Release 4.2.0 |
This command was introduced. |
No specific guidelines impact the use of this command.
Task ID | Operation |
---|---|
hsrp |
read |
This sample output is from the show hsrp summary command:
RP/0/0/CPU0:router# show hsrp summary
Groups VIPs
State Sessions Slaves Total Up Down Total
----- --------------------- -----------------
ALL 60 900 960 860 2020 2880
ACTIVE 10 190 200 200 300 500
STANDBY 15 235 250 250 600 850
SPEAK 10 190 200 200 400 600
LISTEN 10 190 200 200 400 600
LEARN 5 5 10 10 20 30
INIT 10 90 100 0 300 300
48 HSRP IPv4 interfaces (43 up, 5 down)
5 Tracked IPv4 interfaces (4 up, 1 down)
5 BFD sessions (3 up, 2 down)
Command |
Description |
---|---|
Displays HSRP information. |
To instruct the slave group to inherit its state from a specified group, use the slave follow command in HSRP slave submode.
follow mgo-session-name
mgo-session-name |
Name of the MGO session from which the slave group will inherit the state. |
None
HSRP Slave Submode
Release | Modification |
---|---|
Release 4.2.0 |
This command was introduced. |
No specific guidelines impact the use of this command.
Task ID | Operation |
---|---|
hsrp |
read, write |
RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp slave RP/0/0/CPU0:router(config-hsrp-slave)# follow m1
Command |
Description |
---|---|
Configures the virtual MAC address for the slave group. |
To configure the primary virtual IPv4 address for the slave group, use the slave primary virtual IPv4 address command in the HSRP slave submode.
address ip-address
ip-address |
IP address of the Hot Standby router interface. |
None
HSRP Slave Submode
Release | Modification |
---|---|
Release 4.2.0 |
This command was introduced. |
No specific guidelines impact the use of this command.
Task ID | Operation |
---|---|
hsrp |
read, write |
This example shows how to configure the primary virtual IPv4 address for the slave group.
RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp slave RP/0/0/CPU0:router(config-hsrp-slave)# address 10.2.1.4
Command |
Description |
---|---|
Instructs the slave group to inherit its state from a specified group. |
|
Configures the virtual MAC address for the slave group. |
To configure the secondary virtual IPv4 address for the slave group, use the slave secondary virtual IPv4 address command in the HSRP slave submode.
address ip-address secondary
ip-address |
IP address of the Hot Standby router interface. |
secondary |
Sets the secondary hot standby IP address. |
None
HSRP Slave Submode
Release | Modification |
---|---|
Release 4.2.0 |
This command was introduced. |
No specific guidelines impact the use of this command.
Task ID | Operation |
---|---|
hsrp |
read, write |
This example shows how to configure the secondary virtual IPv4 address for the slave group.
RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp slave RP/0/0/CPU0:router(config-hsrp-slave)# address 10.2.1.4 secondary
Command |
Description |
---|---|
Instructs the slave group to inherit its state from a specified group. |
|
Configures the virtual MAC address for the slave group. |
To configure the virtual MAC address for the slave group, use the slave virtual mac address command in the HSRP slave submode.
mac-address address
address |
48-bit hardware address of ARP entry. |
None
HSRP Slave Submode
Release | Modification |
---|---|
Release 4.2.0 |
This command was introduced. |
No specific guidelines impact the use of this command.
Task ID | Operation |
---|---|
hsrp |
read, write |
This example shows how to configure the virtual MAC address for the slave group.
RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp slave RP/0/0/CPU0:router(config-hsrp-slave)# mac-address 10.2.4
Command |
Description |
---|---|
Instructs the slave group to inherit its state from a specified group. |
To configure the time between hello packets and the time before other routers declare the active Hot Standby or standby router to be down, use the hsrp timers command in HSRP group submode. To restore the timers to their default values, use the no form of this command.
timers { hello-seconds | msec hello-milliseconds } { hold-seconds | msec hold-milliseconds }
no timers
hello-seconds |
Hello interval in seconds. Range is from 1 to 255. Default is 3. |
msec hello-milliseconds |
Hello interval in milliseconds. Range is from 100 to 3000. |
hold-seconds |
Time in seconds before the active or standby router is declared to be down. Range is from 1 to 255. Default is 10. |
msec hold-milliseconds |
Time in milliseconds before the active or standby router is declared to be down. Range is from 100 to 3000. |
The default hello-seconds is 3. (If the msec keyword is specified, there is no default value.)
The default hold-seconds is 10. (If the msec keyword is specified, there is no default value.)
HSRP Group Submode
Release | Modification |
---|---|
Release 4.2.0 |
This command was introduced. |
Nonactive routers learn timer values from the active router, unless millisecond timer values are being used. If millisecond timer values are being used, all routers must be configured with the millisecond timer values. This rule applies if either the hello time or the hold time is specified in milliseconds.
The timers configured on the active router always override any other timer settings. All routers in a Hot Standby group should use the same timer values. Normally, the hold time is greater than or equal to three times the hello time (holdtime > 3 * hellotime).
You must specify either the hello-seconds argument or the msec keyword and hello-milliseconds argument, depending on whether you want the hello time in seconds or milliseconds. You must also specify either the hold-seconds argument or msec keyword and hold-milliseconds argument, depending on whether you want the hold time in seconds or milliseconds.
Task ID |
Operations |
---|---|
hsrp |
read, write |
This example shows how to set, for group number 1 on Ten Gigabit Ethernet interface 0/2/0/1, the time between hello packets to 5 seconds and the time after which a router is considered to be down to 15 seconds. The configured timer values are used only if the router is active (or before they have been learned).
RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 RP/0/0/CPU0:router(config-hsrp-gp)# timers 5 15 RP/0/0/CPU0:router(config-hsrp-gp)#
This example shows how to set, for group number 1 on Ten Gigabit Ethernet interface 0/2/0/1, the time between hello packets to 200 milliseconds and the time after which a router is considered to be down to 1000 milliseconds. The configured timer values are always used because milliseconds have been specified.
(applicable for Cisco IOS XR Releases 4.2.x and below) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 RP/0/0/CPU0:router(config-hsrp-gp)# timers msec 200 msec 1000 RP/0/0/CPU0:router(config-hsrp-gp)#
(applicable for Cisco IOS XR Releases 4.3.x and above) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 version 2 RP/0/0/CPU0:router(config-hsrp-gp)# timers msec 200 msec 1000 RP/0/0/CPU0:router(config-hsrp-gp)#
Note |
|
Command |
Description |
---|---|
Displays HSRP information. |
To configure an interface so that the Hot Standby priority changes on the basis of the availability of other interfaces, use the hsrp track command in HSRP group submode. To remove the tracking, use the no form of this command.
track type interface-path-id [priority-decrement]
no track type interface-path-id [priority-decrement]
type |
Interface type. For more information, use the question mark (?) online help function. |
||
interface-path-id |
Physical interface or virtual interface.
For more information about the syntax for the router, use the question mark (?) online help function. |
||
priority-decrement |
(Optional) Amount by which the Hot Standby priority for the router is decremented (or incremented) when the interface goes down (or comes back up). Range is 1 to 255. |
The default priority-decrement is 10.
HSRP Group Submode
Release |
Modification |
---|---|
Release 4.2.0 |
This command was introduced. This command replaced the hsrp track command. |
The hsrp track command ties the Hot Standby priority of the router to the availability of its interfaces. It is useful for tracking interfaces that are not configured for the Hot Standby Router Protocol (HSRP). Only IP interfaces are tracked. A tracked interface is up if IP on that interface is up. Otherwise, the tracked interface is down.
When a tracked interface goes down, the Hot Standby priority decreases by 10. If an interface is not tracked, its state changes do not affect the Hot Standby priority. For each group configured for Hot Standby, you can configure a separate list of interfaces to be tracked.
The optional priority-decrement argument specifies by how much to decrement the Hot Standby priority when a tracked interface goes down. When the tracked interface comes back up, the priority is incremented by the same amount.
When multiple tracked interfaces are down and priority-decrement values have been configured, these configured priority decrements are cumulative. If tracked interfaces are down, but none of them were configured with priority decrements, the default decrement is 10 and it is cumulative.
The hsrp preempt command must be used in conjunction with this command on all routers in the group whenever the best available router should be used to forward packets. If the hsrp preempt command is not used, then the active router stays active, regardless of the current priorities of the other HSRP routers.
Task ID |
Operations |
---|---|
hsrp |
read, write |
This example shows how to configure an interface so that the Hot Standby priority changes on the basis of the availability of other interfaces.
(applicable for Cisco IOS XR Releases 4.2.x and below) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 RP/0/0/CPU0:router(config-hsrp-gp)# track tenGigE 0/4/0/4 2 RP/0/0/CPU0:router(config-hsrp-gp)#
(applicable for Cisco IOS XR Releases 4.3.x and above) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 version 2 RP/0/0/CPU0:router(config-hsrp-gp)# track tenGigE 0/4/0/4 2 RP/0/0/CPU0:router(config-hsrp-gp)#
Note |
|
Command |
Description |
---|---|
Configures HSRP preemption and preemption delay. |
|
Configures HSRP priority. |
|
Displays HSRP information. |
To enable tracking of a named object with the specified decrement, use the track (object) command in HSRP group submode. To remove the tracking, use the no form of this command.
track object name [priority-decrement]
no track object name [priority-decrement]
object name |
Object tracking. Name of the object to be tracked. |
priority-decrement |
(Optional) Amount by which the Hot Standby priority for the router is decremented (or incremented) when the interface goes down (or comes back up). Range is 1 to 255. |
The default priority-decrement is 10.
HSRP Group Submode
Release |
Modification |
---|---|
Release 4.2.1 |
This command was introduced. |
No specific guidelines impact the use of this command.
Task ID |
Operations |
---|---|
hsrp |
read, write |
This example shows how to configure object tracking under the HSRP group submode.
(applicable for Cisco IOS XR Releases 4.2.x and below) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 RP/0/0/CPU0:router(config-hsrp-gp)# track object t1 2 RP/0/0/CPU0:router(config-hsrp-gp)#
(applicable for Cisco IOS XR Releases 4.3.x and above) RP/0/0/CPU0:router# configure RP/0/0/CPU0:router(config)# router hsrp RP/0/0/CPU0:router(config-hsrp)# interface tenGigE 0/4/0/4 RP/0/0/CPU0:router(config-hsrp-if)# address-family ipv4 RP/0/0/CPU0:router(config-hsrp-ipv4)# hsrp 1 version 2 RP/0/0/CPU0:router(config-hsrp-gp)# track object t1 2 RP/0/0/CPU0:router(config-hsrp-gp)#
Note |
|
Command |
Description |
---|---|
Configures HSRP preemption and preemption delay. |
|
Configures HSRP priority. |
|
Displays HSRP information. |