A port is a connection point for attaching a single device, such as the NIC of a server, to a network. The port also describes the associated network configuration, such as the MAC and IP addresses to be used on that port.
Network v2
Create new port
openstack port create
--network <network>
[--description <description>]
[--fixed-ip subnet=<subnet>,ip-address=<ip-address>]
[--device <device-id>]
[--device-owner <device-owner>]
[--vnic-type <vnic-type>]
[--binding-profile <binding-profile>]
[--host <host-id>]
[--enable | --disable]
[--mac-address <mac-address>]
[--security-group <security-group> | --no-security-group]
[--dns-name <dns-name>]
[--project <project> [--project-domain <project-domain>]]
[--enable-port-security | --disable-port-security]
<name>
Network this port belongs to (name or ID)
Description of this port
Desired IP and/or subnet (name or ID) for this port: subnet=<subnet>,ip-address=<ip-address> (repeat option to set multiple fixed IP addresses)
Port device ID
Device owner of this port. This is the entity that uses the port (for example, network:dhcp).
VNIC type for this port (direct | direct-physical | macvtap | normal | baremetal, default: normal)
Custom data to be passed as binding:profile. Data may be passed as <key>=<value> or JSON. (repeat option to set multiple binding:profile data)
Allocate port on host <host-id> (ID only)
Enable port (default)
Disable port
MAC address of this port
Security group to associate with this port (name or ID) (repeat option to set multiple security groups)
Associate no security groups with this port
Set DNS name to this port (requires DNS integration extension)
Owner’s project (name or ID)
Domain the project belongs to (name or ID). This can be used in case collisions between project names exist.
Enable port security for this port (Default)
Disable port security for this port
Name of this port
Delete port(s)
openstack port delete
<port> [<port> ...]
Port(s) to delete (name or ID)
List ports
openstack port list
[--device-owner <device-owner>]
[--router <router> | --server <server>]
[--network <network>]
[--mac-address <mac-address>]
[--long]
List only ports with the specified device owner. This is the entity that uses the port (for example, network:dhcp).
List only ports attached to this router (name or ID)
List only ports attached to this server (name or ID)
List only ports attached to this network (name or ID)
List only ports with this MAC address
List additional fields in output
Set port properties
openstack port set
[--description <description>]
[--fixed-ip subnet=<subnet>,ip-address=<ip-address>]
[--no-fixed-ip]
[--device <device-id>]
[--device-owner <device-owner>]
[--vnic-type <vnic-type>]
[--binding-profile <binding-profile>]
[--no-binding-profile]
[--host <host-id>]
[--enable | --disable]
[--name <name>]
[--security-group <security-group>]
[--no-security-group]
[--enable-port-security | --disable-port-security]
[--dns-name <dns-name>]
<port>
Description of this port
Desired IP and/or subnet (name or ID) for this port: subnet=<subnet>,ip-address=<ip-address> (repeat option to set multiple fixed IP addresses)
Clear existing information of fixed IP addresses. Specify both --fixed-ip and --no-fixed-ip to overwrite the current fixed IP addresses.
Port device ID
Device owner of this port. This is the entity that uses the port (for example, network:dhcp).
VNIC type for this port (direct | direct-physical | macvtap | normal | baremetal, default: normal)
Custom data to be passed as binding:profile. Data may be passed as <key>=<value> or JSON. (repeat option to set multiple binding:profile data)
Clear existing information of binding:profile. Specify both --binding-profile and --no-binding-profile to overwrite the current binding:profile information.
Allocate port on host <host-id> (ID only)
Enable port
Disable port
Set port name
Security group to associate with this port (name or ID) (repeat option to set multiple security groups)
Clear existing security groups associated with this port
Enable port security for this port
Disable port security for this port
Set DNS name to this port (requires DNS integration extension)
Port to modify (name or ID)
Unset port properties
openstack port unset
[--fixed-ip subnet=<subnet>,ip-address=<ip-address> [...]]
[--binding-profile <binding-profile-key> [...]]
[--security-group <security-group> [...]]
<port>
Desired IP and/or subnet (name or ID) which should be removed from this port: subnet=<subnet>,ip-address=<ip-address> (repeat option to unset multiple fixed IP addresses)
Desired key which should be removed from binding-profile (repeat option to unset multiple binding:profile data)
Security group which should be removed from this port (name or ID) (repeat option to unset multiple security groups)
Port to modify (name or ID)