In the world of first hop redundancy, we have plenty of choices. In order to make the right decision for your network you should know the basics regarding all three. The following chart provides a quick breakdown of each protocol.
HSRP | VRRPd | GLBP | |
Standard | RFC2281 | RFC3768 | none |
Load Balancing | No | No | Yes |
OSI | Layer-3 | Layer-3 | Layer-2 |
Transport | UDP 1985 | IP 112 | UDP 3222 |
Default Hello | 3 seconds | 1 seconds | 3 seconds |
Multicast Group | 224.0.0.2 | 224.0.0.18 | 224.0.0.102 |
Mac Adress | 0000.0c07.acxx | 0000.5e00.01xx | 0007.b4xx.xxxx |
IPv6 | Yes | No | Yes |
Hot Standby Router Protocol
When implementing HSRP, two or more routers are configured with the standby IP on a broadcast interface, usually an Ethernet segment, and a passive election is held to determine the active router. The active router answers ARP requests for the standby IP with a virtual MAC address, so every host that sends packets to the standby IP winds up sending it to the active router. If the active router dies, another election is held.
HSRP Configuration
Configuration Options
Router(config)#int fa 0/0 Router(config-if)#ip address 10.0.1.2 255.255.255.0 Router(config-if)#standby 1 ip 10.0.1.1 Router(config-if)#standby 1 preempt Router(config-if)#standby version ? <1-2> Version number Router(config-if)#standby 1 timers ? <1-254> Hello interval in seconds msec Specify hello interval in milliseconds Router(config-if)#standby 1 timers 10 ? <11-255> Hold time in seconds Router(config-if)#standby 1 priority ? <0-255> Priority value Router(config-if)#standby 1 authentication md5 key-string ? 0 Specifies an UNENCRYPTED key string will follow 7 Specifies a HIDDEN key string will follow WORD Key string (64 chars max)
Sample Config
interface FastEthernet0/0 ip address 10.0.1.2 255.255.255.0 standby version 2 standby 1 ip 10.0.1.1 standby 1 timers 3 10 standby 1 priority 110 standby 1 preempt standby 1 authentication md5 key-string r0ut3rone
Virtual Router Redundancy Protocol
VRRP is a non-proprietary (read: open standard) first hop redundancy protocol that was actually based off of Cisco’s HSRP. In a VRRP configuration, one router is elected as the virtual router master, with the other routers acting as backups in case the virtual router master fails. One benefit to using VRRP in addition to it being an open standards protocol, is that you can configure an interfaces original IP as the virtual IP address for the group.
VRRP Configuration
Configuration Options
Router(config)#int fa 0/0 Router(config-if)#ip address 10.0.1.2 255.255.255.0 Router(config-if)#vrrp 1 ip 10.0.1.1 Router(config-if)#vrrp 1 timers ? advertise Set the Advertisement timer learn Learn timer values from current Master Router(config-if)#vrrp 1 timers advertise ? <1-255> Advertisement interval in seconds msec Specify time in milliseconds Router(config-if)#vrrp 1 priority ? <1-254> Priority level Router(config-if)#vrrp 1 preempt Router(config-if)#vrrp 1 auth md5 key-string ? 0 Specifies an UNENCRYPTED key string will follow 7 Specifies a HIDDEN key string will follow WORD Key string (64 chars max)
Sample Config
interface FastEthernet0/0 ip address 10.0.1.2 255.255.255.0 vrrp 1 ip 10.0.1.1 vrrp 1 timers 1 4 vrrp 1 priority 110 vrrp 1 preempt vrrp 1 authentication md5 key-string r0ut3rone
Gateway Load Balancing Protocol
GLBP provides a standby IP just as HSRP, but it also provides multiple virtual MAC addresses. When a host on the connected network sends an ARP request, one of the routers answers with the virtual MAC address. The next time a host ARPs, a different router answers with a different virtual MAC address. This allows you to load balancing traffic across each router doing GLBP via the virtual MACs, although its impossible for this to pan out in the real world due to the way machines send ARP requests. If a router vanishes, one of the other participating routers takes over for that virtual MAC. GLBP is the only protocol of the three that provides native load balancing.
GLBP Configuration
Configuration Options
Router(config)#int fa 0/0 Router(config-if)#ip address 10.0.1.2 255.255.255.0 Router(config-if)#glbp 1 ip 10.0.1.1 Router(config-if)#glbp 1 timers ? <1-60> Hello interval in seconds msec Specify hello interval in milliseconds redirect Specify timeout values for failed forwarders Router(config-if)#glbp 1 timers 1 ? <2-180> Hold time in seconds msec Specify hold time in milliseconds Router(config-if)#glbp 1 timers redirect ? <0-3600> Interval in seconds to redirect to failed forwarders Router(config-if)#glbp 1 timers redirect 10 ? <610-64800> Timeout interval in seconds for failed forwarders Router(config-if)#glbp 1 priority ? <1-255> Priority value Router(config-if)#glbp 1 preempt Router(config-if)#glbp 1 forwarder preempt Router(config-if)#glbp 1 auth md5 key-string ? 0 Specifies an UNENCRYPTED key string will follow 7 Specifies a HIDDEN key string will follow WORD Key string (64 chars max) Router(config-if)#glbp 1 load-balancing ? host-dependent Load balance equally, source MAC determines forwarder choice round-robin Load balance equally using each forwarder in turn weighted Load balance in proportion to forwarder weighting <cr>
Sample Config
interface FastEthernet0/0 ip address 10.0.1.2 255.255.255.0 glbp 1 ip 10.0.1.1 glbp 1 timers 1 4 glbp 1 priority 110 glbp 1 preempt glbp 1 authentication md5 key-string r0ut3rone
Conclusion
Do you actually expect me to tell you which one of these is best for your network? The answer is highly subjective and has to fit your needs. While I didn’t cover all the options ( a few that I left out that come to mind are Common Address Redundancy Protocol (CARP) and Routed Split Multi-Link Trunking (RSMLT) — both of which are not implement in IOS), I hope to of given you enough to go on to make an educated decision. As always, please direct any questions you may have to the comments and I’ll try to get back with you as soon as possible.
Network engineer turned management currently servicing the enterprise data center market. I started working on networks in the ’90s and still feel like that was just a few years ago. Jack of all trades, master of none; I love to learn about everything. Feel free to ask me about photography, woodworking, nhra, watches, or even networking! — For feedback, please leave a comment on the article in question, and I’ll respond as soon as I can. For everything else including fan mail or death threats, contact me via twitter.