VRRP & GLBP – Gateway Redundancy, Election, Load Balancing & Configuration
1. Why First Hop Redundancy Matters
Every host on a subnet has a single configured default gateway — the router it sends all off-subnet traffic to. If that router fails, the host has no route out of the subnet and loses all external connectivity, even if a second router is physically present and operational.
Without FHRP:
PC (GW: 192.168.1.1)
|
[R1: 192.168.1.1] <-- FAILS
[R2: 192.168.1.2] <-- idle; PC cannot use it (GW is hardcoded)
Result: PC offline until admin manually reconfigures GW or R1 recovers.
With FHRP (VRRP / HSRP / GLBP):
PC (GW: 192.168.1.254) -- virtual IP shared by R1 and R2
|
[R1: real 192.168.1.1, virtual 192.168.1.254] <-- MASTER/ACTIVE
[R2: real 192.168.1.2, virtual 192.168.1.254] <-- BACKUP/STANDBY
R1 FAILS:
[R2 detects failure, assumes virtual IP within seconds]
PC ARP cache still has virtual MAC -> traffic automatically redirects to R2.
PC is unaware any failure occurred.
Related pages: HSRP Overview | Default Routes | Static Routing Configuration | show ip route | show ip interface brief | DHCP How It Works | OSPF Overview | HSRP First Hop Redundancy Lab | IP SLA Configuration & Tracking Lab
2. FHRP Comparison — HSRP vs VRRP vs GLBP
| Feature | HSRP | VRRP | GLBP |
|---|---|---|---|
| Standard | Cisco proprietary | IETF open standard (RFC 5798) | Cisco proprietary |
| IPv4 support | Yes (v1 and v2) | Yes (v2 and v3) | Yes |
| IPv6 support | Yes (v2 only) | Yes (v3 only) | Yes |
| Load balancing | No (only one active router per group) | No (only one Master per group; multi-group workaround) | Yes — true simultaneous load balancing across all routers |
| Virtual IP = real IP? | No — virtual IP cannot match a physical interface IP | Yes — virtual IP CAN match the Master's real interface IP (Master IP owner gets priority 255 automatically) | No — virtual IP is separate from all physical IPs |
| Virtual MAC format | 00-00-0C-07-AC-XX (v1) 00-00-0C-9F-FX-XX (v2) |
00-00-5E-00-01-XX (VRID in hex) | 00-07-B4-00-01-XX (AVF number in hex) |
| Default hello/advert interval | 3 sec Hello, 10 sec Hold | 1 sec Advertisement | 3 sec Hello, 10 sec Hold |
| Preemption | Disabled by default (must enable) | Enabled by default | Disabled by default (must enable) |
| Default priority | 100 | 100 | 100 (AVG election) |
| Priority range | 0–255 (active = highest) | 1–254 (Master = highest; 255 = IP owner) | 1–255 (AVG = highest) |
| Authentication | Plaintext or MD5 (v2) | Plaintext (v2 only, deprecated); MD5 via key-chain (v3) | MD5 |
| Multicast address | 224.0.0.2 (v1), 224.0.0.102 (v2) | 224.0.0.18 | 224.0.0.102 |
3. VRRP — Virtual Router Redundancy Protocol
VRRP (RFC 5798) is the open-standard FHRP supported by virtually all vendors. It creates a Virtual Router with a shared virtual IP and virtual MAC address. One router is the Master and owns the virtual IP; the others are Backups waiting to take over.
VRRP Key Terms
| Term | Definition |
|---|---|
| VRID | Virtual Router Identifier (1–255). Identifies a VRRP group. Multiple VRIDs can run on the same interface for load-sharing. |
| Master Router | Currently forwards traffic for the virtual IP. Sends Advertisement messages. |
| Backup Router | Listens for Advertisements. Steps up to Master if no Advertisement received within Master Down Interval. |
| Virtual IP | The default gateway IP configured on hosts. May match the Master's real interface IP (IP owner). |
| Virtual MAC | 00-00-5E-00-01-{VRID}. Hosts ARP for the virtual IP and receive this MAC as the gateway MAC. |
| IP Owner | Router whose real interface IP matches the virtual IP. Automatically assigned priority 255 — always becomes Master. |
| Advertisement | Multicast packet (to 224.0.0.18) sent by Master every Advertisement Interval. Signals Master is alive. |
| Master Down Interval | Time Backup waits before declaring Master dead: (3 × Advertisement Interval) + Skew Time. Default ≈ 3.6 sec. |
4. VRRP Election — How Master Is Selected
VRRP Master election: Step 1 — Compare priority: Highest priority wins (range 1–254; default 100) Priority 255 reserved for IP Owner (virtual IP = interface IP) Step 2 — Tiebreaker (equal priority): Highest interface IP address wins Example: R1: vrrp 1 ip 192.168.10.254, priority 120, real IP 192.168.10.1 R2: vrrp 1 ip 192.168.10.254, priority 100, real IP 192.168.10.2 R3: vrrp 1 ip 192.168.10.254, priority 100, real IP 192.168.10.3 R1 wins (priority 120 > 100) -> R1 is Master R3 is first Backup (priority tied with R2; R3 has higher IP 192.168.10.3) R2 is second Backup Special case -- IP Owner: R4: vrrp 1 ip 192.168.10.4 (virtual IP = real IP 192.168.10.4) R4 gets priority 255 automatically -> ALWAYS wins election Even if you configure lower priority, IP Owner gets 255 Preemption (default ON in VRRP): If R2 was Master (R1 was down) and R1 comes back: R1 (priority 120) > R2 (priority 100) -> R1 immediately preempts and takes Master This happens without delay -- VRRP preempts by default (unlike HSRP)
5. VRRP States
| State | Description | Traffic Forwarding? |
|---|---|---|
| Initialize | VRRP is starting up; waiting for startup event (interface up, VRRP config applied). Not yet participating in election. | No |
| Backup | Listening for Advertisement messages from Master. Ready to assume Master role if Master Down Interval expires. | No |
| Master | Forwarding traffic for the virtual IP. Sending Advertisement messages at Advertisement Interval. Responding to ARP for virtual IP with virtual MAC. | Yes |
VRRP state transitions:
Initialize
|
| (interface comes up / VRRP configured)
v
Backup ----[no Advert received in Master Down Interval]----> Master
^ |
| |
+---[higher-priority Master Advertisement received]--------+
(preempted: step down from Master to Backup)
6. VRRPv2 vs VRRPv3
| Feature | VRRPv2 (RFC 3768) | VRRPv3 (RFC 5798) |
|---|---|---|
| IPv4 support | Yes | Yes |
| IPv6 support | No | Yes — uses link-local as source |
| Advertisement interval precision | 1-second granularity (integer seconds) | Centisecond precision (sub-second timers) |
| Authentication | Plaintext (Type 1) — deprecated; not secure | No built-in auth; use IPsec or key-chain MD5 on Cisco |
| Multicast address | 224.0.0.18 | 224.0.0.18 (IPv4); FF02::12 (IPv6) |
| Cisco IOS config keyword | Default on older IOS | Requires vrrp version 3 or
fhrp version vrrp v3 |
7. VRRP Configuration — Cisco IOS
! ── Basic VRRP (Master router — higher priority) ───────────────────────── R1(config)# interface GigabitEthernet0/0 R1(config-if)# ip address 192.168.10.1 255.255.255.0 R1(config-if)# vrrp 1 ip 192.168.10.254 ! Virtual IP (group 1) R1(config-if)# vrrp 1 priority 120 ! Higher priority = Master R1(config-if)# vrrp 1 preempt ! Take back Master on recovery (default ON) R1(config-if)# vrrp 1 timers advertise 1 ! Advertisement every 1 sec (default) R1(config-if)# vrrp 1 description PRIMARY_GW ! ── Backup router (lower priority) ───────────────────────────────────────── R2(config)# interface GigabitEthernet0/0 R2(config-if)# ip address 192.168.10.2 255.255.255.0 R2(config-if)# vrrp 1 ip 192.168.10.254 ! Same virtual IP, same VRID R2(config-if)# vrrp 1 priority 100 ! Default; stays Backup R2(config-if)# vrrp 1 preempt ! ── Enable VRRPv3 (required for IPv6 or sub-second timers) ───────────────── R1(config)# fhrp version vrrp v3 R1(config)# interface GigabitEthernet0/0 R1(config-if)# vrrp 1 address-family ipv4 R1(config-if-vrrp)# address 192.168.10.254 primary R1(config-if-vrrp)# priority 120 R1(config-if-vrrp)# preempt ! ── Authentication (VRRPv2 plaintext -- use only in trusted networks) ────── R1(config-if)# vrrp 1 authentication text MySecret ! ── Object tracking (reduce priority if uplink fails) ───────────────────── R1(config)# track 1 interface GigabitEthernet0/1 line-protocol R1(config-if)# vrrp 1 track 1 decrement 30 ! If Gi0/1 goes down: R1 priority drops from 120 to 90 (below R2's 100) ! R2 preempts and takes over -- prevents blackholing if R1's WAN link fails
8. VRRP Load-Sharing with Multiple Groups
VRRP itself does not load-balance — only one Master forwards per group. However, you can run multiple VRRP groups on the same interface, making each router the Master for a different group. Hosts are split between the groups.
Two VRRP groups on the same subnet:
R1: real IP 192.168.10.1
R2: real IP 192.168.10.2
VRRP Group 1: Virtual IP 192.168.10.253
R1: priority 120 -> MASTER for group 1
R2: priority 100 -> Backup for group 1
VRRP Group 2: Virtual IP 192.168.10.254
R2: priority 120 -> MASTER for group 2
R1: priority 100 -> Backup for group 2
Hosts configured:
Finance PCs: default gateway 192.168.10.253 (served by R1)
HR PCs: default gateway 192.168.10.254 (served by R2)
Result: R1 handles Finance traffic; R2 handles HR traffic.
If R1 fails: R2 takes over group 1 (redundancy maintained).
If R2 fails: R1 takes over group 2 (redundancy maintained).
Both links active simultaneously -- bandwidth utilised.
! Configure VRRP load-sharing on R1: R1(config-if)# vrrp 1 ip 192.168.10.253 R1(config-if)# vrrp 1 priority 120 ! Master for group 1 R1(config-if)# vrrp 2 ip 192.168.10.254 R1(config-if)# vrrp 2 priority 100 ! Backup for group 2 ! Configure VRRP load-sharing on R2: R2(config-if)# vrrp 1 ip 192.168.10.253 R2(config-if)# vrrp 1 priority 100 ! Backup for group 1 R2(config-if)# vrrp 2 ip 192.168.10.254 R2(config-if)# vrrp 2 priority 120 ! Master for group 2
9. Verifying VRRP
! ── Show VRRP status ─────────────────────────────────────────────────────
R1# show vrrp
GigabitEthernet0/0 - Group 1
State is Master
Virtual IP address is 192.168.10.254
Virtual MAC address is 0000.5e00.0101 <-- 00-00-5E-00-01-{VRID=1}
Advertisement interval is 1000 msec
Preemption is enabled
Priority is 120
Master Router is 192.168.10.1, priority is 120
Master Advertisement interval is 1000 msec
Master Down interval is 3609 msec
! ── Show brief format ─────────────────────────────────────────────────────
R1# show vrrp brief
Interface Grp Pri Time Own Pre State Master addr Group addr
Gi0/0 1 120 3609 Y Master 192.168.10.1 192.168.10.254
! On the Backup router:
R2# show vrrp brief
Gi0/0 1 100 3609 Y Backup 192.168.10.1 192.168.10.254
^--- Master is still R1
! ── Debug VRRP events ────────────────────────────────────────────────────
R1# debug vrrp events
VRRP: Gi0/0 Grp 1 Advertisement from 192.168.10.2 priority 100
VRRP: Gi0/0 Grp 1 Rcvd lower pri (100 < 120) from 192.168.10.2 -- ignoring
10. GLBP — Gateway Load Balancing Protocol
GLBP is Cisco's proprietary FHRP that solves the HSRP/VRRP limitation of one active router per group. GLBP uses a single virtual IP but multiple virtual MAC addresses — one per forwarding router — allowing all routers to actively forward traffic simultaneously.
GLBP architecture (4 routers, single virtual IP): Hosts configured with GW: 192.168.20.254 (single virtual IP) GLBP Group 1: R1 [AVG + AVF1]: real 192.168.20.1, virtual MAC 0007.b400.0101 R2 [AVF2]: real 192.168.20.2, virtual MAC 0007.b400.0102 R3 [AVF3]: real 192.168.20.3, virtual MAC 0007.b400.0103 R4 [AVF4]: real 192.168.20.4, virtual MAC 0007.b400.0104 ARP process: PC-A ARPs for 192.168.20.254 -> AVG (R1) replies with MAC 0007.b400.0101 -> PC-A uses R1 PC-B ARPs for 192.168.20.254 -> AVG (R1) replies with MAC 0007.b400.0102 -> PC-B uses R2 PC-C ARPs for 192.168.20.254 -> AVG (R1) replies with MAC 0007.b400.0103 -> PC-C uses R3 Each host uses a different physical router, but ALL see the same virtual IP! ALL four routers forward traffic simultaneously = true load balancing.
GLBP Roles
| Role | Full Name | Responsibilities | How Many Per Group |
|---|---|---|---|
| AVG | Active Virtual Gateway | Manages the group: responds to ARP requests for the virtual IP by distributing virtual MAC addresses per load-balancing method. Elected by highest priority (then highest real IP as tiebreaker). | One (plus one SVG standby) |
| SVG | Secondary Virtual Gateway | Standby backup to the AVG. Takes over AVG role if AVG fails. | One |
| AVF | Active Virtual Forwarder | Actively forwards traffic for its assigned virtual MAC address. Every router in the group (including the AVG) is also an AVF. | Up to 4 per group |
| SVF | Secondary Virtual Forwarder | Backup to an AVF. Takes over the AVF's virtual MAC if that AVF fails. | One per AVF |
11. GLBP Load-Balancing Methods
| Method | How It Works | Best For |
|---|---|---|
| Round-Robin (default) | AVG assigns virtual MACs to ARP requests in rotation: first request gets MAC1, second gets MAC2, third gets MAC3, fourth gets MAC1 again, and so on. | Equal distribution when all hosts generate similar traffic volumes. Simple and predictable. |
| Host-Dependent | Each host (identified by source MAC) always gets the same virtual MAC. The assignment is consistent across ARP renewals, so a host always uses the same router. | Applications requiring session persistence (stateful firewalls, ICAP proxies). Host always returns to the same gateway after ARP timeout. |
| Weighted | AVFs receive proportional traffic based on configured weight values. A router with weight 200 handles twice as much traffic as one with weight 100. | Environments with unequal router capacities — send more traffic to higher-spec routers, less to lighter hardware. |
Round-Robin example (3 AVFs): Request 1: AVG replies with MAC 0007.b400.0101 -> PC-A routes via R1 Request 2: AVG replies with MAC 0007.b400.0102 -> PC-B routes via R2 Request 3: AVG replies with MAC 0007.b400.0103 -> PC-C routes via R3 Request 4: AVG replies with MAC 0007.b400.0101 -> PC-D routes via R1 (cycle repeats) Weighted example (R1 weight 150, R2 weight 100, R3 weight 50): Total weight = 300; each router gets proportional share of ARP responses R1: 50% of clients (150/300) R2: 33% of clients (100/300) R3: 17% of clients (50/300)
12. GLBP Configuration — Cisco IOS
! ── Basic GLBP configuration (R1 — AVG) ─────────────────────────────────── R1(config)# interface GigabitEthernet0/0 R1(config-if)# ip address 192.168.20.1 255.255.255.0 R1(config-if)# glbp 1 ip 192.168.20.254 ! Virtual IP for group 1 R1(config-if)# glbp 1 priority 150 ! Highest priority = AVG R1(config-if)# glbp 1 preempt ! Reclaim AVG after recovery R1(config-if)# glbp 1 load-balancing round-robin ! Default; rotate MACs R1(config-if)# glbp 1 authentication md5 key-string SECRET ! MD5 auth R1(config-if)# glbp 1 weighting 150 ! Weight for weighted LB R1(config-if)# glbp 1 name MAIN_GW ! Optional name ! ── R2 (AVF2 -- lower priority, participates in forwarding) ─────────────── R2(config)# interface GigabitEthernet0/0 R2(config-if)# ip address 192.168.20.2 255.255.255.0 R2(config-if)# glbp 1 ip 192.168.20.254 ! Same virtual IP, same group R2(config-if)# glbp 1 priority 100 ! Backup AVG if R1 fails R2(config-if)# glbp 1 preempt R2(config-if)# glbp 1 load-balancing round-robin R2(config-if)# glbp 1 authentication md5 key-string SECRET R2(config-if)# glbp 1 weighting 100 ! ── Weighted load balancing (all routers) ───────────────────────────────── ! Configure on each router's interface: ! R1: glbp 1 weighting 200 (handles 2x the traffic of R3) ! R2: glbp 1 weighting 150 ! R3: glbp 1 weighting 100 ! Change load balancing method to host-dependent: R1(config-if)# glbp 1 load-balancing host-dependent ! ── Track uplink -- reduce weight if WAN fails ──────────────────────────── R1(config)# track 10 interface GigabitEthernet0/1 line-protocol R1(config-if)# glbp 1 weighting 200 lower 100 upper 150 ! If tracked object goes down: weight drops below lower threshold ! AVG removes this AVF from forwarding; another AVF takes its traffic
13. Verifying GLBP
! ── Show GLBP status ─────────────────────────────────────────────────────
R1# show glbp
GigabitEthernet0/0 - Group 1
State is Active
1 state change, last state change 00:15:32
Virtual IP address is 192.168.20.254
Hello time 3 sec, hold time 10 sec
Next hello sent in 1.024 secs
Redirect time 600 sec, forwarder time-out 14400 sec
Preemption enabled, min delay 0 sec
Active is local
Standby is 192.168.20.2, priority 100 (expires in 8.960 sec)
Priority 150 (configured)
Weighting 200 (configured 200), thresholds: lower 100, upper 150
Load balancing: round-robin
Group members:
aabb.cc00.0100 (192.168.20.1) local
aabb.cc00.0200 (192.168.20.2)
There are 2 forwarders (1 active)
Forwarder 1
State is Active
1 state change, last state change 00:15:32
MAC address is 0007.b400.0101 (default) <-- Virtual MAC for AVF1
Owner ID is aabb.cc00.0100
Redirection enabled
Preemption enabled, min delay 30 sec
Active is local, weighting 200
Forwarder 2
State is Active
1 state change, last state change 00:15:28
MAC address is 0007.b400.0102 (default) <-- Virtual MAC for AVF2
Owner ID is aabb.cc00.0200
Active is 192.168.20.2, weighting 100
! ── Brief format ──────────────────────────────────────────────────────────
R1# show glbp brief
Interface Grp Fwd Pri State Ident Weight AVG VIP
Gi0/0 1 - 150 Active 192.168.20.1 200 Yes 192.168.20.254
Gi0/0 1 1 - Active 192.168.20.1 - - -
Gi0/0 1 2 - Active 192.168.20.2 - - -
14. Troubleshooting VRRP and GLBP
| Symptom | Likely Cause | Diagnostic Command | Fix |
|---|---|---|---|
| Two Masters / two AVGs (split-brain) | Authentication mismatch; network partition preventing multicast exchange; different VRID/group on each router | show vrrp / show glbp on each router;
check if both show "Master"/"Active" |
Verify same VRID/group, same virtual IP, same authentication key on both routers |
| Backup/Standby never takes over on failure | Master Down Interval too long; preemption disabled on backup; multicast blocked by ACL | show vrrp detail;
debug vrrp events |
Verify timers match on both routers; check ACLs for 224.0.0.18 (VRRP) or 224.0.0.102 (GLBP); enable preempt if needed |
| Hosts still sending to failed router (stale ARP) | PC ARP cache still maps virtual IP to old path; FHRP uses same virtual MAC so this should auto-resolve | arp -a on PC; check virtual MAC consistency |
FHRP should be transparent (same virtual MAC persists); if hosts still fail, check virtual MAC is identical on both routers for same group |
| GLBP load balancing uneven | Host-dependent mode (hosts always use same router); few hosts with long ARP cache times; | show glbp — check forwarder statistics |
Switch to round-robin; reduce ARP timeout; or use weighted to match router capacities |
| VRRP/GLBP neighbour not forming | Authentication mismatch; interface not in same subnet; multicast blocked; wrong group number | debug vrrp events /
debug glbp events |
Verify auth key, same group number, same virtual IP, reachable multicast (no ACL blocking) |
15. Key Points & Exam Tips
- FHRP purpose: Eliminate single point of failure for the default gateway by sharing a virtual IP across multiple routers.
- VRRP is the open standard (RFC 5798); HSRP and GLBP are Cisco proprietary. Use VRRP in multi-vendor environments.
- VRRP election: Highest priority (1–254) wins. Tiebreaker = highest IP. Priority 255 is automatically assigned to the IP Owner (router whose real IP = virtual IP). VRRP preempts by default.
- VRRP virtual MAC: 00-00-5E-00-01-{VRID in hex}. For VRID 1 = 00-00-5E-00-01-01.
- VRRPv2 = IPv4 only; 1-second timers; plaintext auth (deprecated). VRRPv3 = IPv4 + IPv6; sub-second timers; MD5 auth via key-chain.
- VRRP load-sharing requires multiple groups per subnet — different virtual IPs per group with different Masters. Hosts split between gateway IPs.
- GLBP uses one virtual IP but multiple virtual MACs — the AVG hands out different virtual MACs to different hosts so all AVFs forward simultaneously. True active-active load balancing.
- GLBP AVG = Active Virtual Gateway — manages the group, responds to ARP requests, distributes virtual MACs. GLBP AVF = Active Virtual Forwarder — forwards traffic for its virtual MAC. Every router is an AVF; one is also the AVG.
- GLBP load-balancing methods: Round-Robin (rotate MACs, default), Host-Dependent (same MAC per host always), Weighted (proportional by configured weight).
- Object tracking in both VRRP and GLBP: tracks an uplink or route; reduces priority/weight if tracked object fails, causing an automatic handover to the router with the better uplink.
Related pages: HSRP Overview | Default Routes | Static Routing Configuration | show ip route | show ip interface brief | DHCP How It Works | OSPF Overview | HSRP First Hop Redundancy Lab | IP SLA Configuration & Tracking Lab