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.
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.
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
interface GigabitEthernet 0/0 standby 10 track GigabitEthernet 0/1 20 exit
Decrements priority by 20 if Gi0/1 goes down
interface GigabitEthernet 0/0 standby 10 timers 1 3 exit
Hello time: 1 second, Hold time: 3 seconds
interface GigabitEthernet 0/0 standby 10 authentication md5 key-string MySecretKey exit
interface GigabitEthernet 0/0 standby 10 preempt delay minimum 60 exit
show standby show standby brief show standby GigabitEthernet 0/0
VRRP is an industry-standard protocol that creates a virtual router. One router becomes the Master, while others remain in Backup state.
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
track 1 interface GigabitEthernet 0/1 line-protocol interface GigabitEthernet 0/0 vrrp 10 track 1 decrement 20 exit
interface GigabitEthernet 0/0 vrrp 10 timers advertise 3 exit
interface GigabitEthernet 0/0 vrrp 10 preempt delay minimum 60 exit
show vrrp show vrrp brief show vrrp interface GigabitEthernet 0/0
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.
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
interface GigabitEthernet 0/0 glbp 10 weighting 150 glbp 10 load-balancing weighted exit
interface GigabitEthernet 0/0 glbp 10 weighting track 1 decrement 20 exit track 1 interface GigabitEthernet 0/1 line-protocol
interface GigabitEthernet 0/0 glbp 10 timers 3 10 exit
Hello: 3 seconds, Hold: 10 seconds
interface GigabitEthernet 0/0 glbp 10 preempt delay minimum 60 exit
show glbp show glbp brief show glbp GigabitEthernet 0/0
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
! 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
! Verify VRRP status show vrrp show vrrp brief ! Debug VRRP debug vrrp events debug vrrp packets ! Stop debug undebug all
! Verify GLBP status show glbp show glbp brief ! Debug GLBP debug glbp events debug glbp packets ! Stop debug undebug all
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
Check priorities:
show standby | include Priority show vrrp | include Priority show glbp | include Priority
Solutions:
! Increase timers standby 10 timers 5 15 ! Add preempt delay standby 10 preempt delay minimum 60
! 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
! 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
! 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
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.