VRRP HowTo
About
This document provides a basic VRRP 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
The simplest use case for VRRP involves two redundant physical routers that together constitute a virtual router between two networks, as showcased in Figure 1.
|
.--.-.
( ( )__
(_, \ ) ,_) Network N2
'-'--`--'
|
---------+--------+--------+---------
| |
VRRP Setup .---+---. .---+---. VRRP Setup
instance: 1 | | | | instance: 1
vrid: 1 | R1 | | R2 | vrid: 1
vaddr: 10.0.0.100 | | vlan1 | | vlan1 vaddr: 10.0.0.100
prio: 100 '---+---' '---+---' prio: 50
|.1 |.2
| |
--+------+---Network N1----+---------
| 10.0.0.0/24
.-+--.
| H | route to N2 via 10.0.0.100
'----'
In this case, host H can reach network N2 even though physical router R1 is down. From the perspective of H, there is only one router - the virtual router - and which of the participating physical routers is the master router does not matter. Additional physical routers R3 etc. may also participate in the virtual router to increase redundancy even further; all that is required is that all participating routers R1, R2, R3 etc. run VRRP instances on their N1-facing interfaces, using the same virtual IP address and virtual router ID, and presumably different physical (real) addresses on those same interfaces.
Configuration
Configure both of the routers to be part of the same virtual router. We want R1 to be the default master router, therefore it needs to be assigned a higher priority.
It is assumed that both routers have two different VLANs configured for each of the networks described in Figure 1.
Router 1
Configure a VRRP instance:
R1:/#> configure R1:/config/#> router R1:/config/router/#> vrrp 1 Creating new VRRP instance: 1 R1:/config/router/vrrp-1/#> priority 100 R1:/config/router/vrrp-1/#> vrid 1 R1:/config/router/vrrp-1/#> iface vlan1 R1:/config/router/vrrp-1/#> address 10.0.0.100 R1:/config/router/vrrp-1/#> leave R1:/#>
Notes on the configuration:
- R1 will be part of the virtual router with
vrid
1. - The
address
of the virtual router will be 10.0.0.100. - List for traffic that enters
iface
vlan1.
Router 2
Configure a VRRP instance:
R2:/#> configure R2:/config/#> router R2:/config/router/#> vrrp 1 Creating new VRRP instance: 1 R2:/config/router/vrrp-1/#> priority 50 R2:/config/router/vrrp-1/#> vrid 1 R2:/config/router/vrrp-1/#> iface vlan1 R2:/config/router/vrrp-1/#> address 10.0.0.100 R2:/config/router/vrrp-1/#> leave R2:/#>
Notes on the configuration:
- R2 will be part of a the virtual router with
vrid
1. - The
address
of the virtual router will be 10.0.0.100. - Listen for traffic that enters
iface
vlan1.
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
1 vlan1 1 100 MASTER N --------
Router 2:
R2:/#> show vrrp
VRRP INSTANCE INTERFACE VRID PRIORITY STATE GROUPED GROUP
1 vlan1 1 50 BACKUP N --------