LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] [Keepalived] Real IP and virtual IP not in the same subnet

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: [lvs-users] [Keepalived] Real IP and virtual IP not in the same subnet
From: Stephane RIOS <s@xxxxxxxxxxxx>
Date: Fri, 08 Jul 2011 02:22:55 +0200
Hi all

This is slightly off-topic because it concerns especially keepalived and 
not lvs but i read a lot of posts in this list about keepalived so ...
I've made a very simple setup of 2 LVS nodes (Debian 5.0) on Rackspace. 
And this setup does not work.
Here's the MASTER keepalived conf :

global_defs {
     router_id my_router
}

vrrp_instance app_master {
     state MASTER
     interface eth0
     virtual_router_id 36
     priority 150
     advert_int 1
     nopreempt
     garp_master_delay 5
     virtual_ipaddress {
         31.222.179.6
     }
}

The BACKUP conf is quite the same except the "state" and "priority" 
directives of course.

Simple, isn't it ?

The real IPs of the 2 nodes are on the 31.222.176.xxx subnet and the 
virtual IP that Rackspace gave me is 31.222.179.6.
It seems that everything is working fine except that VRRP packets are 
sent but not received by either one. So immediatly after the keepalived 
daemon start, the BACKUP node enters the MASTER state and i have two 
nodes in MASTER state (huh !).

What i've done to check my config :

  - tcpdump -qn net 224.0.0.0/8 : check that the VRRP packets are sent (OK)
  - ip addr list : check that the two nodes got the virtual IP (OK but i 
don't want this !)
  - netstat -g : check that the vrrp.mcast.net (224.0.0.18) multicat 
group is registered on the interface  (OK)
  - iptables -F : delete all possible rules that could block

I tried to replicate this config with 2 VMs on my own machine and 
everything worked fine. But I assigned real IPs and virtual IP in the 
same subnet.
I also tried to add a /22 in the virtual_ipaddress field in the 
keepalived.conf but it didn't solve my problem.

So my question is : does keepalived need to have Virtual IP and real IP 
in the same subnet to work ?
Do I need to add a routing directive somewhere ?

Thank you for your help

-- 
Stéphane RIOS - agilitik.com - 06 30 26 44 80


_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

<Prev in Thread] Current Thread [Next in Thread>