LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   vrrpd setup please check if I am understanding it correctly (https://www.linuxquestions.org/questions/linux-newbie-8/vrrpd-setup-please-check-if-i-am-understanding-it-correctly-4175522227/)

jzoudavy 10-15-2014 10:41 AM

vrrpd setup please check if I am understanding it correctly
 
I got two VMs running redhat 6.5 and I am trying setup VRRPD on it. But I am confused about something:

According to what I have read, I need to setup it up like this

VM A has two interfaces, 10.0.0.1 and 10.0.0.2.
VM B has two interfaces, 10.0.0.3 and 10.0.0.2.

10.0.0.2 is the VIP for vrrpd, and .1 and .3 are the VM's own IPs.

These two VMs are on the same network. When I tried to enable the .2 IP on VM B, I get an error

Code:

[root@ssrarmfe2 ~]# ifup eth1
Determining if ip address 10.0.0.2 is already in use for device eth1...
Error, some other host already uses address 10.0.0.2.

which confuses me: If I am to enable vrrpd I need both VMs to have the same VIP assigned to it. As per this doc here: http://www.austintek.com/LVS/LVS-HOW...ml#vrrpd_setup

So am I misunderstanding something?

Thanks

jzoudavy 10-15-2014 09:47 PM

as it turns out, i did misunderstand. here is the proper setup"

VM A gets IP 1. VM B gets IP2.

start vrrpd daemon with IP3. this is the VIP address.

vrrpd should run on both VMs and with different priority and the same the router id.

vrrpd does not survive reboot. Therefore you need to add it in rc.local.

vrrpd, after start, will rewrite routing file. this takes about 5 seconds to complete on my VM.

therefore, rc.local will also need to include a sleep statement to let vrrpd finish editing the routing file. and then add in a line to include things such as default gw.


All times are GMT -5. The time now is 06:32 AM.