Skip to content
Website under migration: We are moving to a new design. Some pages may look different or load slowly for a few days. Thank you for your patience.
SwitchFirewall
IPv4 Detecting…
IPv6 Detecting…

Gateway Redundancy Protocols – Complete Guide to HSRP, VRRP, and GLBP with Configuration Examples

Last updated:

What are Gateway Redundancy Protocols?

Gateway Redundancy Protocols (also called First Hop Redundancy Protocols or FHRP) provide automatic failover of the default gateway in a network. When the primary gateway fails, a backup gateway automatically takes over, ensuring uninterrupted network connectivity with minimal downtime.

Without gateway redundancy, if the default gateway router fails, all hosts lose their Internet and inter-VLAN connectivity until the router is restored or hosts are manually reconfigured to use a different gateway.

Why Use Gateway Redundancy?

Three Main Gateway Redundancy Protocols

1. HSRP (Hot Standby Router Protocol)

2. VRRP (Virtual Router Redundancy Protocol)

3. GLBP (Gateway Load Balancing Protocol)

Protocol Comparison

Feature HSRP VRRP GLBP
Type Cisco Proprietary Open Standard Cisco Proprietary
Load Balancing No (Active/Standby) No (Master/Backup) Yes (up to 4 AVFs)
Active Routers 1 Active 1 Master Up to 4 AVFs
Default Hello 3 seconds 1 second 3 seconds
Preemption Disabled by default Enabled by default Enabled by default
Priority Range 0-255 (default 100) 1-255 (default 100) 1-255 (default 100)
Multi-vendor No Yes No

Prerequisites for Gateway Redundancy Protocols

HSRP (Hot Standby Router Protocol)

How HSRP Works

HSRP creates a virtual router with a virtual IP address and virtual MAC address. One router becomes the Active router, one becomes the Standby router, and others remain in Listen state.

HSRP States

HSRP Version Differences

Basic HSRP Configuration

Scenario

configure terminal
interface GigabitEthernet 0/0
 description *** VLAN 10 Gateway ***
 ip address 192.168.10.2 255.255.255.0
 standby version 2
 standby 10 ip 192.168.10.1
 standby 10 priority 110
 standby 10 preempt
 no shutdown
exit
end
write memory
        
configure terminal
interface GigabitEthernet 0/0
 description *** VLAN 10 Gateway Backup ***
 ip address 192.168.10.3 255.255.255.0
 standby version 2
 standby 10 ip 192.168.10.1
 standby 10 priority 100
 standby 10 preempt
 no shutdown
exit
end
write memory
        

Advanced HSRP Configuration

Interface Tracking

interface GigabitEthernet 0/0
 standby 10 track GigabitEthernet 0/1 20
exit
  

Decrements priority by 20 if Gi0/1 goes down

Timer Configuration

interface GigabitEthernet 0/0
 standby 10 timers 1 3
exit
  

Hello time: 1 second, Hold time: 3 seconds

Authentication

interface GigabitEthernet 0/0
 standby 10 authentication md5 key-string MySecretKey
exit
  

Preempt Delay

interface GigabitEthernet 0/0
 standby 10 preempt delay minimum 60
exit
  

HSRP Verification

show standby
show standby brief
show standby GigabitEthernet 0/0
  

VRRP (Virtual Router Redundancy Protocol)

How VRRP Works

VRRP is an industry-standard protocol that creates a virtual router. One router becomes the Master, while others remain in Backup state.

VRRP States

Basic VRRP Configuration

Scenario

configure terminal
interface GigabitEthernet 0/0
 description *** VLAN 10 Gateway ***
 ip address 192.168.10.2 255.255.255.0
 vrrp 10 ip 192.168.10.1
 vrrp 10 priority 110
 vrrp 10 preempt
 no shutdown
exit
end
write memory
        
configure terminal
interface GigabitEthernet 0/0
 description *** VLAN 10 Gateway Backup ***
 ip address 192.168.10.3 255.255.255.0
 vrrp 10 ip 192.168.10.1
 vrrp 10 priority 100
 vrrp 10 preempt
 no shutdown
exit
end
write memory
        

Advanced VRRP Configuration

Object Tracking

track 1 interface GigabitEthernet 0/1 line-protocol

interface GigabitEthernet 0/0
 vrrp 10 track 1 decrement 20
exit
  

Timer Configuration

interface GigabitEthernet 0/0
 vrrp 10 timers advertise 3
exit
  

Preempt Delay

interface GigabitEthernet 0/0
 vrrp 10 preempt delay minimum 60
exit
  

VRRP Verification

show vrrp
show vrrp brief
show vrrp interface GigabitEthernet 0/0
  

GLBP (Gateway Load Balancing Protocol)

How GLBP Works

GLBP is unique because it provides both redundancy and load balancing. Unlike HSRP and VRRP where only one router forwards traffic, GLBP allows up to 4 routers to simultaneously forward traffic.

GLBP Terminology

GLBP Load Balancing Methods

Basic GLBP Configuration

Scenario

configure terminal
interface GigabitEthernet 0/0
 description *** VLAN 10 Gateway ***
 ip address 192.168.10.2 255.255.255.0
 glbp 10 ip 192.168.10.1
 glbp 10 priority 110
 glbp 10 preempt
 glbp 10 load-balancing round-robin
 no shutdown
exit
end
write memory
        
configure terminal
interface GigabitEthernet 0/0
 description *** VLAN 10 Gateway ***
 ip address 192.168.10.3 255.255.255.0
 glbp 10 ip 192.168.10.1
 glbp 10 priority 100
 glbp 10 preempt
 glbp 10 load-balancing round-robin
 no shutdown
exit
end
write memory
        

Advanced GLBP Configuration

Weighted Load Balancing

interface GigabitEthernet 0/0
 glbp 10 weighting 150
 glbp 10 load-balancing weighted
exit
  

Interface Tracking

interface GigabitEthernet 0/0
 glbp 10 weighting track 1 decrement 20
exit

track 1 interface GigabitEthernet 0/1 line-protocol
  

Timer Configuration

interface GigabitEthernet 0/0
 glbp 10 timers 3 10
exit
  

Hello: 3 seconds, Hold: 10 seconds

Preempt Delay

interface GigabitEthernet 0/0
 glbp 10 preempt delay minimum 60
exit
  

GLBP Verification

show glbp
show glbp brief
show glbp GigabitEthernet 0/0
  

Complete Configuration Examples

Dual-VLAN HSRP Configuration (Load Distribution)

Configure HSRP so Router 1 is Active for VLAN 10 and Router 2 is Active for VLAN 20, providing load distribution.

! Router 1 - Active for VLAN 10, Standby for VLAN 20
configure terminal

interface GigabitEthernet 0/0.10
 description *** VLAN 10 ***
 encapsulation dot1Q 10
 ip address 192.168.10.2 255.255.255.0
 standby version 2
 standby 10 ip 192.168.10.1
 standby 10 priority 110
 standby 10 preempt
exit

interface GigabitEthernet 0/0.20
 description *** VLAN 20 ***
 encapsulation dot1Q 20
 ip address 192.168.20.2 255.255.255.0
 standby version 2
 standby 20 ip 192.168.20.1
 standby 20 priority 90
 standby 20 preempt
exit

end
write memory
        
! Router 2 - Standby for VLAN 10, Active for VLAN 20
configure terminal

interface GigabitEthernet 0/0.10
 description *** VLAN 10 ***
 encapsulation dot1Q 10
 ip address 192.168.10.3 255.255.255.0
 standby version 2
 standby 10 ip 192.168.10.1
 standby 10 priority 90
 standby 10 preempt
exit

interface GigabitEthernet 0/0.20
 description *** VLAN 20 ***
 encapsulation dot1Q 20
 ip address 192.168.20.3 255.255.255.0
 standby version 2
 standby 20 ip 192.168.20.1
 standby 20 priority 110
 standby 20 preempt
exit

end
write memory
        

Troubleshooting Gateway Redundancy Protocols

HSRP Troubleshooting

! Verify HSRP status
show standby
show standby brief

! Check for mismatches
show standby | include Group
show standby | include Priority

! Debug HSRP
debug standby
debug standby events
debug standby packets

! Stop debug
undebug all
  

VRRP Troubleshooting

! Verify VRRP status
show vrrp
show vrrp brief

! Debug VRRP
debug vrrp events
debug vrrp packets

! Stop debug
undebug all
  

GLBP Troubleshooting

! Verify GLBP status
show glbp
show glbp brief

! Debug GLBP
debug glbp events
debug glbp packets

! Stop debug
undebug all
  

Common Issues

Issue 1: Both Routers Claim Active/Master Role

Cause: No connectivity between routers or multicast blocked

Solution:

! Verify IP connectivity
ping 192.168.10.3 source 192.168.10.2

! Check for ACLs blocking multicast
show ip access-lists

! Verify interfaces
show ip interface brief
  

Issue 2: Wrong Router is Active/Master

Check priorities:

show standby | include Priority
show vrrp | include Priority
show glbp | include Priority
  

Issue 3: Frequent State Changes (Flapping)

Solutions:

! Increase timers
standby 10 timers 5 15

! Add preempt delay
standby 10 preempt delay minimum 60
  

Best Practices

When to Use Which Protocol

Use HSRP When:

Use VRRP When:

Use GLBP When:

Quick Reference Command Summary

HSRP Commands

! Configuration
interface GigabitEthernet 0/0
 standby version 2
 standby 10 ip 192.168.10.1
 standby 10 priority 110
 standby 10 preempt
 standby 10 preempt delay minimum 60
 standby 10 track GigabitEthernet 0/1 20
 standby 10 authentication md5 key-string MyKey

! Verification
show standby
show standby brief
show standby GigabitEthernet 0/0

! Debug
debug standby events
undebug all
  

VRRP Commands

! Configuration
interface GigabitEthernet 0/0
 vrrp 10 ip 192.168.10.1
 vrrp 10 priority 110
 vrrp 10 preempt
 vrrp 10 preempt delay minimum 60
 vrrp 10 track 1 decrement 20
 vrrp 10 timers advertise 3

track 1 interface GigabitEthernet 0/1 line-protocol

! Verification
show vrrp
show vrrp brief
show vrrp interface GigabitEthernet 0/0

! Debug
debug vrrp events
undebug all
  

GLBP Commands

! Configuration
interface GigabitEthernet 0/0
 glbp 10 ip 192.168.10.1
 glbp 10 priority 110
 glbp 10 preempt
 glbp 10 preempt delay minimum 60
 glbp 10 load-balancing round-robin
 glbp 10 weighting 150
 glbp 10 weighting track 1 decrement 20

track 1 interface GigabitEthernet 0/1 line-protocol

! Verification
show glbp
show glbp brief
show glbp GigabitEthernet 0/0

! Debug
debug glbp events
undebug all
  

Configuration Checklist

Conclusion

Gateway redundancy protocols (HSRP, VRRP, GLBP) are essential for building highly available networks. Each protocol serves specific use cases: HSRP for Cisco-only environments, VRRP for multi-vendor deployments, and GLBP when load balancing is required.

Proper configuration with appropriate priority settings, preemption with delay, and interface tracking ensures seamless failover with minimal downtime. VRRP is generally recommended for new deployments due to its industry-standard nature and multi-vendor support, while GLBP provides unique load-balancing capabilities unavailable in other protocols.

Remember that these protocols provide redundancy at Layer 3 (gateway level) and should be combined with other redundancy mechanisms at Layer 2 (such as EtherChannel) and Layer 1 (diverse physical paths) for comprehensive network resilience. Regular testing of failover scenarios and monitoring of protocol state changes are critical for maintaining optimal network availability.

Whether deploying HSRP, VRRP, or GLBP, following best practices—including enabling preemption with delay, configuring interface tracking, using authentication, and thoroughly testing failover—ensures your network provides the high availability that modern business applications demand.