I’ve 4 virtual machines, with Debian 7 S.O., created over openstack.
The first one is a Web Server, the second one and the third one are 2 db with multi-master replica (MySQL) and the last one is a loadbalancer configured with ldirectord.
On the loadbalancer I’ve a phisical interface (eth0) and a virtual interface (eth0:0). On each of the database I’ve a lo:0 with the same ip of the virtual interface created over the loadbalancer. From each db I can ping the virtual interface of the loadbalancer without problem, but when I try to ping that virtual interface from the web server I’ve this result:
PING 172.29.12.13 (172.29.12.13) 56(84) bytes of data. From 172.29.12.4 icmp_seq=1 Destination Host Unreachable
and if I try to connect to MySQL (with the load balancer) it doesn’t work!
If I try to send ARP -n command from the webserver, I can't get mac address of the virtual interface of the loadbalancer (eth0:0)
I’ve the same configuration with 4 virtual machines on my desktop created with VMWare and I haven’t any problem!
There’re some difference between VMWare and OpenStack?
Any suggestion?
Thanks a lot and sorry for my English
This is the /etc/network/interfaces of the loadbalancer
# The loopback network interface
auto lo
iface lo inet loopback
# The normal eth0
auto eth0
iface eth0 inet static
address 172.29.12.5
netmask 255.255.255.0
broadcast 172.29.12.255
network 172.29.12.0
gateway 172.29.12.1
# Maybe the VM has 2 NICs?
allow-hotplug eth1
iface eth1 inet dhcp
# Maybe the VM has 3 NICs?
allow-hotplug eth2
iface eth2 inet dhcp
# Virtual Interface for ldirectord
auto eth0:0
iface eth0:0 inet static
address 172.29.12.13
netmask 255.255.255.0
broadcast 172.29.12.255
This is the /etc/network/interfaces of the db
# The loopback network interface
auto lo
iface lo inet loopback
# The normal eth0
auto eth0
iface eth0 inet static
address 172.29.12.11
netmask 255.255.255.0
broadcast 172.29.12.255
gateway 172.29.12.1
# Maybe the VM has 2 NICs?
allow-hotplug eth1
iface eth1 inet dhcp
# Maybe the VM has 3 NICs?
allow-hotplug eth2
iface eth2 inet dhcp
# Virtual interface for loadbalancer
auto lo:0
iface lo:0 inet static
address 172.29.12.13
netmask 255.255.255.255
pre-up sysctl -p > /dev/null
post-up route add -host 172.29.12.13 dev lo:0