How to configure multiple Floating IP for one instance?
I am running OpenStack havana on Ubuntu 12.04 LTS. This is a single node installation running with neutron. I would like to setup another Floating IP pool. I follow this guide : link text
I have three physics network, two external networks(eth1:br-ex,eth2:br-ex2) and one data network for network-node and compute-node(eth3:br-data).
step 1: create two neutron internal net on br-data and one neutron external net (for floating IP pool) on each external network.
step 2: create an instance with two net, and it create two interface.
step 3: connect to the vm, the eth0 and eth1 is configured auto. I follow the note in this guide: link text
step 4: create a floating ip from the pool of each external net. Two floating ip was attached to the instance ports.
My problem is the floating ip of first port in instance is enable, the second is disable, like:
root@node4:/# ping 10.141.127.106
PING 10.141.127.106 (10.141.127.106) 56(84) bytes of data.
64 bytes from 10.141.127.106: icmp_req=1 ttl=63 time=1.16 ms
64 bytes from 10.141.127.106: icmp_req=2 ttl=63 time=0.270 ms
root@node4:/# ping 10.0.0.11
PING 10.0.0.11 (10.0.0.11) 56(84) bytes of data.
^C
--- 10.0.0.11 ping statistics ---
8 packets transmitted, 0 received, 100% packet loss, time 6999ms
infomation:
+--------------------------------------+----------+------------------------------------------------------+
| id | name | subnets |
+--------------------------------------+----------+------------------------------------------------------+
| 9b5f614c-f542-4cce-a0cc-bf4b38ff0213 | net02 | 7a711c7d-94d3-40e6-a9dd-1c39970c7070 80.168.1.0/24 |
| bdf7a125-30bb-4032-b2b2-5572f7d6b878 | public01 | 7350863b-ea98-4556-90cd-b0f19015eb2d 10.141.127.0/24 |
| c57b87fa-38d2-4d09-8074-710b6c80851c | public02 | 7ac7e8f3-9a78-4f2c-a374-ae9c4e45e9cd 10.0.0.0/24 |
| f29e196c-00af-4897-a216-77dd4ae6c1a3 | net01 | 27d24911-9a88-4250-91ac-ced0ba6094fe 80.168.0.0/24 |
+--------------------------------------+----------+------------------------------------------------------+
root@node4:/# nova interface-list test
+------------+--------------------------------------+--------------------------------------+--------------+-------------------+
| Port State | Port ID | Net ID | IP addresses | MAC Addr |
+------------+--------------------------------------+--------------------------------------+--------------+-------------------+
| DOWN | 905c0f9a-6537-45b7-8cd4-f37f5b2e1020 | 9b5f614c-f542-4cce-a0cc-bf4b38ff0213 | 80.168.1.2 | fa:16:3e:df:92:67 |
| DOWN | cab602f4-ab80-4fe4-b7b3-89cef4799624 | f29e196c-00af-4897-a216-77dd4ae6c1a3 | 80.168.0.2 | fa:16:3e:6c:f1:7d |
+------------+--------------------------------------+--------------------------------------+--------------+-------------------+
root@node4:/#
root@node4:/# nova list
+--------------------------------------+------+--------+------------+-------------+---------------------------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------+--------+------------+-------------+---------------------------------------------------------------+
| 9b485760-92e9-44d7-85d5-1db79d25906f | test | ACTIVE | None | Running | net01=80.168.0.2, 10.141.127.106; net02=80.168.1.2, 10.0.0.11 |
+--------------------------------------+------+--------+------------+-------------+---------------------------------------------------------------+
root@node4:/# neutron floatingip-list
+--------------------------------------+------------------+---------------------+--------------------------------------+
| id | fixed_ip_address | floating_ip_address | port_id |
+--------------------------------------+------------------+---------------------+--------------------------------------+
| 6eb12f46-5e7d-4da5-b29e-e3277bddfe81 | 80.168.0.2 | 10.141.127.106 | cab602f4-ab80-4fe4-b7b3-89cef4799624 |
| fbefb0e9-8020-4e6c-9092-e6b71e04907d | 80.168.1.2 | 10.0.0.11 | 905c0f9a-6537-45b7-8cd4-f37f5b2e1020 |
+--------------------------------------+------------------+---------------------+--------------------------------------+
Thanks
could it be because the instance has only one default route?
maybe, I will confirm it tomorrow. Should I create one router on the eth1 of the instance with the floating ip gateway?
First try this: Change the default gateway on the instance to use eth1 instead of eth0. Then try pinging the 2nd floating ip again. My theory is that the ping replies are being routed back via the other interface and conntrack in router can't match it to what came in. Use tcpdump to see.
Why someone should need multiple floating IPs for a VM?
I think you are right, but with do this, another floating ip is failed to connect, just ip 10.141.127.106 address is disconnected. I have an application running in a virtual machine, it needs to communicate with the other two external network applications, and these applications are embedded into two separate devices.