Wednesday, May 22, 2013

the Major Differences Between HSRP&VRRP



When configuring high availability gateways between multiple routers you only have a couple of options to choose from. If you have all Cisco routers chances are you will be configuring and using HSRP to provide redundancy between your routers. If you have Juniper, Foundry (Brocade), or any another router you'll most likely use VRRP.

Oh sure, there's CARP or GLBP that you might use depending on the situation.  But almost always you'll choose between HSRP and VRRP.

So which one is best?  Or does it really matter?
HSRP stands for Hot Standby Routing Protocol. VRRP stands for Virtual Route Rendundancy Protocol. The differences between HSRP versus VRRP are very slight especially when looking at the basic configuration side by side. But under the covers there are some significant differences. The end result however is still the same.

If a router fails you need a standby router to become the active gateway and forward packets to the next hop.

Here's a breakdown that compares the major differences between the two protocols.

HSRP Versus VRRP Comparison Table
HSRP
VRRP
Propietary
Standards based
RFC 2281
RFC 3768
Separate IP Address needed for the Virtual
Can use the physical IP Address of the Virtual, if needed, saving IP space.
One Master, all other routers are backup
One Master, One Standby, all others are listening
More familiar to most network engineers
Less familiar - yet very similar
Can track an interface for failover
Can track an interface for failover (depending on operating system and version)
All HSRP routers use multicast hello packets to 224.0.0.2 (all routers) for version 1 or 224.0.0.102 for version 2.
All VRRP routers use IP protcol number 112 (vrrp) to communicate via multicast IP address 224.0.0.18
All virtual router must use MAC address 0000.0c07.acXX where XX is the group ID.
All virtual routers must use 00-00-5E-00-01-XX as its Media Access Control (MAC) address

Configuration differences between HSRP and VRRP
The differences between both VRRP and HSRP, especially on a Cisco router are very slight.  If your familiar with Configuring HSRP you can easily understand VRRP commands.  Configuring VRRP on Juniper as well as other network equipment can vary significantly depending on the devices.  Many load balancers also support VRRP and their configuration is specific to each of these devices.

Here are some configuration examples as seen on a Cisco router:

HSRP Configuration Example
R1(config)# interface GigE 0/1
R1(config-if)# ip address 192.168.1.2 255.255.255.0
R1(config-if)# standby 1 ip 192.168.1.1
R1(config-if)# standby 1 priority 200
R1(config-if)# standby 1 preempt

R2(config-if)# ip address 192.168.1.3 255.255.255.0
R2(config-if)# standby 1 ip 192.168.1.1
R2(config-if)# standby 1 preempt

VRRP Configuration Example
R1(config)# interface GigE 0/1
R1(config-if)# ip address 192.168.1.2 255.255.255.0
R1(config-if)# vrrp 1 ip 192.168.1.1
R1(config-if)# vrrp 1 priority 110

R2(config)# interface GigE 0/1
R2(config-if)# ip address 192.168.1.3 255.255.255.0
R2(config-if)# vrrp 1 ip 192.168.1.1

Notice the lack of a preempt command. This isn't necessary for VRRP.  It's enabled by default.
As you can see there sin't a big difference between the two protocols. The primary difference between HSRP versus VRRP would be that HSRP is proprietary to Cisco and can only be used on Cisco devices. VRRP is a standards based protocol and is vendor independant allow some flexibility when choosing network devices.

More Related Networking Tips:

No comments:

Post a Comment