HSRP is a first-hop redundancy protocol that enables multiple routers to share a virtual IP and MAC address, providing transparent failover for hosts without requiring router discovery. An active router handles forwarding while a standby router monitors its health and takes over seamlessly if the active router fails. IOS-XR supports HSRP on Ethernet interfaces, sub-interfaces, and link bundles, with IPv4 (version 1 and 2) and IPv6 (version 2) address families.
Name Type Constraint Mandatory Default Value router_hsrp Class [router_hsrp]No
Name Type Constraint Mandatory Default Value interfaces List [interfaces]No
Name Type Constraint Mandatory Default Value name String Regex: ^(FastEthernet|GigabitEthernet|TenGigE|TwentyFiveGigE|FortyGigE|FiftyGigE| HundredGigE|TwoHundredGigE|FourHundredGigE|EightHundredGigE|BVI|Bundle-Ether| Bundle-POS|CEM|GCC[0-2]|Loopback|MgmtEth|Multilink|Null|POS|PW-Ether|SRP|lpts| nve|preconfigure|tunnel-ip|tunnel-ipsec|tunnel-mte|tunnel-te|tunnel-tp)\d+(/\d+)*(\.\d+)?$ Yes use_bia Boolean true, falseNo redirects_disable Boolean true, falseNo delay_minimum Integer min: 0, max: 10000 No delay_reload Integer min: 0, max: 10000 No bfd_minimum_interval Integer min: 3, max: 30000 No bfd_multiplier Integer min: 2, max: 50 No mac_refresh Integer min: 0, max: 10000 No ipv4 List [ipv4]No ipv6 List [ipv6]No
Name Type Constraint Mandatory Default Value group Integer min: 0, max: 4095 Yes version Choice 1, 2No address IP No address_learn Boolean true, falseNo priority Integer min: 0, max: 255 No preempt_delay Integer min: 0, max: 3600 No timers_seconds Integer min: 1, max: 255 No timers_seconds_holdtime Integer min: 1, max: 255 No timers_msec Integer min: 100, max: 3000 No timers_msec_holdtime Integer min: 100, max: 3000 No mac_address String No name String No bfd_fast_detect_peer_ipv4 IP No bfd_fast_detect_peer_interface String Regex: ^(FastEthernet|GigabitEthernet|TenGigE|TwentyFiveGigE|FortyGigE|FiftyGigE| HundredGigE|TwoHundredGigE|FourHundredGigE|EightHundredGigE|BVI|Bundle-Ether| Bundle-POS|CEM|GCC[0-2]|Loopback|MgmtEth|Multilink|Null|POS|PW-Ether|SRP|lpts| nve|preconfigure|tunnel-ip|tunnel-ipsec|tunnel-mte|tunnel-te|tunnel-tp)\s?\d+(/[A-Z0-9]+)*(\.\d+)?$ No secondary_ipv4_addresses List [secondary_ipv4_addresses]No track_interfaces List [track_interfaces]No track_objects List [track_objects]No
Name Type Constraint Mandatory Default Value group Integer min: 0, max: 4095 Yes addresses List [addresses]No linklocal_address IP No linklocal_address_autoconfig Boolean true, falseNo linklocal_address_autoconfig_legacy Boolean true, falseNo priority Integer min: 0, max: 255 No preempt_delay Integer min: 0, max: 3600 No timers_seconds Integer min: 1, max: 255 No timers_seconds_holdtime Integer min: 1, max: 255 No timers_msec Integer min: 100, max: 3000 No timers_msec_holdtime Integer min: 100, max: 3000 No mac_address String No name String No bfd_fast_detect_peer_ipv6 IP No bfd_fast_detect_peer_interface String Regex: ^(FastEthernet|GigabitEthernet|TenGigE|TwentyFiveGigE|FortyGigE|FiftyGigE| HundredGigE|TwoHundredGigE|FourHundredGigE|EightHundredGigE|BVI|Bundle-Ether| Bundle-POS|CEM|GCC[0-2]|Loopback|MgmtEth|Multilink|Null|POS|PW-Ether|SRP|lpts| nve|preconfigure|tunnel-ip|tunnel-ipsec|tunnel-mte|tunnel-te|tunnel-tp)\s?\d+(/[A-Z0-9]+)*(\.\d+)?$ No track_interfaces List [track_interfaces]No track_objects List [track_objects]No
Name Type Constraint Mandatory Default Value address IP Yes
Name Type Constraint Mandatory Default Value name String Yes priority_decrement Integer min: 1, max: 255 Yes
Name Type Constraint Mandatory Default Value name String Yes priority_decrement Integer min: 1, max: 255 Yes
Name Type Constraint Mandatory Default Value address IP Yes
Name Type Constraint Mandatory Default Value name String Yes priority_decrement Integer min: 1, max: 255 Yes
Name Type Constraint Mandatory Default Value name String Yes priority_decrement Integer min: 1, max: 255 Yes
The version field on IPv4 groups controls which HSRP version is used. If version is omitted, it defaults to 2 .
version: 1 — Group ID range 0-255, maps to HSRP version 1version: 2 (default) — Group ID range 0-4095, maps to HSRP version 2IPv6 groups are always version 2; the version field is not applicable and should be omitted.
MAC Address Formats
Fields that accept MAC addresses can be in any of three formats:
colon-separated (e.g., "01:01:01:01:01:01") dash-separated (e.g., "01-01-01-01-01-01") dotted (e.g., "0101.0101.0101") All 3 formats can be used interchangeably. The normalization layer converts the user-specified format to colon-separated before sending to the device.
Example-1: Active/standby gateway pair on a data center VLAN interface with BFD-accelerated failover and uplink tracking
- name : Bundle-Ether10.100
bfd_minimum_interval : 15000
timers_msec_holdtime : 750
bfd_fast_detect_peer_ipv4 : 172.16.100.3
bfd_fast_detect_peer_interface : Bundle-Ether10.100
secondary_ipv4_addresses :
- name : UPSTREAM_REACHABILITY
Example-2: Dual-stack with IPv4 and IPv6 HSRP on the same interface
- name : TenGigE0/0/0/1.200
bfd_minimum_interval : 15000
timers_seconds_holdtime : 10
- address : " 2001:db8:200::1 "
linklocal_address : " fe80::1 "
timers_seconds_holdtime : 10
Example-3: Single IPv4 gateway with default version (2)
- name : GigabitEthernet0/0/0/0