Ask Your Question
1

Can't reuse floating IP in DVR - Kilo (neutron)

asked 2015-07-01 02:08:43 -0500

VolkanSerna gravatar image

Hi @ all.

I have a problem with DVR if I reuse my floating IP after I disassociate it from the instance. After reusing the same floatin ip on the same insance, I can't ping my external gateway anymore for 15 minutes. After this, it works from it's own.

And the really strange thing is, that my instances and my routers always use the next ip, and not the ip again, that is free again. Example:

create router:
virtual router ip : 192.168.102.10
delete router
create new router:
virtual router ip : 192.168.102.11

The same with the instances.
create instance:
ip : 192.168.0.20
delete instance
create new instance:
ip : 192.168.0.21

First. DVR on the Compute node, without a associated floatin ip. Ping to external Network works fine.

192.168.0.0/24 --> internal IP 192.168.102.0/23 --> external IP

[root@ostacktbl14 ~]# ip netns exec qrouter-7aa5ca7f-1c1e-43ca-9ec6-6478d739efc4 ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
48: qr-41e6384c-1d: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/ether fa:16:3e:01:ce:06 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.1/24 brd 192.168.0.255 scope global qr-41e6384c-1d
       valid_lft forever preferred_lft forever
    inet6 fe80::f816:3eff:fe01:ce06/64 scope link
       valid_lft forever preferred_lft forever

[root@ostacktbl14 ~]# ip netns exec qrouter-7aa5ca7f-1c1e-43ca-9ec6-6478d739efc4 route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 qr-41e6384c-1d

[root@ostacktbl14 ~]# ip netns exec qrouter-7aa5ca7f-1c1e-43ca-9ec6-6478d739efc4 ssh cirros@192.168.0.6
Warning: Permanently added '192.168.0.6' (RSA) to the list of known hosts.
cirros@192.168.0.6's password:

$ ping 192.168.102.10
PING 192.168.102.10 (192.168.102.10): 56 data bytes
64 bytes from 192.168.102.10: seq=0 ttl=63 time=3.135 ms
64 bytes from 192.168.102.10: seq=1 ttl=63 time=1.284 ms

With a new associated floatin ip: Floating IP = 192.168.102.253

[root@ostacktbl14 ~]# ip netns
fip-615aa46d-b9eb-45d0-b323-5e8cf3afbc39
qrouter-7aa5ca7f-1c1e-43ca-9ec6-6478d739efc4

[root@ostacktbl14 ~]# ip netns exec fip-615aa46d-b9eb-45d0-b323-5e8cf3afbc39 ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: fpr-7aa5ca7f-1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 3a:cc:90:83:f8:83 brd ff:ff:ff:ff:ff:ff
    inet 169.254.31.29/31 scope global fpr-7aa5ca7f-1
       valid_lft forever preferred_lft forever
    inet6 fe80::38cc ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-07-20 20:45:38 -0500

cxclark01 gravatar image

updated 2015-07-21 10:37:11 -0500

dbaxps gravatar image

BE CAREFUL WITH THIS -- You cant add back one IP in the middle of the block -- you can only add back a large range.

[root@servera ~]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 407
Server version: 5.5.40-MariaDB-wsrep MariaDB Server, wsrep_25.11.r4026

Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.



MariaDB [(none)]> use neutron
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [neutron]> select * from ipavailabilityranges;
+--------------------------------------+-------------+---------------+
| allocation_pool_id                   | first_ip    | last_ip       |
+--------------------------------------+-------------+---------------+
| 0959bd20-8b4f-4c20-8a98-ba9aadb350f7 | 192.168.0.4 | 192.168.0.254 |
| aaeb8a87-d330-49c8-ac53-4997a5d4e3d8 | 192.168.0.4 | 192.168.0.254 |
| efd1848c-23ec-4900-9d27-d4891049da20 | 172.25.1.29 | 172.25.1.99   |
+--------------------------------------+-------------+---------------+
3 rows in set (0.00 sec)

UPDATE ipavailabilityranges
SET first_ip = '172.25.1.28'
WHERE allocation_pool_id='efd1848c-23ec-4900-9d27-d4891049da20';

Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [neutron]> select * from ipavailabilityranges where allocation_pool_id='efd1848c-23ec-4900-9d27-d4891049da20';
+--------------------------------------+-------------+-------------+
| allocation_pool_id                   | first_ip    | last_ip     |
+--------------------------------------+-------------+-------------+
| efd1848c-23ec-4900-9d27-d4891049da20 | 172.25.1.28 | 172.25.1.99 |
+--------------------------------------+-------------+-------------+
1 row in set (0.00 sec)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-07-01 02:08:43 -0500

Seen: 418 times

Last updated: Jul 21 '15