Skip to content

Increasing floating IP limit in Openstack

Bhuvan Sharma edited this page Dec 11, 2019 · 5 revisions

I did the following to increase the limit of floating IPs in Openstack (fgcn-backflip9):

1- Stop openstack

stack@fgcn-backflip9:~/devstack$ ./unstack.sh

2- Clean previous installation of openstack

stack@fgcn-backflip9:~/devstack$ ./clean.sh

3- Change the floating IP allocation pool in local.conf file to a /16 private address space

stack@fgcn-backflip9:~/devstack$ cat local.conf
[[local|localrc]]
ADMIN_PASSWORD=admin
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD

LOGFILE=$DEST/logs/stack.sh.log
FLOATING_RANGE=172.16.0.1/16

stack@fgcn-backflip9:~/devstack$

4- Install openstack again with new config

stack@fgcn-backflip9:~/devstack$ ./stack.sh

5- Export login information to bash:

stack@fgcn-backflip9:~/devstack$ source /opt/stack/devstack/accrc/admin/admin

6- Show project list to test openstack installation:

stack@fgcn-backflip9:~/devstack$ openstack project list
+----------------------------------+--------------------+
| ID                               | Name               |
+----------------------------------+--------------------+
| 87399416e1b64f418011a46e18eab8a8 | admin              |
| 8e84b2bf6cf946e38542e6498b30c669 | service            |
| a94627ad4a8542fcb086f8a983c25256 | alt_demo           |
| e79668e7083a4cce9379bec9207724ec | demo               |
| e84ea04a9ec24f4fb8116b3334c4ce4f | invisible_to_admin |
+----------------------------------+--------------------+

7- Change the quota of the admin project to -1 to remove the limit of floating IPs and ports.

stack@fgcn-backflip9:~/devstack$ openstack quota set admin --floating-ips -1
stack@fgcn-backflip9:~/devstack$ openstack quota set admin --port -1
stack@fgcn-backflip9:~/devstack$ openstack quota list --network
+----------------------------------+--------------+----------+-------+---------------+---------+-----------------+----------------------+---------+--------------+
| Project ID                       | Floating IPs | Networks | Ports | RBAC Policies | Routers | Security Groups | Security Group Rules | Subnets | Subnet Pools |       
+----------------------------------+--------------+----------+-------+---------------+---------+-----------------+----------------------+---------+--------------+       
| 87399416e1b64f418011a46e18eab8a8 |           -1 |      100 |    -1 |            10 |      10 |              10 |                  100 |     100 |           -1 |       
+----------------------------------+--------------+----------+-------+---------------+---------+-----------------+----------------------+---------+--------------+       
stack@fgcn-backflip9:~/devstack$

I also did the same with volumes and instances:

stack@fgcn-backflip9:~/devstack$ openstack quota set admin --volumes -1
+----------------------------------+---------+------------------+-----------+----------------------+-----------+---------+
| 95d486eb195443fda3b1ad000a1f9982 |      10 |             1000 |      1000 |                   -1 |        10 |      -1 |
+----------------------------------+---------+------------------+-----------+----------------------+-----------+---------+
stack@fgcn-backflip9:~/devstack$


stack@fgcn-backflip9:~/devstack$ openstack quota set admin --instances -1
stack@fgcn-backflip9:~/devstack$ openstack quota list --compute
+----------------------------------+-------+-----------+----------------+-----------------------------+--------------------------+-----------+-----------+----------------+-------+---------------+----------------------+
| Project ID                       | Cores | Fixed IPs | Injected Files | Injected File Content Bytes | Injected File Path Bytes | Instances | Key Pairs | Metadata Items |   Ram | Server Groups | Server Group Members |
+----------------------------------+-------+-----------+----------------+-----------------------------+--------------------------+-----------+-----------+----------------+-------+---------------+----------------------+
| 95d486eb195443fda3b1ad000a1f9982 |    20 |        -1 |              5 |                       10240 |                      255 |        -1 |       100 |            128 | 51200 |            10 |                   10 |
+----------------------------------+-------+-----------+----------------+-----------------------------+--------------------------+-----------+-----------+----------------+-------+---------------+----------------------+
stack@fgcn-backflip9:~/devstack$

Final test was done with deploying a test instance on openstack and trying to ping from backflip2 with VPN connection (see https://github.com/CN-UPB/tng-sdk-benchmark/wiki/VM-VPN-Connection)

haydar@fgcn-backflip2:~$ ping -c 5 172.16.1.22
PING 172.16.1.22 (172.16.1.22) 56(84) bytes of data.
64 bytes from 172.16.1.22: icmp_seq=1 ttl=62 time=1.75 ms
64 bytes from 172.16.1.22: icmp_seq=2 ttl=62 time=1.63 ms
64 bytes from 172.16.1.22: icmp_seq=3 ttl=62 time=1.55 ms
64 bytes from 172.16.1.22: icmp_seq=4 ttl=62 time=1.21 ms
64 bytes from 172.16.1.22: icmp_seq=5 ttl=62 time=1.07 ms

--- 172.16.1.22 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 1.071/1.445/1.757/0.262 ms
haydar@fgcn-backflip2:~$