Friday, December 17, 2004

Linux and HSRP or call it LINUX HSRP

Well a hello to all after a long time.

I have been getting a lot of hits from google and yahoo for the keywords linux hsrp and leading to a post on HSRP on Cisco router.

HSRP is a Cisco properitory protocol and so cannot be implemented on linux.

But the same idea can be achieved through VRRP (Virtual Router redundancy Protocol) which is described in RFC 2338.

VRRP is also used used when you have non-cisco devices like Juniper.

If you wanna know the difference between HSRP and VRRP then you can refer to one of the previos posts "What's the difference between HSRP and VRRP?"

VRRP can be implemented on a Linux box and will provide the failover in case of the active VRRP server failure.

Remember VRRP / HSRP does not provide Load balancing feature it is failover.

In Linux you need to have the vrrpd running on both the machines.


You can get the vrrpd from http://off.net/~jme/vrrpd/

Compiling is not a difficult job here.

Once done just put the vrrpd binary in the reqd path say /usr/sbin and then make changes to the /etc/rc.conf (Unix System) or /etc/rc.d/rc (Linux system) so the vrrpd loads up when the system loads.

There is no conf file for vrrpd.

Just a few switches and there you go rolling :)

On the server run :

vrrpd -i eth0 -v 50 10.0.0.1

where the description of the switches are as below :

i : the interface name to run on
v :the id of the virtual server [1-255]
10.0.0.1 : ipaddr the ip address(es) of the virtual server
s : the
preemption mode and is enabled by default.


You can specify the priority too by using the p switch and the
default priority is 100

The box having the higher priority value would be active and serving requests.

Try this on a test environment before you put it into prod.

Hope this helps all



Nitin

0 Comments:

Post a Comment

<< Home