Router VRRP
VRRP is an IETF-standard (RFC 5798) first-hop redundancy protocol that enables a group of routers to form a single virtual router, eliminating the single point of failure inherent in static default gateway configurations. A master router forwards traffic for the virtual IP address while backup routers monitor its health and take over through an election process if the master fails. IOS-XR supports VRRP on Ethernet interfaces, sub-interfaces, and link bundles, with IPv4 (version 2 and 3) and IPv6 address families.
Diagram
Section titled “Diagram”Classes
Section titled “Classes”configuration (iosxr.devices)
Section titled “configuration (iosxr.devices)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| router_vrrp | Class | [router_vrrp] | No |
router_vrrp (iosxr.devices.configuration)
Section titled “router_vrrp (iosxr.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| interfaces | List | [interfaces] | No |
interfaces (iosxr.devices.configuration.router_vrrp)
Section titled “interfaces (iosxr.devices.configuration.router_vrrp)”| 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)\s?\d+(/[A-Z0-9]+)*(\.\d+)?$ | Yes | |
| mac_refresh | Integer | min: 0, max: 10000 | No | |
| 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 | |
| ipv4 | List | [ipv4] | No | |
| ipv6 | List | [ipv6] | No |
ipv4 (iosxr.devices.configuration.router_vrrp.interfaces)
Section titled “ipv4 (iosxr.devices.configuration.router_vrrp.interfaces)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| group | Integer | min: 1, max: 255 | Yes | |
| version | Integer | min: 2, max: 3 | Yes | |
| address | String | No | ||
| priority | Integer | min: 1, max: 254 | No | |
| name | String | No | ||
| text_authentication | String | No | ||
| secondary_addresses | List | [secondary_addresses] | No | |
| timer_advertisement_seconds | Integer | min: 1, max: 255 | No | |
| timer_advertisement_milliseconds | Integer | min: 100, max: 40950 | No | |
| timer_force | Boolean | true, false | No | |
| preempt_disable | Boolean | true, false | No | |
| preempt_delay | Integer | min: 1, max: 3600 | No | |
| accept_mode_disable | Boolean | true, false | No | |
| track_interfaces | List | [track_interfaces] | No | |
| track_objects | List | [track_objects] | No | |
| bfd_fast_detect_peer_ipv4 | String | No | ||
| unicast_peer | String | No |
ipv6 (iosxr.devices.configuration.router_vrrp.interfaces)
Section titled “ipv6 (iosxr.devices.configuration.router_vrrp.interfaces)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| group | Integer | min: 1, max: 255 | Yes | |
| accept_mode_disable | Boolean | true, false | No | |
| linklocal_address | String | No | ||
| linklocal_address_autoconfig | Boolean | true, false | No | |
| bfd_fast_detect_peer_ipv6 | String | No | ||
| global_addresses | List | [global_addresses] | No | |
| name | String | No | ||
| preempt_delay | Integer | min: 1, max: 3600 | No | |
| preempt_disable | Boolean | true, false | No | |
| priority | Integer | min: 1, max: 254 | No | |
| timer_advertisement_milliseconds | Integer | min: 100, max: 40950 | No | |
| timer_advertisement_seconds | Integer | min: 1, max: 255 | No | |
| timer_force | Boolean | true, false | No | |
| unicast_peer | String | No | ||
| track_interfaces | List | [track_interfaces] | No | |
| track_objects | List | [track_objects] | No |
secondary_addresses (iosxr.devices.configuration.router_vrrp.interfaces.ipv4)
Section titled “secondary_addresses (iosxr.devices.configuration.router_vrrp.interfaces.ipv4)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| address | String | Yes |
track_interfaces (iosxr.devices.configuration.router_vrrp.interfaces.ipv4)
Section titled “track_interfaces (iosxr.devices.configuration.router_vrrp.interfaces.ipv4)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| priority_decrement | Integer | min: 1, max: 254 | No |
track_objects (iosxr.devices.configuration.router_vrrp.interfaces.ipv4)
Section titled “track_objects (iosxr.devices.configuration.router_vrrp.interfaces.ipv4)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| priority_decrement | Integer | min: 1, max: 254 | Yes |
global_addresses (iosxr.devices.configuration.router_vrrp.interfaces.ipv6)
Section titled “global_addresses (iosxr.devices.configuration.router_vrrp.interfaces.ipv6)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| address | String | Yes |
track_interfaces (iosxr.devices.configuration.router_vrrp.interfaces.ipv6)
Section titled “track_interfaces (iosxr.devices.configuration.router_vrrp.interfaces.ipv6)”| 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)\s?\d+(/[A-Z0-9]+)*(\.\d+)?$ | Yes | |
| priority_decrement | Integer | min: 1, max: 254 | No |
track_objects (iosxr.devices.configuration.router_vrrp.interfaces.ipv6)
Section titled “track_objects (iosxr.devices.configuration.router_vrrp.interfaces.ipv6)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| priority_decrement | Integer | min: 1, max: 254 | Yes |
Example YAML Code:
Section titled “Example YAML Code:”Example-1: Active/backup gateway pair VLAN with BFD, uplink tracking, and unicast peering
iosxr: devices: - name: router-1 host: 10.10.10.1:57400 configuration: router_vrrp: interfaces: - name: Bundle-Ether1.100 delay_minimum: 200 delay_reload: 600 bfd_minimum_interval: 100 bfd_multiplier: 3 ipv4: - group: 100 version: 3 address: 172.16.100.1 priority: 120 name: DC_VLAN100 preempt_delay: 60 timer_advertisement_seconds: 3 timer_force: true accept_mode_disable: true unicast_peer: 172.16.100.3 bfd_fast_detect_peer_ipv4: 172.16.100.3 secondary_addresses: - address: 172.16.100.2 track_interfaces: - name: TenGigE0/0/0/0 priority_decrement: 30 track_objects: - name: UPSTREAM_SPINE priority_decrement: 50Example-2: Dual-stack with IPv4 and IPv6 VRRP on the same interface
iosxr: devices: - name: router-1 host: 10.10.10.1:57400 configuration: router_vrrp: interfaces: - name: TenGigE0/0/0/1.200 mac_refresh: 3600 delay_minimum: 100 delay_reload: 300 bfd_minimum_interval: 200 bfd_multiplier: 3 ipv4: - group: 200 version: 2 address: 10.200.0.1 priority: 150 name: CORE_V200 text_authentication: campus200 timer_advertisement_seconds: 1 preempt_delay: 30 track_interfaces: - name: HundredGigE0/0/0/0 priority_decrement: 60 ipv6: - group: 200 global_addresses: - address: "2001:db8:200::1" linklocal_address_autoconfig: true priority: 150 name: CORE_V200_V6 timer_advertisement_seconds: 1 timer_force: true preempt_delay: 30 accept_mode_disable: true unicast_peer: "fe80::2" bfd_fast_detect_peer_ipv6: "fe80::2" track_interfaces: - name: HundredGigE0/0/0/0 priority_decrement: 60Example-3: Multiple VRRP groups for load sharing across two VLANs — each router is master for one group and backup for the other
iosxr: devices: - name: router-1 host: 10.10.10.1:57400 configuration: router_vrrp: interfaces: - name: GigabitEthernet0/0/0/1 ipv4: - group: 10 version: 3 address: 192.168.10.1 priority: 120 name: VLAN10_MASTER preempt_delay: 15 - group: 20 version: 3 address: 192.168.20.1 priority: 90 name: VLAN20_BACKUPExample-4: Single IPv4 gateway
iosxr: devices: - name: router-1 host: 10.10.10.1:57400 configuration: router_vrrp: interfaces: - name: GigabitEthernet0/0/0/0 ipv4: - group: 1 version: 2 address: 192.168.1.1 priority: 110