VRRP
NX-OSVRRP (Virtual Router Redundancy Protocol) version 2 provides first-hop gateway redundancy for IPv4 networks on NX-OS, electing a master router among a group of routers that share a virtual IP address. VRRP groups are configured per interface on VLAN, Ethernet and port-channel interfaces as well as Ethernet/port-channel subinterfaces, and support a primary and secondary virtual addresses, priority-based election with forwarding thresholds, preemption, text authentication, advertisement interval tuning, BFD for fast failure detection, and priority adjustment based on interface or object tracking. VRRP requires feature.vrrp and is mutually exclusive with VRRPv3 (feature.vrrpv3).
Diagram
Section titled “Diagram”Classes
Section titled “Classes”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| devices | List | devices | No | |
| device_groups | List | device_groups | No | |
| global | Class | global | No | |
| templates | List | templates | No | |
| interface_ | List | interface_ | No |
devices (nxos)
Section titled “devices (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
device_groups (nxos)
Section titled “device_groups (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
global (nxos)
Section titled “global (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
templates (nxos)
Section titled “templates (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
interface_groups (nxos)
Section titled “interface_groups (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
configuration (nxos.devices)
Section titled “configuration (nxos.devices)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| interfaces | Class | interfaces | No |
configuration (nxos.interface_groups)
Section titled “configuration (nxos.interface_groups)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| subinterfaces | List | subinterfaces | No | |
| vrrp_groups | List | vrrp_groups | No |
interfaces (nxos.devices.configuration)
Section titled “interfaces (nxos.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| vlans | List | vlans | No | |
| ethernets | List | ethernets | No | |
| port_channels | List | port_channels | No |
ethernets (nxos.devices.configuration.interfaces)
Section titled “ethernets (nxos.devices.configuration.interfaces)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| subinterfaces | List | subinterfaces | No | |
| vrrp_groups | List | vrrp_groups | No |
port_channels (nxos.devices.configuration.interfaces)
Section titled “port_channels (nxos.devices.configuration.interfaces)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| subinterfaces | List | subinterfaces | No | |
| vrrp_groups | List | vrrp_groups | No |
vlans (nxos.devices.configuration.interfaces)
Section titled “vlans (nxos.devices.configuration.interfaces)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| vrrp_groups | List | vrrp_groups | No |
subinterfaces (nxos.devices.configuration.interfaces.ethernets)
Section titled “subinterfaces (nxos.devices.configuration.interfaces.ethernets)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| vrrp_groups | List | vrrp_groups | No |
vrrp_groups (nxos.devices.configuration.interfaces.vlans)
Section titled “vrrp_groups (nxos.devices.configuration.interfaces.vlans)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| id | Integer | min: 1, max: 255 | Yes | |
| shutdown | Boolean | true, false | No | |
| address | IP | No | ||
| secondary_ | List | IP | No | |
| advertisement_ | Integer | min: 1, max: 255 | No | |
| authentication_ | String | No | ||
| bfd | IP | No | ||
| preempt | Boolean | true, false | No | |
| priority | Integer | min: 1, max: 254 | No | |
| forwarding_ | Integer | min: 1, max: 254 | No | |
| forwarding_ | Integer | min: 0, max: 254 | No | |
| track_ | Choice | ethernet, loopback, mgmt, port-channel, vlan, vni | No | |
| track_ | Any | String or Integer[min: 0] | No | |
| track_ | Integer | min: 1, max: 254 | No | |
| tracks | List | tracks | No |
tracks (nxos.devices.configuration.interfaces.vlans.vrrp_groups)
Section titled “tracks (nxos.devices.configuration.interfaces.vlans.vrrp_groups)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| id | Integer | min: 1, max: 512 | Yes | |
| decrement | Integer | min: 1, max: 254 | No |
Examples
Section titled “Examples”Example 1: Basic VRRP group on a tenant SVI
nxos: devices: - name: LEAF1 configuration: feature: interface_vlan: true vrrp: true interfaces: vlans: - id: 1010 vrf: BLUE ip: address: 192.168.10.2/24 vrrp_groups: - id: 10 address: 192.168.10.1 priority: 110 preempt: true shutdown: falseExample 2: VRRP with secondary address, authentication, tuned timers and BFD
nxos: devices: - name: LEAF1 configuration: feature: bfd: true interface_vlan: true vrrp: true interfaces: vlans: - id: 1020 vrf: GREEN ip: address: 192.168.20.2/24 vrrp_groups: - id: 20 address: 192.168.20.1 secondary_addresses: - 192.168.20.3 advertisement_interval: 3 authentication_text: VRRPKEY priority: 120 forwarding_threshold_lower: 90 forwarding_threshold_upper: 120 bfd: 192.168.20.4 preempt: true shutdown: falseExample 3: VRRP priority decrement based on uplink object tracking
nxos: devices: - name: LEAF1 configuration: feature: vrrp: true tracks: - id: 10 interface_type: ethernet interface_id: 1/49 interface_line_protocol: true interfaces: ethernets: - id: 1/1 switchport: enabled: false subinterfaces: - id: 100 vrf: TENANT-A encapsulation: 100 ip: address: 192.168.100.2/24 vrrp_groups: - id: 1 address: 192.168.100.1 priority: 110 shutdown: false tracks: - id: 10 decrement: 20Example 4: VRRP native interface tracking on a port-channel
nxos: devices: - name: BORDER1 configuration: feature: vrrp: true interfaces: port_channels: - id: 10 switchport: enabled: false ip: address: 10.10.10.2/24 vrrp_groups: - id: 5 address: 10.10.10.1 priority: 110 track_interface_type: ethernet track_interface_id: 1/49 track_interface_priority: 50 shutdown: false