Cisco IOS XR IP Addresses and Services Command Reference for the Cisco XR 12000 Series Router, Release 4.1
HSRP Commands
Downloads: This chapterpdf (PDF - 1.44MB) The complete bookPDF (PDF - 6.1MB) | Feedback

HSRP Commands

HSRP Commands

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.

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. The default is 'cisco'.

Command Default

The default group number is 0.

The default authentication string is cisco.

Command Modes

HSRP interface configuration

Command History

Release

Modification

Release 3.2

This command was introduced.

Usage Guidelines

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

Task ID

Operations

hsrp

read, write

Examples

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

Related Commands

Command

Description

show hsrp

Displays HSRP information.

hsrp bfd fast-detect

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

Syntax Description

group number

(Optional) HSRP group number. Range is 0 to 255.

Command Default

BFD is disabled.

Command Modes

HSRP interface configuration

Command History

Release

Modification

Release 3.9.0

This command was introduced.

Usage Guidelines

Task ID

Task ID

Operations

hsrp

read, write

Examples

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

Related Commands

Command

Description

hsrp bfd multiplier

Configures the multiplier value for BFD.

hsrp bfd minimum-interval

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

Syntax Description

interval

Specify the minimum-interval in milliseconds. Range is 15 to 30000.

Command Default

Default minimum interval is 15 ms.

Command Modes

HSRP interface configuration

Command History

Release

Modification

Release 3.9.0

This command was introduced.

Usage Guidelines

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

Task ID

Operations

hsrp

read, write

Examples

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

Related Commands

Command

Description

hsrp bfd fast-detect

Enables BFD fast-detection on a HSRP interface.

hsrp bfd multiplier

Configures the multiplier value for BFD.

hsrp bfd multiplier

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

Syntax Description

multiplier

Specifies the BFD multiplier value. Range is 2 to 50.

Command Default

Default value is 3.

Command Modes

HSRP interface configuration

Command History

Release

Modification

Release 3.9.0

This command was introduced.

Usage Guidelines

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

Task ID

Operations

hsrp

read, write

Examples

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

Related Commands

Command

Description

hsrp bfd fast-detect

Enables BFD fast-detection on a HSRP interface.

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.

Command Default

minimum value : 1

reload value : 5

Command Modes

HSRP interface configuration

Command History

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.

Usage Guidelines

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

Task ID

Operations

hsrp

read, write

Examples

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

Related Commands

Command

Description

show hsrp

Displays HSRP information.

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.

Command Default

group-number : 0

HSRP is disabled by default.

Command Modes

HSRP interface configuration

Command History

Release

Modification

Release 3.2

This command was introduced.

Usage Guidelines

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

Task ID

Operations

hsrp

read, write

Examples

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

Related Commands

Command

Description

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.

Command Default

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

Modification

Release 3.2

This command was introduced.

Usage Guidelines

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.

Table 1 APPN and IP Parallel Terms

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

Task ID

Operations

hsrp

read, write

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/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

Related Commands

Command

Description

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).

Command Default

group-number: 0

seconds: 0 seconds (if the router wants to preempt, it does immediately)

Command Modes

HSRP interface configuration

Command History

Release

Modification

Release 3.2

This command was introduced.

Usage Guidelines

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

Task ID

Operations

hsrp

read, write

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 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 172.19.108.254
RP/0/0/CPU0:router(config-hsrp-if)# hsrp preempt delay 300

Related Commands

Command

Description

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.

Command Default

group-number: 0

priority: 100

Command Modes

HSRP interface configuration

Command History

Release

Modification

Release 3.2

This command was supported.

Usage Guidelines

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

Task ID

Operations

hsrp

read, write

Examples

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 172.19.108.254
RP/0/0/CPU0:router(config-hsrp-if)# hsrp priority 120

Related Commands

Command

Description

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.

Command Default

HSRP ICMP redirects are enabled by default.

Command Modes

HSRP interface configuration

Command History

Release

Modification

Release 3.2

This command was supported.

Release 3.3.0

The disable keyword was made mandatory.

Usage Guidelines

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

Task ID

Operations

hsrp

read, write

Examples

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 172.16.0.1 
RP/0/0/CPU0:router(config-hsrp-if)# hsrp redirects disable

Related Commands

Command

Description

show hsrp

Displays HSRP information.

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 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.

Command Default

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

Modification

Release 3.2

This command was introduced.

Usage Guidelines

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

Task ID

Operations

hsrp

read, write

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/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 

Related Commands

Command

Description

show hsrp

Displays HSRP information.

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 type interface-path-id [priority-decrement]

no hsrp [group-number] track 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.

Command Default

group-number: 0

priority-decrement: 10

Command Modes

HSRP interface configuration

Command History

Release

Modification

Release 3.2

This command was introduced.

Usage Guidelines

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

Task ID

Operations

hsrp

read, write

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/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

Related Commands

Command

Description

hsrp preempt

Configures HSRP preemption and preemption delay.

hsrp priority

Configures HSRP priority.

show hsrp

Displays HSRP information.

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

Command Default

HSRP uses the preassigned MAC address on Ethernet.

Command Modes

HSRP interface configuration

Command History

Release

Modification

Release 3.2

This command was introduced.

Usage Guidelines

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

Task ID

Operations

hsrp

read, write

Examples

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

Related Commands

Command

Description

hsrp mac-address

Specifies a virtual MAC address for HSRP.

show hsrp

Displays HSRP information.

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.

Command Default

HSRP is disabled.

Command Modes

Router HSRP configuration

Command History

Release

Modification

Release 3.2

This command was supported.

Usage Guidelines

All the commands used to configure HSRP are used in HSRP interface configuration mode.

Task ID

Task ID

Operations

hsrp

read, write

Examples

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)#

Related Commands

Command

Description

router hsrp

Enables HSRP.

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 keywords or arguments.

Command Default

HSRP is disabled.

Command Modes

global configuration

Command History

Release

Modification

Release 3.2

This command was introduced.

Usage Guidelines

HSRP configuration commands must be configured in the HSRP interface configuration mode.

Task ID

Task ID

Operations

hsrp

read, write

Examples

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

show hsrp

To display Hot Standby Router Protocol (HSRP) information, use the show hsrp command in EXEC mode.

show hsrp [ interface interface-type interface-path-id ] [ group-number ] [ brief | detail ]

Syntax Description

interface interface-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 these 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.

Command Default

By default, a single line of output summarizing each standby group is displayed.

Command Modes

EXEC

Command History

Release

Modification

Release 3.2

This command was introduced.

Usage Guidelines

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

Task ID

Operations

hsrp

read

Examples

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

This table describes the significant fields shown in the display.



Table 2 show hsrp Command Field Descriptions

Field

Description

TenGigE E0/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).

BFD enabled

Displays BFD related information (with multiplier and minimum interval details)

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

Command

Description

hsrp authentication

Configures an authentication string for 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.