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 a new port
openstack port create
[--extra-property type=<property_type>,name=<property_name>,value=<property_value>]
--network <network>
[--description <description>]
[--device <device-id>]
[--mac-address <mac-address>]
[--device-owner <device-owner>]
[--vnic-type <vnic-type>]
[--host <host-id>]
[--dns-domain dns-domain]
[--dns-name <dns-name>]
[--numa-policy-required | --numa-policy-preferred | --numa-policy-legacy]
[--fixed-ip subnet=<subnet>,ip-address=<ip-address> | --no-fixed-ip]
[--binding-profile <binding-profile>]
[--enable | --disable]
[--enable-uplink-status-propagation | --disable-uplink-status-propagation]
[--project <project>]
[--project-domain <project-domain>]
[--extra-dhcp-option name=<name>[,value=<value>,ip-version={4,6}]]
[--security-group <security-group> | --no-security-group]
[--qos-policy <qos-policy>]
[--enable-port-security | --disable-port-security]
[--allowed-address ip-address=<ip-address>[,mac-address=<mac-address>]]
[--device-profile <device-profile>]
[--tag <tag> | --no-tag]
<name>
Additional parameters can be passed using this property. Default type of the extra property is string (‘str’), but other types can be used as well. Available types are: ‘dict’, ‘list’, ‘str’, ‘bool’, ‘int’. In case of ‘list’ type, ‘value’ can be semicolon-separated list of values. For ‘dict’ value is semicolon-separated list of the key:value pairs.
Network this port belongs to (name or ID)
Description of this port
Port device ID
MAC address of this port (admin only)
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 | virtio-forwarder | vdpa | remote-managed, default: normal)
Allocate port on host <host-id> (ID only)
Set DNS domain to this port (requires dns_domain extension for ports)
Set DNS name for this port (requires DNS integration extension)
NUMA affinity policy required to schedule this port
NUMA affinity policy preferred to schedule this port
NUMA affinity policy using legacy mode to schedule this port
Desired IP and/or subnet for this port (name or ID): subnet=<subnet>,ip-address=<ip-address> (repeat option to set multiple fixed IP addresses)
No IP or subnet for this port.
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)
Enable port (default)
Disable port
Enable uplink status propagate
Disable uplink status propagate (default)
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.
Extra DHCP options to be assigned to this port: name=<name>[,value=<value>,ip-version={4,6}] (repeat option to set multiple extra DHCP options)
Security group to associate with this port (name or ID) (repeat option to set multiple security groups)
Associate no security groups with this port
Attach QoS policy to this port (name or ID)
Enable port security for this port (Default)
Disable port security for this port
Add allowed-address pair associated with this port: ip-address=<ip-address>[,mac-address=<mac-address>] (repeat option to set multiple allowed-address pairs)
Cyborg port device profile
Tag to be added to the port (repeat option to set multiple tags)
No tags associated with the 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
[--format-config-file FORMAT_CONFIG]
[--sort-column SORT_COLUMN]
[--sort-ascending | --sort-descending]
[--device-owner <device-owner>]
[--host <host-id>]
[--network <network>]
[--router <router> | --server <server> | --device-id <device-id>]
[--mac-address <mac-address>]
[--long]
[--project <project>]
[--name <name>]
[--security-group <security-group>]
[--project-domain <project-domain>]
[--fixed-ip subnet=<subnet>,ip-address=<ip-address>,ip-substring=<ip-substring>]
[--tags <tag>[,<tag>,...]]
[--any-tags <tag>[,<tag>,...]]
[--not-tags <tag>[,<tag>,...]]
[--not-any-tags <tag>[,<tag>,...]]
Config file for the dict-to-csv formatter
specify the column(s) to sort the data (columns specified first have a priority, non-existing columns are ignored), can be repeated
sort the column(s) in ascending order
sort the column(s) in descending order
List only ports with the specified device owner. This is the entity that uses the port (for example, network:dhcp).
List only ports bound to this host ID
List only ports connected to this network (name or ID)
List only ports attached to this router (name or ID)
List only ports attached to this server (name or ID)
List only ports with the specified device ID
List only ports with this MAC address
List additional fields in output
List ports according to their project (name or ID)
List ports according to their name
List only ports associated with this security group
Domain the project belongs to (name or ID). This can be used in case collisions between project names exist.
Desired IP and/or subnet for filtering ports (name or ID): subnet=<subnet>,ip-address=<ip-address>,ip-substring=<ip-substring> (repeat option to set multiple fixed IP addresses)
List ports which have all given tag(s) (Comma-separated list of tags)
List ports which have any given tag(s) (Comma-separated list of tags)
Exclude ports which have all given tag(s) (Comma-separated list of tags)
Exclude ports which have any given tag(s) (Comma-separated list of tags)
Set port properties
openstack port set
[--extra-property type=<property_type>,name=<property_name>,value=<property_value>]
[--description <description>]
[--device <device-id>]
[--mac-address <mac-address>]
[--device-owner <device-owner>]
[--vnic-type <vnic-type>]
[--host <host-id>]
[--dns-domain dns-domain]
[--dns-name <dns-name>]
[--numa-policy-required | --numa-policy-preferred | --numa-policy-legacy]
[--enable | --disable]
[--name <name>]
[--fixed-ip subnet=<subnet>,ip-address=<ip-address>]
[--no-fixed-ip]
[--binding-profile <binding-profile>]
[--no-binding-profile]
[--qos-policy <qos-policy>]
[--security-group <security-group>]
[--no-security-group]
[--enable-port-security | --disable-port-security]
[--allowed-address ip-address=<ip-address>[,mac-address=<mac-address>]]
[--no-allowed-address]
[--extra-dhcp-option name=<name>[,value=<value>,ip-version={4,6}]]
[--data-plane-status <status>]
[--tag <tag>]
[--no-tag]
<port>
Additional parameters can be passed using this property. Default type of the extra property is string (‘str’), but other types can be used as well. Available types are: ‘dict’, ‘list’, ‘str’, ‘bool’, ‘int’. In case of ‘list’ type, ‘value’ can be semicolon-separated list of values. For ‘dict’ value is semicolon-separated list of the key:value pairs.
Description of this port
Port device ID
MAC address of this port (admin only)
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 | virtio-forwarder | vdpa | remote-managed, default: normal)
Allocate port on host <host-id> (ID only)
Set DNS domain to this port (requires dns_domain extension for ports)
Set DNS name for this port (requires DNS integration extension)
NUMA affinity policy required to schedule this port
NUMA affinity policy preferred to schedule this port
NUMA affinity policy using legacy mode to schedule this port
Enable port
Disable port
Set port name
Desired IP and/or subnet for this port (name or ID): 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.
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.
Attach QoS policy to this port (name or ID)
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
Add allowed-address pair associated with this port: ip-address=<ip-address>[,mac-address=<mac-address>] (repeat option to set multiple allowed-address pairs)
Clear existing allowed-address pairs associated with this port. (Specify both –allowed-address and –no-allowed-address to overwrite the current allowed-address pairs)
Extra DHCP options to be assigned to this port: name=<name>[,value=<value>,ip-version={4,6}] (repeat option to set multiple extra DHCP options)
Set data plane status of this port (ACTIVE | DOWN). Unset it to None with the ‘port unset’ command (requires data plane status extension)
Tag to be added to the port (repeat option to set multiple tags)
Clear tags associated with the port. Specify both –tag and –no-tag to overwrite current tags
Port to modify (name or ID)
Display port details
openstack port show <port>
Port to display (name or ID)
Unset port properties
openstack port unset
[--extra-property type=<property_type>,name=<property_name>,value=<property_value>]
[--fixed-ip subnet=<subnet>,ip-address=<ip-address>]
[--binding-profile <binding-profile-key>]
[--security-group <security-group>]
[--allowed-address ip-address=<ip-address>[,mac-address=<mac-address>]]
[--qos-policy]
[--data-plane-status]
[--numa-policy]
[--host]
[--tag <tag> | --all-tag]
<port>
Additional parameters can be passed using this property. Default type of the extra property is string (‘str’), but other types can be used as well. Available types are: ‘dict’, ‘list’, ‘str’, ‘bool’, ‘int’. In case of ‘list’ type, ‘value’ can be semicolon-separated list of values. For ‘dict’ value is semicolon-separated list of the key:value pairs.
Desired IP and/or subnet which should be removed from this port (name or ID): 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 this port (name or ID) (repeat option to unset multiple security groups)
Desired allowed-address pair which should be removed from this port: ip-address=<ip-address>[,mac-address=<mac-address>] (repeat option to unset multiple allowed-address pairs)
Remove the QoS policy attached to the port
Clear existing information of data plane status
Clear existing NUMA affinity policy
Clear host binding for the port.
Tag to be removed from the port (repeat option to remove multiple tags)
Clear all tags associated with the port
Port to modify (name or ID)
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.