Viewing router ports

Prerequisites

To view router ports

Admin panel

  1. Go to the Compute > Network > Routers screen and click the router name.
  2. On the Ports tab, click a router port to view its details.

Router port details include:

  • Port ID
  • Port status
  • Name and ID of the port device (that is, router name/ID)
  • Device owner (the entity that uses the port)
  • MAC address of the port
  • IP address of the port
  • Host binding
  • Network the port belongs to
  • 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 is asc or desc. Supported sort keys: id, name, status, admin_state_up, device_owner, created_at, updated_at.

To view the list of ports for the router with the ID 59a448af-e178-4cf5-b6e7-602d5ce22b25, run:

# vinfra service compute port list --device-id 59a448af-e178-4cf5-b6e7-602d5ce22b25
+-------------+--------+-------------+-------------------+-------------------------------+
| id          | status | network_id  | mac_address       | fixed_ips                     |
+-------------+--------+-------------+-------------------+-------------------------------+
| 13a7a406<…> | ACTIVE | 74f8b095<…> | fa:16:3e:da:c7:fa | - ip_address: 169.254.192.84  |
|             |        |             |                   |   subnet_id: b0f291a8<…>      |
| 3a894732<…> | ACTIVE | 741b706b<…> | fa:16:3e:db:d3:ee | - ip_address: 10.136.18.134   |
|             |        |             |                   |   subnet_id: 41c86ca9<…>      |
| 4c892abc<…> | ACTIVE | b1d5215d<…> | fa:16:3e:0b:8d:16 | - ip_address: 192.168.128.1   |
|             |        |             |                   |   subnet_id: f05899af<…>      |
| 76247386<…> | ACTIVE | b1d5215d<…> | fa:16:3e:50:29:8b | - ip_address: 192.168.128.169 |
|             |        |             |                   |   subnet_id: f05899af<…>      |
+-------------+--------+-------------+-------------------+-------------------------------+

You can check the port details in the vinfra service compute port show output:

# vinfra service compute port show 3a894732-afb1-461e-bc2f-54aa3373897b
+-------------------------+---------------------------------------------------+
| Field                   | Value                                             |
+-------------------------+---------------------------------------------------+
| admin_state_up          | True                                              |
| allowed_address_pairs   | []                                                |
| binding_host_id         | node001.vstoragedomain                            |
| binding_profile         | {}                                                |
| binding_vnic_type       | normal                                            |
| created_at              | 2024-05-10T16:27:46Z                              |
| description             |                                                   |
| device_id               | 59a448af-e178-4cf5-b6e7-602d5ce22b25              |
| device_owner            | network:router_gateway                            |
| dns_domain              |                                                   |
| dns_name                |                                                   |
| extra_dhcp_opts         | []                                                |
| fixed_ips               | - ip_address: 10.136.18.134                       |
|                         |   subnet_id: 41c86ca9-2b78-4840-a15b-b93d2df35a3f |
| id                      | 3a894732-afb1-461e-bc2f-54aa3373897b              |
| mac_address             | fa:16:3e:db:d3:ee                                 |
| mac_learning_enabled    |                                                   |
| name                    |                                                   |
| network_id              | 741b706b-1a74-4bbd-8aa7-d99ac9d82d2d              |
| port_security_enabled   | False                                             |
| project_id              |                                                   |
| propagate_uplink_status |                                                   |
| qos_policy_id           |                                                   |
| resource_request        |                                                   |
| revision_number         | 9                                                 |
| security_groups         | []                                                |
| status                  | ACTIVE                                            |
| tags                    | []                                                |
| updated_at              | 2024-05-20T11:38:25Z                              |
+-------------------------+---------------------------------------------------+