Gateway redundancy protocols provide high availability and fault tolerance for network gateways by allowing multiple routers to share a virtual IP address. If the active gateway fails, another router in the group takes over, ensuring seamless connectivity for clients.
The three main gateway redundancy protocols are:
- HSRP (Hot Standby Router Protocol) – Cisco proprietary
- VRRP (Virtual Router Redundancy Protocol) – Open standard
- GLBP (Gateway Load Balancing Protocol) – Cisco proprietary with load balancing
1. Hot Standby Router Protocol (HSRP)
Overview
- Developed by Cisco.
- Uses Active/Standby model, where the active router forwards traffic and the standby takes over upon failure.
- Uses multicast address 224.0.0.2 and UDP port 1985.
- Supports preemption (forcing a higher-priority router to become active).
Basic HSRP Configuration
RouterA(config)# interface GigabitEthernet0/1
RouterA(config-if)# ip address 192.168.1.2 255.255.255.0
RouterA(config-if)# standby 1 ip 192.168.1.1
RouterA(config-if)# standby 1 priority 110
RouterA(config-if)# standby 1 preempt
RouterA(config-if)# standby 1 authentication md5 key-string MyKey
standby 1 ip 192.168.1.1→ Defines virtual IP.standby 1 priority 110→ Higher priority means it becomes active first.standby 1 preempt→ Allows preemption if a higher priority router is available.standby 1 authentication→ Adds security.
2. Virtual Router Redundancy Protocol (VRRP)
Overview
- Open standard protocol (RFC 5798).
- Works similarly to HSRP but is vendor-neutral.
- Uses multicast address 224.0.0.18 and protocol number 112.
- Supports preemption by default.
Basic VRRP Configuration
RouterA(config)# interface GigabitEthernet0/1
RouterA(config-if)# ip address 192.168.1.2 255.255.255.0
RouterA(config-if)# vrrp 1 ip 192.168.1.1
RouterA(config-if)# vrrp 1 priority 110
RouterA(config-if)# vrrp 1 preempt
vrrp 1 ip 192.168.1.1→ Defines virtual IP.vrrp 1 priority 110→ Higher priority makes this router the master.vrrp 1 preempt→ Allows higher priority routers to take over automatically.
3. Gateway Load Balancing Protocol (GLBP)
Overview
- Cisco proprietary.
- Supports load balancing among multiple gateways.
- Uses multicast address 224.0.0.102 and UDP port 3222.
- Elects an Active Virtual Gateway (AVG) that assigns virtual MAC addresses to different routers.
Basic GLBP Configuration
RouterA(config)# interface GigabitEthernet0/1
RouterA(config-if)# ip address 192.168.1.2 255.255.255.0
RouterA(config-if)# glbp 1 ip 192.168.1.1
RouterA(config-if)# glbp 1 priority 110
RouterA(config-if)# glbp 1 preempt
RouterA(config-if)# glbp 1 load-balancing round-robin
glbp 1 ip 192.168.1.1→ Defines virtual IP.glbp 1 priority 110→ Higher priority makes this router the AVG.glbp 1 load-balancing round-robin→ Distributes traffic evenly among routers.
Troubleshooting HSRP and VRRP
1. Verify Protocol Status
- Check which router is active and standby/master. bashCopyEdit
show standby brief # For HSRP show vrrp brief # For VRRP show glbp brief # For GLBP - Example output for HSRP: nginxCopyEdit
Interface Grp Pri P State Active Standby Virtual IP Gi0/1 1 110 Active local 192.168.1.3 192.168.1.1
2. Check Multicast Communication
- Ensure the routers are receiving multicast messages using debug. bashCopyEdit
debug standby events # For HSRP debug vrrp events # For VRRP debug glbp events # For GLBP - If messages are missing, check:
- Multicast filtering settings.
- Interface VLAN configuration.
3. Verify Interface Status
- Ensure the interface is up. bashCopyEdit
show ip interface brief - If the interface is down: bashCopyEdit
interface GigabitEthernet0/1 no shutdown
4. Check Priority and Preemption
- If a router is not becoming active, verify the priority settings: bashCopyEdit
show standby # HSRP show vrrp # VRRP show glbp # GLBP - If needed, increase the priority: bashCopyEdit
standby 1 priority 120 # HSRP vrrp 1 priority 120 # VRRP glbp 1 priority 120 # GLBP
5. Test Failover
- Shut down the active router’s interface and check if failover occurs: bashCopyEdit
interface GigabitEthernet0/1 shutdown - Check if the backup router becomes active: bashCopyEdit
show standby brief
Comparison of HSRP, VRRP, and GLBP
| Feature | HSRP | VRRP | GLBP |
|---|---|---|---|
| Standard | Cisco | Open | Cisco |
| Load Balancing | No | No | Yes |
| Preemption | Optional | Default | Yes |
| Active Router | Single | Single | Multiple |
| Virtual MAC | Yes | Yes | Yes |
Conclusion
- HSRP: Best for Cisco environments.
- VRRP: Best for multi-vendor networks.
- GLBP: Best when load balancing is needed.
Leave a comment