Using the openstack server add port or openstack server add fixed ip commands, you can attach an existing or new port to running instances.
The openstack server add port command can be used as follows:
openstack server add port <server> <port>
The port argument specifies the port to be attached to the given server. The port must be one that is not currently associated with any other instance or resource. Otherwise, the operation will fail.
The openstack server add fixed ip command can be used as follows:
openstack server add fixed ip
[--fixed-ip-address <ip-address>]
<server> <network>
The network argument specifies the network to be attached to the given server. A new port that has a unique MAC address and an IP from the specified network will be created automatically.
The --fixed-ip-address argument can be used to specify a particular IP address in the given network rather than relying on an automatic assignment from Neutron.