Changing internal IP address

Each instance when created receives an internal IP address selected by DHCP:

Changing this address is only possible from the CLI command line →CLI Client Configuration for OpenStack - For Linux (Ubuntu) or Client Configuration CLI for OpenStack - For Windows.

Creating a new port that will be assigned to a given network/subnet. To create a port, we need the name or ID of the network and subnet. We can obtain these names using the command:

openstack subnet list

openstack network list

Syntax commands:

openstack port create --fixed-ip subnet=<subnet>
,ip-address=<address> --network <network> <name>

Example command:

openstack port create --fixed-ip subnet=Internat\_network\_subnet
,ip-address=192.168.5.200 --network Internat\_network TestChangePort

The port will be added to the default security group. We can change this with the command:

openstack port set --security-group <security-group> <port name>

Connecting the port to the instance.

Command syntax:

openstack server add port <server> <port>

Example command:

openstack server add port Ubuntu\_22\_04\_internal\_Ports\_test TestChangePort

Port disconnected from the instance.

Command syntax:

openstack server remove port <server> <port>

Example command:

openstack server remove port Ubuntu\_22\_04\_internal\_Ports\_test ceac08d3-8f17-47a8-ace8-fdc284d86459

Port deletion:

Command syntax:

openstack port delete <ID port>

Example command:

openstack port delete f6d16867-c0b1-4a03-9e54-ef02eca73ca5