1

I have an open stack VM instance having two NICs added from same Sub-Net. Both nics are configured for DHCP. When i start VM instance it gets one DHCP ip on each interface. I am able to ping this VM instance from other VM intance on same network and other VM from inside this VM instance. Problem comes when i assign floating IP to one of the interface. I am able to access VM from floating IP if Floating IP is assigned to the interface which has the default gateway.

i have two interface eth0 ad eth1 and having private DHCP ip assigned

[#] ifconfig|egrep "Link encap|inet addr"
eth0      Link encap:Ethernet  HWaddr FA:16:3E:44:CA:E5
          inet addr:10.0.0.13  Bcast:10.0.0.255  Mask:255.255.255.0

eth1      Link encap:Ethernet  HWaddr FA:16:3E:DA:95:C5
          inet addr:10.0.0.155  Bcast:10.0.0.255  Mask:255.255.255.0

Following is routing table:

[#] netstat -ar
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.0.0.0        *               255.255.255.0   U         0 0          0 eth0
10.0.0.0        *               255.255.255.0   U         0 0          0 eth1
link-local      *               255.255.0.0     U         0 0          0 eth0
link-local      *               255.255.0.0     U         0 0          0 eth1
default         host-10-0-0-1.s 0.0.0.0         UG        0 0          0 eth1

If I associate some floating IP with private IP '10.0.0.155' (assigned to eth1) and default gateway is also configured out of eth1 as shown in routing table above then I am able to access VM by floating IP. But if I associate floating IP with private IP '10.0.0.13' (assigned to eth0) then I am not able to access VM by floating IP. Now if I delete this default route and add new route with same gateway but this time use interface eth0. Then on attaching floating IP with IP '10.0.0.13' (assigned to eth0) I can access VM but now not able to access VM if I assign floating IP to private IP '10.0.0.1155' (assigned to eth1).

Cameron Kerr
  • 3,919
  • 18
  • 24
rkrdev
  • 11
  • 1
  • Why do you have two interfaces on one box plugged into the same subnet? It seems that what you really want is a bonded link, either for performance of redundancy. – Cameron Kerr May 07 '15 at 15:05
  • Thanks Cameron, for comment. Initially i tried both interface on different subnet which is what i want. There also i faced same issue and at that time there were different gateways there for each network but only one default gateway was getting added in the routing table. DHCP client forked for one NIC replaces the entry added by other. Then to rule out the different gateway i configured both nic for some subnet but issue still persist. – rkrdev May 08 '15 at 06:11
  • How about you draw a diagram of what you want, with the addresses you wanted and including the floating IP. that should help make it easier to see what you want to achieve and to discuss what is happening. – Cameron Kerr May 08 '15 at 07:51
  • Looks like i am not able to draw diagram properly. Not sure if their is a way to attach an images or not. What i want is if user attach my public ip to any of the interface in open stack gui then he should be able to access the VM from public network. Internally two networks card of diff network will be used by application for communication to different network. This is not happening here – rkrdev May 08 '15 at 13:28

0 Answers0