HSRP Commands on Cisco IOS XR Software
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 Software IP Addresses and Services Configuration Guide.
hsrp authentication
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]
Syntax Description
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. Default string is cisco. |
Defaults
group-number: 0
string: cisco
Command Modes
HSRP interface configuration
Command History
|
|
Release 2.0 |
This command was introduced on the Cisco CRS-1. |
Release 3.0 |
No modification. |
Release 3.2 |
This command was supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator.For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
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. Authentication mismatch does not prevent protocol events such as one router taking over as the designated router.
Examples
The following 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/RP0/CPU0
:router(config)# router hsrp
RP/0/RP0/CPU0
:router(config-hsrp)# interface TenGigE 0/2/0/1
RP/0/RP0/CPU0
:router(config-hsrp-if)# hsrp 1 authentication company1
Related Commands
hsrp delay
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
Syntax Description
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. |
Defaults
minimum value: 1
reload value: 5
Command Modes
HSRP interface configuration
Command History
|
|
Release 3.4.0 |
This command was introduced on the Cisco CRS-1 and Cisco XR 12000 Series Router. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
The range was changed from 1 to 10000 to 0 to 10000. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator.For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
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.
Examples
The following example shows how to configure a minimum delay of 10 seconds with a reload delay of 100 seconds:
RP/0/RP0/CPU0
:router(config)# router hsrp
RP/0/RP0/CPU0
:router(config-hsrp)# interface mgmtEth 0/RP0/CPU0/0
RP/0/RP0/CPU0
:router(config-hsrp-if)# hsrp delay minimum 10 reload 100
Related Commands
hsrp ipv4
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]]
Syntax Description
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. |
Defaults
group-number: 0
HSRP is disabled by default.
Command Modes
HSRP interface configuration
Command History
|
|
Release 2.0 |
This command was introduced on the Cisco CRS-1. |
Release 3.0 |
No modification. |
Release 3.2 |
This command was supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator.For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
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.
Examples
The following example shows how to activate HSRP for group 1 on Ten Gigabit Ethernet interface 0/2/0/1. The IP address used by the Hot Standby group is learned using HSRP.
RP/0/RP0/CPU0
:router(config)# router hsrp
RP/0/RP0/CPU0
:router(config-hsrp)# interface TenGigE 0/2/0/1
RP/0/RP0/CPU0
:router(config-hsrp-if)# hsrp 1 ipv4
Related Commands
|
|
hsrp redirects |
Configures ICMP redirect messages to be sent when the HSRP is configured on an interface. |
show hsrp |
Displays HSRP information. |
hsrp mac-address
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
Syntax Description
group-number |
(Optional) Group number on the interface for which HSRP is being activated. Default is 0. |
address |
MAC address. |
Defaults
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).
Command Modes
HSRP interface configuration
Command History
|
|
Release 2.0 |
This command was introduced on the Cisco CRS-1. |
Release 3.0 |
No modification. |
Release 3.2 |
This command was supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator.For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide..
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.
Table 43 shows the parallel terms between APPN and IP.
Table 43 APPN and IP Parallel Terms
|
|
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.
Examples
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/RP0/CPU0:
router(config)# router hsrp
RP/0/RP0/CPU0:
router(config-hsrp)# interface TenGigE 0/2/0/1
RP/0/RP0/CPU0:
router(config-hsrp-if)# hsrp 5 mac-address 4000.1000.1060
Related Commands
|
|
hsrp use-bia |
Configures HSRP to use the burned-in address of the interface as its virtual MAC address, instead of the preassigned MAC address. |
show hsrp |
Displays HSRP information. |
hsrp preempt
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]
Syntax Description
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). |
Defaults
group-number: 0
seconds: 0 seconds (if the router wants to preempt, it does immediately)
Command Modes
HSRP interface configuration
Command History
|
|
Release 2.0 |
This command was introduced on the Cisco CRS-1. |
Release 3.0 |
No modification. |
Release 3.2 |
This command was supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator.For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
When the hsrp preempt command is configured, the router is configured to preempt, which means that when the local router has a Hot Standby priority higher than the current active router, the local router should attempt to assume control as the active router. If the hsrp preempt command is not configured, the local router assumes control as the active router only if it receives information indicating that no router is currently in the active state (acting as the designated router).
When a router first comes up, it does not have a complete routing table. If it is configured to preempt, it becomes 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.
Examples
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 despite the delay, if no active router is present. Only preempting the active router is delayed.
RP/0/RP0/CPU0:
router(config)# router hsrp
RP/0/RP0/CPU0:
router(config-hsrp)# interface TenGigE 0/2/0/1
RP/0/RP0/CPU0:router(config-hsrp-if)# hsrp ipv4 172.19.108.254
RP/0/RP0/CPU0:
router(config-hsrp-if)# hsrp preempt delay 300
Related Commands
|
|
hsrp priority |
Configures HSRP priority. |
hsrp track |
Configures an interface so that the Hot Standby priority changes based on the availability of other interfaces. |
show hsrp |
Displays HSRP information. |
hsrp priority
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
Syntax Description
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. |
Defaults
group-number: 0
priority: 100
Command Modes
HSRP interface configuration
Command History
|
|
Release 2.0 |
This command was introduced on the Cisco CRS-1. |
Release 3.0 |
No modification. |
Release 3.2 |
This command was supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator.For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
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 primary IP addresses are compared, and 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.
Examples
In the following example, the router has a priority of 120:
RP/0/RP0/CPU0:
router(config)# router hsrp
RP/0/RP0/CPU0:
router(config-hsrp)# interface TenGigE 0/2/0/1
RP/0/RP0/CPU0:router(config-hsrp-if)# hsrp ipv4 172.19.108.254
RP/0/RP0/CPU0:
router(config-hsrp-if)# hsrp priority 120
Related Commands
|
|
hsrp preempt |
Configures HSRP preemption and preemption delay. |
hsrp track |
Configures an interface so that the Hot Standby priority changes based on the availability of other interfaces. |
show hsrp |
Displays HSRP information. |
hsrp redirects
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
Syntax Description
disable |
Disables the filtering of ICMP redirect messages on interfaces configured with HSRP. |
Defaults
HSRP ICMP redirects are enabled by default.
Command Modes
HSRP interface configuration
Command History
|
|
Release 2.0 |
This command was introduced on the Cisco CRS-1. |
Release 3.0 |
No modification. |
Release 3.2 |
This command was supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
The disable keyword was made mandatory. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator.For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
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 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.
Examples
The following example shows how to allow HSRP to filter redirect messages on Ten Gigabit Ethernet interface 0/2/0/1:
RP/0/RP0/CPU0:
router(config)# router hsrp
RP/0/RP0/CPU0:
router(config-hsrp)# interface TenGigE 0/2/0/1
RP/0/RP0/CPU0:
router(config-hsrp-if)# hsrp 1 ipv4 172.16.0.1
RP/0/RP0/CPU0:
router(config-hsrp-if)# hsrp redirects disable
Related Commands
hsrp timers
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
Syntax Description
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 20 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 20 to 3000 milliseconds. |
Defaults
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.)
Command Modes
HSRP interface configuration
Command History
|
|
Release 2.0 |
This command was introduced on the Cisco CRS-1. |
Release 3.0 |
No modification. |
Release 3.2 |
This command was supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator.For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
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.
Examples
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/RP0/CPU0
:router(config)# router hsrp
RP/0/RP0/CPU0:
router(config-hsrp)# interface TenGigE 0/2/0/1
RP/0/RP0/CPU0:
router(config-hsrp-if)# hsrp 1 ipv4
RP/0/RP0/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/RP0/CPU0:
router(config)# router hsrp
RP/0/RP0/CPU0:
router(config-hsrp)# interface TenGigE 0/2/0/1
RP/0/RP0/CPU0:
router(config-hsrp-if)# hsrp 1 ipv4
RP/0/RP0/CPU0:
router(config-hsrp-if)# hsrp 1 timers msec 200 msec 1000
Related Commands
hsrp track
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 interface type interface-path-id [priority-decrement]
no hsrp [group-number] track interface type interface-path-id [priority-decrement]
Syntax Description
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. Note Use the show interfaces command to see a list of all interfaces currently configured on the router. 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. |
Defaults
group-number: 0
priority-decrement: 10
Command Modes
HSRP interface configuration
Command History
|
|
Release 2.0 |
This command was introduced on the Cisco CRS-1. |
Release 3.0 |
No modification. |
Release 3.2 |
This command was supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator.For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
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 interface 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.
Examples
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/RP0/CPU0:
router(config)# router hsrp
RP/0/RP0/CPU0:
router(config-hsrp)# interface TenGigE 0/2/0/1
RP/0/RP0/CPU0:
router(config-hsrp-if)# hsrp track TenGigE 0/1/0/1
RP/0/RP0/CPU0:
router(config-hsrp-if)# hsrp track TenGigE 0/3/0/1
RP/0/RP0/CPU0:
router(config-hsrp-if)# hsrp preempt
RP/0/RP0/CPU0:
router(config-hsrp-if)# hsrp ipv4 192.92.72.46
Related Commands
hsrp use-bia
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
Syntax Description
This command has no arguments or keywords.
Defaults
HSRP uses the preassigned MAC address on Ethernet.
Command Modes
HSRP interface configuration
Command History
|
|
Release 2.0 |
This command was introduced on the Cisco CRS-1. |
Release 3.0 |
No modification. |
Release 3.2 |
This command was supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator.For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
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.
Examples
In the following example, the burned-in address of Ten Gigabit Ethernet interface 0/2/0/1 will be the virtual MAC address mapped to the virtual IP address for all Hot Standby groups configured on Ten Gigabit Ethernet interface 0/1/0/1:
RP/0/RP0/CPU0:
router(config)# router hsrp
RP/0/RP0/CPU0:
router(config-hsrp)# interface TenGigE 0/2/0/1
RP/0/RP0/CPU0:
router(config-hsrp-if)# hsrp use-bia
Related Commands
interface (HSRP)
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
Syntax Description
type |
Interface type. For more information, use the question mark (?) online help function. |
interface-path-id |
Physical interface or virtual interface. Note Use the show interfaces command to see a list of all interfaces currently configured on the router. For more information about the syntax for the router, use the question mark (?) online help function. |
Defaults
HSRP is disabled.
Command Modes
Router HSRP configuration
Command History
|
|
Release 2.0 |
This command was introduced on the Cisco CRS-1. |
Release 3.0 |
No modification. |
Release 3.2 |
This command was supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator.For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
All the commands used to configure HSRP are used in HSRP interface configuration mode.
Examples
The following example show how to enable HSRP interface configuration mode on Ten Gigabit Ethernet interface 0/2/0/1:
RP/0/RP0/CPU0:
router(config)# router hsrp
RP/0/RP0/CPU0:
router(config-hsrp)# interface TenGigE 0/2/0/1
RP/0/RP0/CPU0:
router(config-hsrp-if)#
Related Commands
router hsrp
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
Syntax Description
This command has no arguments or keywords.
Defaults
HSRP is disabled.
Command Modes
Global configuration
Command History
|
|
Release 2.0 |
This command was introduced on the Cisco CRS-1. |
Release 3.0 |
No modification. |
Release 3.2 |
This command was supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator.For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
HSRP configuration commands must be configured in the HSRP interface configuration mode.
Examples
The following example shows how to configure an HSRP redundancy process that contains a virtual router group 1 on Ten Gigabit Ethernet interface 0/2/0/1:
RP/0/RP0/CPU0:
router(config)# router hsrp
RP/0/RP0/CPU0:
router(config-hsrp)# interface TenGigE 0/2/0/1
RP/0/RP0/CPU0:
router(config-hsrp-if)# hsrp 1 priority 254
show hsrp
To display Hot Standby Router Protocol (HSRP) information, use the show hsrp command in EXEC mode.
show hsrp [interface type interface-path-id] [group-number]] [brief | detail |]
Syntax Description
type |
Interface type. For more information, use the question mark (?) online help function. |
interface-path-id |
Physical interface or virtual interface. Note Use the show interfaces command to see a list of all interfaces currently configured on the router. 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 the following output modifiers and a keyword from the output: •begin—Begins the output from the word that you specify. •exclude—Excludes lines that match the word that you specify. •include—Includes lines that match the word that you specify. |
Defaults
The brief keyword is the default.
Command Modes
EXEC
Command History
|
|
Release 2.0 |
This command was introduced on the Cisco CRS-1. |
Release 3.0 |
No modification. |
Release 3.2 |
This command was supported on the Cisco XR 12000 Series Router. |
Release 3.3.0 |
No modification. |
Release 3.4.0 |
No modification. |
Release 3.5.0 |
No modification. |
Release 3.6.0 |
No modification. |
Release 3.7.0 |
No modification. |
Release 3.8.0 |
No modification. |
Usage Guidelines
To use this command, your Cisco IOS XR software system administrator must assign you to a user group associated with a task group that includes the corresponding command task IDs. If you need assistance with your task group assignment, contact your system administrator.For detailed information about user groups and task IDs, see the Configuring AAA Services on Cisco IOS XR Software module of Cisco IOS XR System Security Configuration Guide.
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.
Examples
The following is sample output from the show hsrp detail command:
RP/0/RP0/CPU0:
router# show hsrp detail
GigabitEthernet0/4/0/0 - Group 1
Local state is Active, priority 100
Hellotime 3 sec holdtime 10 sec
Minimum delay 1 sec, reload delay 5 sec
Hot standby IP address is 4.0.0.100 configured
Standby router is unknown expired
Standby virtual mac address is 0000.0c07.ac01
2 state changes, last state change 00:05:20
Table 44 describes the significant fields shown in the display.
Table 44 show hsrp Command Field Descriptions
|
|
TenGigE0/2/0/4 |
Interface type and number and Hot Standby group number for the interface. |
Local state is |
State of local networking device; can be one of the following: •Active—Current Hot Standby router. •Standby—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 active nor standby, but if no messages are received from the active or standby router, it will start to "speak." •Learn—Router is neither active nor standby, nor does it have enough information to attempt to claim the active or standby roles. •Init—Router is not yet ready to participate in HSRP, possibly because the associated interface is not up. |
Hellotime |
Current time (in seconds) between sending of hello packets, learned dynamically from the hello packets received from the active Hot Standby router. |
holdtime |
Current time (in seconds) before other routers declare the active or standby router to be down, learned dynamically from the hello packets received from the active Hot Standby router. |
Next hello sent in |
Time in which the software will send the next hello packet (in hours:minutes:seconds). |
Hot standby IP address is configured |
IP address of the current Hot Standby router. The word "configured" indicates that this address is known through the hsrp ip command. Otherwise, the address was learned dynamically through HSRP hello packets from other routers that do have the HSRP IP address configured. |
Active router is |
Value can be "local" or an IP address. Address of the current active Hot Standby router. |
Standby router is |
Value can be "local" or an IP address of the standby router (the router that is next in line to be the Hot Standby router). |
Standby virtual mac address is |
MAC address associated with the standby group address. |
state changes |
Number of times the router changed the standby state. |
last state change |
Time (in hours:minutes:seconds) expired since the last state change. |
Tracking interface states for |
List of interfaces that are being tracked and their corresponding states. Based on the hsrp track command. |
Priority decrement |
Value by which the standby priority is decremented or incremented when the tracked interface goes down or up, respectively. Default is 10. |
Related Commands
|
|
hsrp authentication |
Configures an authentication string for HSRP. |
hsrp delay |
Configures the activation delay for the HSRP. |
hsrp ipv4 |
Activates the HSRP. |
hsrp mac-address |
Specifies a virtual MAC address for HSRP. |
hsrp preempt |
Configures HSRP preemption and preemption delay. |
hsrp priority |
Configures HSRP priority. |
hsrp timers |
Configures the time between hello packets and the time before other routers declare the active Hot Standby or standby router to be down. |
hsrp track |
Configures an interface so that the Hot Standby priority changes based on the availability of other interfaces. |
hsrp use-bia |
Configures HSRP to use the burned-in address of the interface as its virtual MAC address, instead of the preassigned MAC address. |