Ports in OpenStack can be created using the openstack port create
command. Ports are automatically created by OpenStack upon server creation or can be created and attached to instances at a later time. Users may also create ports as a method of reserving IP addresses for later use or to avoid certain addresses from being allocated by OpenStack at all.
You will need the following details, at a minimum, for the port:
For our example, the following will be used:
COOKBOOK_TENANT_NET_1
COOKBOOK_TEST_PORT_1
With the OpenStack client installed on our system, we are now able to create a port with the following command:
openstack port create COOKBOOK_TEST_PORT_1 --network COOKBOOK_TENANT_NET_1
The output will resemble the following:
When a port is created in OpenStack and associated with an instance or other virtual network device, it is bound to a Neutron agent on the respective node hosting the instance or device. Using details provided by the port, OpenStack services may construct a virtual machine interface (vif) or virtual ethernet interface (veth) on the host for use with a virtual machine, network namespace, or more depending on the application.
3.141.21.108