Managing public IPs
Find out how to assign, move and release public IP addresses on SNC Cloud Platform using independent Neutron ports that survive instance recreation
Objective
Practical guide to assigning, moving, and releasing public IP addresses on this platform via independent Neutron ports. The additional-IP feature is landing with major release #2; in the meantime, keeping the same public address across instances calls for dedicated management, detailed here. Target audience: anyone provisioning instances on this platform.
This guide describes how to manage public IP addresses on this platform so they can be detached from one instance and reattached to another without being lost — a common need (instance recreation, migration, switching a test environment) that, without care, results in the IP disappearing.
Overview
The additional-IP feature will be available starting with the platform's major release #2. In the meantime, a public IP is obtained by attaching a second network interface directly to the shared external network Ext-Net — which calls for dedicated management to keep the same address across instances.
The approach to favour is creating the Neutron port independently of any instance, then attaching it to instance A. You can then detach that independent port from instance A and attach it to instance B without losing the address.
This guide details how to implement this approach, including one limitation to be aware of (see the note in step 1).
Requirements
- The
openstackCLI configured (see the Terraform guide forclouds.yaml-based authentication). - The ID of the
Ext-Netexternal network and its subnet:
Instructions
Independent port vs. implicit port
Whether a Neutron port survives an instance's lifecycle depends entirely on how it was created, not on its attachment state at any given moment:
Practical consequence: always create the port separately, before the instance, whenever you want to keep the option of reusing the IP. There is no way to "convert" an already-attached implicit port into an independent one afterwards. Attempting it (detach then reattach) destroys the port and releases the IP back to the pool, just like any deletion.
Step 1 — Creating an independent port on Ext-Net
Neutron automatically assigns a free IP from the Ext-Net pool. Retrieve the address:
Good to know: on Ext-Net, the address is always auto-assigned from the pool — picking a specific IP ahead of time is not possible:
The benefit of an independent port remains fully intact (portability across instances); only the ability to pick the address ahead of time is missing. On a private network (e.g. an internal network you created), choosing a specific IP works normally.
Step 2 — Attaching the port to a new instance
Step 3 — Attaching the port to an already-existing instance
If the instance was created before the port, or already exists without a public interface:
Verify:
Step 4 — Moving the IP to another instance
This is the target scenario of this guide: reusing the same public IP after recreating or replacing an instance.
The port — and therefore the IP — is never returned to the pool: it moves directly from one instance to the other. Expect a few seconds of network interruption during the detach/attach.
This operation is only safe on a port created independently (step 1). On an implicit port, server remove port destroys it immediately instead of detaching it — see known pitfalls.
Step 5 — Finding which IP is attached to which instance
A port with an empty Device ID column is detached (independent and currently free, ready to be attached to an instance).
Step 6 — Releasing a port
If the IP is no longer needed, deleting the port returns it to the Ext-Net pool:
Known pitfalls (troubleshooting)
Go further
Terraform guide — network attachment pattern (second interface on Ext-Net), section "No floating IP / Neutron router".
Creating a Windows Server VM — manual IP configuration after a change, on a Windows VM.
Official OpenStack CLI documentation on ports: docs.openstack.org — Network v2.
For training or technical assistance implementing our solutions, contact your sales representative or visit our Professional Services page to request a quote and have your project analysed by our experts.
Join our community of users.