Here we look at How to add an additional IP to one of your OpenStack Instances
We use the python command line client, if you have not used the Python client before see This post first
First We locate the Server UUID and network UUID
123456
# nova list
+--------------------------------------+------------------+--------+------------+-------------+------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------------------+--------+------------+-------------+------------------------------+
| 4d915206-d10b-40e8-8afe-58e94584d964 | test | ACTIVE | - | Running | 1=10.0.13.220, 46.37.188.239 |
+--------------------------------------+------------------+--------+------------+-------------+------------------------------+
123456
# nova net-list
+--------------------------------------+----------+------+
| ID | Label | CIDR |
+--------------------------------------+----------+------+
| 42d57ff8-fd1e-47f4-8904-df2166916e26 | 1 | None |
+--------------------------------------+----------+------+
Now using the above We add an extra fixed IP
1
nova add-fixed-ip 4d915206-d10b-40e8-8afe-58e94584d964 42d57ff8-fd1e-47f4-8904-df2166916e26
Then we check the IP is added
123456
# nova list
+--------------------------------------+------------------+--------+------------+-------------+-------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------------------+--------+------------+-------------+-------------------------------------------+
| 4d915206-d10b-40e8-8afe-58e94584d964 | test | ACTIVE | - | Running | 1=10.0.13.220, 10.0.13.221, 46.37.188.239 |
+--------------------------------------+------------------+--------+------------+-------------+-------------------------------------------+
Now you can add the extra IP within the instance’s Operating system - This will very depending upon the image you have used, linux, windows BSD etc…