Viewing network ports
In the compute cluster, a network port is a virtual object that allows connecting a single device, such as a VM network interface or a router interface, to a network. The port also describes the associated network configuration, for example, the MAC and IP addresses to be used on that port.
You can view all network ports created in the compute cluster and their details on the Compute > Network > Ports screen.
To view port details
Admin panel
Go to the Compute > Network > Ports screen and click the required port.
The opened pane shows the following network port details:
-
Port ID and status
The status Unknown is displayed for ports associated with floating IP addresses because such ports have no operational status.
-
Device owner type (the entity that uses the port), which can be of the following:
- Router
- Virtual machine
- Load balancer
- Floating IP
- DHCP
- None
- Name and ID of the port device
- IP and MAC addresses of the port
- Host binding (the ID of the host where the port resides)
- Name and ID of the network the port belongs to
- Port security status (if port security is enabled, security group rules and anti-spoofing rules are applied to the traffic on the port; otherwise, no such rules are applied)
- Time of the port creation and last update
Command-line interface
Use the following command:
vinfra service compute port list [--long] [--limit <limit>] [--marker <id>] [--name <name>] [--device-owner <device_owner>] [--device-id <device_id>] [--network-id <network>] [--host-id <host_id>] [--project-id <project_id>] [--mac-address <mac_address>] [--fixed-ip <ip-address|ip-address=<ip_address>,subnet-id=<subnet_id>>] [--tags <tag>[,<tag>,...]] [--sort <sort>]
--long
- Enable access and listing of all fields of objects.
--limit <limit>
- The maximum number of ports to list. To list all ports, set the option to -1.
--marker <id>
- List ports after the marker.
--name <name>
- List ports according to their name. The filter format is in:
<value1>[,<value2>,...]
. --device-owner <device_owner>
- List only ports with the specified device owner. The filter format is in:
<value1>[,<value2>,...]
. --device-id <device_id>
- List only ports with the specified device ID. The filter format is in:
<value1>[,<value2>,...]
. --network-id <network>
- List only ports connected to this network ID. The filter format is in:
<value1>[,<value2>,...]
. --host-id <host_id>
- List only ports bound to this host ID. The filter format is in:
<value1>[,<value2>,...]
. --project-id <project_id>
- List ports according to their project ID. The filter format is in:
<value1>[,<value2>,...]
. --mac-address <mac_address>
- List only ports with this MAC address. The filter format is in:
<value1>[,<value2>,...
]. --tags <tag>[,<tag>,...]
- List ports, comma separated, that have all of the specified tags. The filter format is in:
<value1>[,<value2>,...]
. --fixed-ip <ip-address|ip-address=<ip_address>,subnet-id=<subnet_id>>
- List only ports with specific IP address and/or subnet. The filter format is in:
<value1>[,<value2>,...]
. --sort <sort>
- List ports sorted by key. The sorting format is
<sort-key>:<order>
. The order isasc
ordesc
. Supported sort keys:id
,name
,status
,admin_state_up
,device_owner
,created_at
,updated_at
.
To view the list of all existing VM ports, run:
# vinfra service compute port list --device-owner compute:nova +-------------+--------+-------------+-------------------+-------------------------------+ | id | status | network_id | mac_address | fixed_ips | +-------------+--------+-------------+-------------------+-------------------------------+ | 20392abd<…> | ACTIVE | 431498f0<…> | fa:16:3e:0b:1e:c5 | - ip_address: 10.136.18.147 | | | | | | subnet_id: 32eb4ba7<…> | | 208410a5<…> | ACTIVE | 431498f0<…> | fa:16:3e:cf:57:74 | - ip_address: 10.136.18.145 | | | | | | subnet_id: 32eb4ba7<…> | | 98278078<…> | ACTIVE | 431498f0<…> | fa:16:3e:cd:6b:0f | - ip_address: 10.136.18.148 | | | | | | subnet_id: 32eb4ba7<…> | | e64f71b9<…> | N/A | cfbb5d6e<…> | fa:16:3e:64:8a:81 | - ip_address: 192.168.128.142 | | | | | | subnet_id: 66031a48<…> | +-------------+--------+-------------+-------------------+-------------------------------+
The status N/A is displayed for ports associated with floating IP addresses because such ports have no operational status.
You can check the port details in the vinfra service compute port show
output:
# vinfra service compute port show 20392abd-0837-4e93-9a5d-d6e3a7a86ebe +-------------------------+---------------------------------------------------+ | Field | Value | +-------------------------+---------------------------------------------------+ | admin_state_up | True | | allowed_address_pairs | [] | | binding_host_id | node003.vstoragedomain | | binding_profile | {} | | binding_vnic_type | normal | | created_at | 2024-09-30T14:27:15Z | | description | | | device_id | 06f8aada-bd3a-4a3f-a0ef-1fddb418992f | | device_owner | compute:nova | | dns_domain | | | dns_name | | | extra_dhcp_opts | [] | | fixed_ips | - ip_address: 10.136.18.147 | | | subnet_id: 32eb4ba7-afdf-4797-a9cb-a513ccf89f17 | | id | 20392abd-0837-4e93-9a5d-d6e3a7a86ebe | | mac_address | fa:16:3e:0b:1e:c5 | | mac_learning_enabled | | | name | | | network_id | 431498f0-ff5d-4cd8-a16e-c7b0af34aa09 | | port_security_enabled | True | | project_id | 8bf97a9e3b8c41ac9a6722503544941d | | propagate_uplink_status | | | qos_policy_id | | | resource_request | | | revision_number | 8 | | security_groups | - 2852b920-8106-4e9f-9298-c96356a9cc0a | | status | ACTIVE | | tags | [] | | updated_at | 2024-10-11T17:22:08Z | +-------------------------+---------------------------------------------------+