VRRP Synchronization Groups HowTo

About

This document provides a VRRP Synchronization groups use-case, and how it is configured using the CLI.

For an overview of all available configuration settings for VRRP refer to the configuration guide:

Introduction

A more complex use-case than a basic VRRP setup, involving synchronization groups, can be constructed as show in Figure 1:

                                              .---.
                                              | H | route to N1 via 192.168.0.10
                                              '-+-'
                         192.168.0.0/24         |
              ---------+---Network N2----+------+--
                       |                 |
VRRP Setup             |                 |             VRRP Setup
instance: i2           |                 |             instance: i2
vrid: 1                |                 |             vrid: 1
vaddr: 192.168.0.10    |.1               |.2           vaddr: 192.168.0.10
prio: 100          .---+---.         .---+---.         prio: 10
group: g1          |       | vlan2   |       | vlan2   group: g1
                   |  R1   |         |  R2   |
VRRP Setup         |       | vlan1   |       | vlan1   VRRP Setup
instance: i1       '---+---'         '---+---'         instance: i1
vrid: 1                |.1               |.2           vrid: 1
vaddr: 10.0.0.100      |                 |             vaddr: 10.0.0.100
prio: 100              |                 |             prio: 50
group: g1              |                 |             group: g1
                       |                 |
              --+------+---Network N1----+---------
                |          10.0.0.0/24
              .-+--.
              | H1 | route to N2 via 10.0.0.100
              '----'

Figure 1: A VRRP setup with two routers forming a virtual router setup with synchronization groups.

From the perspective of host H1, this case is similar to the one presented here. Equivalently, the same applies to host H2, only that it has a redundant route to network N1 instead.

However, in this scenario, it is possible for router R1 to be the master router for traffic to N1, and for R2 to be the master router towards N2. Assuming there is a requirement to avoid this kind of asymmetrical routing, both VRRP instances on each router R1, R2 can be grouped together into synchronization groups. This will ensure that one of R1 or R2 is always selected as the master router of both virtual routers. This example also illustrates that VRIDs can be reused across different interfaces on each router.

Configuration

Configure two VRRP instances per router and add those two instances to a synchronization group.

It is assumed that both routers have two different VLANs configured for each of the networks described in Figure 1.

Router 1

Configure VRRP instance i1:

R1:/#> configure
R1:/config/#> router
R1:/config/router/#> vrrp i1
Creating new VRRP instance: i1
R1:/config/router/vrrp-i1/#> vrid 1
R1:/config/router/vrrp-i1/#> address 10.0.0.100
R1:/config/router/vrrp-i1/#> prio 100
R1:/config/router/vrrp-i1/#> iface vlan1
R1:/config/router/vrrp-i1/#> end
R1:/config/router/#>

Configure VRRP instance i2:

R1:/config/router/#> vrrp i2
Creating new VRRP instance: i2
R1:/config/router/vrrp-i2/#> vrid 1
R1:/config/router/vrrp-i2/#> address 192.168.0.10
R1:/config/router/vrrp-i2/#> prio 100
R1:/config/router/vrrp-i2/#> iface vlan2
R1:/config/router/vrrp-i2/#> end
R1:/config/router/#>

If we want to ensure that the router with highest priority is always selected when possible, we can enable preemption:

R2:/config/router/#> vrrp i1
R2:/config/router/vrrp-i1/#> preempt delay 0
R2:/config/router/vrrp-i1/#> end
R2:/config/router/#>
R2:/config/router/#> vrrp i2
R2:/config/router/vrrp-i2/#> preempt delay 0
R2:/config/router/vrrp-i2/#> end
R2:/config/router/#>

Configure the synchronization group g1:

R1:/config/router/#> group g1
Creating new VRRP group: g1
R1:/config/router/vrrp-grp-g1/#> member i1
Added instance 'i1' as group member 1.
R1:/config/router/vrrp-grp-g1/#> member i2
Added instance 'i2' as group member 2.
R1:/config/router/vrrp-grp-g1/#> leave
R1:/#>

Router 2

Configure VRRP instance i1:

R2:/#> configure
R2:/config/#> router
R2:/config/router/#> vrrp i1
Creating new VRRP instance: i1
R2:/config/router/vrrp-i1/#> vrid 1
R2:/config/router/vrrp-i1/#> address 10.0.0.100
R2:/config/router/vrrp-i1/#> prio 50
R2:/config/router/vrrp-i1/#> iface vlan1
R2:/config/router/vrrp-i1/#> end
R2:/config/router/#>

Configure VRRP instance i2:

R2:/config/router/#> vrrp i2
Creating new VRRP instance: i2
R2:/config/router/vrrp-i2/#> vrid 1
R2:/config/router/vrrp-i2/#> address 192.168.0.10
R2:/config/router/vrrp-i2/#> prio 10
R2:/config/router/vrrp-i2/#> iface vlan2
R2:/config/router/vrrp-i2/#> end
R2:/config/router/#>

If we want to ensure that the router with highest priority is always selected when possible, we can enable preemption:

R2:/config/router/#> vrrp i1
R2:/config/router/vrrp-i1/#> preempt delay 0
R2:/config/router/vrrp-i1/#> end
R2:/config/router/#>
R2:/config/router/#> vrrp i2
R2:/config/router/vrrp-i2/#> preempt delay 0
R2:/config/router/vrrp-i2/#> end
R2:/config/router/#>

Configure the synchronization group g1:

R2:/config/router/#> group g1
Creating new VRRP group: g1
R2:/config/router/vrrp-grp-g1/#> member i1
Added instance 'i1' as group member 1.
R2:/config/router/vrrp-grp-g1/#> member i2
Added instance 'i2' as group member 2.
R2:/config/router/vrrp-grp-g1/#> leave
R2:/#>

Status

The status of the VRRP can be observed on each individual VRRP router.

Router 1:

R1:/#> show vrrp
VRRP INSTANCE     INTERFACE         VRID  PRIORITY   STATE  GROUPED       GROUP
i2                vlan2                1       100   MASTER   Y              g1
i1                vlan1                1       100   MASTER   Y              g1

Router 2:

R2:/#> show vrrp
VRRP INSTANCE     INTERFACE         VRID  PRIORITY   STATE  GROUPED       GROUP
i2                vlan2                1        10   BACKUP   Y              g1
i1                vlan1                1        50   BACKUP   Y              g1