Hands-on tutorial
Tutorials · Routing & Internet
How to Make the Default Gateway Redundant With VRRP
Use VRRP so two Layer 3 switches or routers share one virtual gateway address, and users keep working when one of them fails or is upgraded.
Before you start
- Two Layer 3 switches or routers on the same VLANs
- One free IP address per VLAN for the virtual gateway
- Uplinks from both devices to the rest of the network
Step by step
Understand VRRP
VRRP (Virtual Router Redundancy Protocol) gives a group of routers one virtual IP and MAC address. The master answers for it; if the master stops sending advertisements, the backup takes over within a few seconds.
Plan addresses
Per VLAN, give each device its own address and reserve one for the virtual gateway, for example .2 and .3 for the devices and .1 for VRRP. Clients use .1 as their gateway.
Configure the group on both devices
Use the same group ID and virtual IP on both, and a higher priority on the device that should normally be master.
interface vlan 10 ip address 10.0.10.2 255.255.255.0 vrrp 10 ip 10.0.10.1 vrrp 10 priority 120 vrrp 10 preempt
Track the uplink
Lower the master's priority if its uplink fails, so the backup takes over even though the master is still running.
vrrp 10 track interface te1/0/49 decrement 30Align with spanning tree
Make the VRRP master also the spanning-tree root for the same VLANs, so traffic does not take an extra hop across the inter-switch link.
Test failover
Ping from a client continuously, then reload the master or unplug its uplink. Expect a few lost pings, not more.
Commands are generic, industry-standard examples. Exact syntax and menu names vary by model and firmware; check your device's manual on the Documentation page.
Pro tips
- Use authentication or limit VRRP to trusted VLANs.
- Split VLANs between the two devices as masters to share the load.
- Document which device is master for which VLAN.
FAQ
Frequently asked questions
VRRP or stacking?
Stacking makes two switches one; VRRP keeps them separate and only shares the gateway. M-LAG with VRRP is common in cores and data centers.
Is VRRP the same as HSRP?
They do the same job. VRRP is an open standard; HSRP is vendor-specific.
Keep learning
Related guides
Inter-VLAN routing on a Layer 3 switch
Read more →M-LAG dual-homing
Read more →Spanning tree and loop prevention
Read more →How to Set Up Dual-WAN Failover With a 4G LTE Backup
Keep a branch online when the fibre fails: add a 4G LTE link as a backup WAN with health checks and automatic failover.
Read more →How to Plan IP Addressing and Subnets for a Business Network
A clean IP plan makes networks easier to secure, troubleshoot and grow. Learn a simple scheme you can reuse on every site.
Read more →How to Configure DHCP Scopes, Reservations and Options
Hand out addresses reliably: one scope per VLAN, reservations for printers and cameras, the right DNS and gateway options and sensible lease times.
Read more →Stuck on a step?
Ask Navijin technical support or an authorised partner for help with your configuration.