neutron创建虚拟路由器,端口状态为down
操作步骤如下:
1、创建两个子网
neutron net-create private
neutron net-create private1
neutron subnet-create private 192.168.10.0/24 --name private --dns-nameserver 219.141.136.10 --gateway 192.168.10.1
neutron subnet-create private1 192.168.11.0/24 --name private1 --dns-nameserver 219.141.136.10 --gateway 192.168.11.1
2、创建虚拟路由器,并将创建的子网关联上去
neutron router-create router
neutron router-interface-add router private
neutron router-interface-add router private1
3、查看路由器端口
neutron router-port-list router
结果如下:
| id | name | mac_address | fixed_ips |
+--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------+
| 06f2f8c7-3961-4b29-a1a2-847cce3730ed | | fa:16:3e:c2:5f:14 | {"subnet_id": "cf65aa8c-23ef-4f2f-b808-7f5abd43525e", "ip_address": "192.168.11.1"} |
| 921916c2-c611-45ed-af10-49af992a8192 | | fa:16:3e:aa:1b:80 | {"subnet_id": "adf442b9-482d-48d7-9cd5-de2b23397e99", "ip_address": "192.168.10.1"} |
4、查看端口状态
neutron port-show 921916c2-c611-45ed-af10-49af992a8192
| Field | Value |
+-----------------------+--------------------------------------------------------------------------------------------------------------+
| admin_state_up | True |
| allowed_address_pairs | |
| binding:host_id | controller |
| binding:profile | {} |
| binding:vif_details | {"port_filter": true} |
| binding:vif_type | bridge |
| binding:vnic_type | normal |
| device_id | c1e51583-ae17-4ad8-8e28-aec7328f4114 |
| device_owner | network:router_interface |
| dns_assignment | {"hostname": "host-192-168-10-1", "ip_address": "192.168.10.1", "fqdn": "host-192-168-10-1.openstacklocal."} |
| dns_name | |
| extra_dhcp_opts | |
| fixed_ips | {"subnet_id": "adf442b9-482d-48d7-9cd5-de2b23397e99", "ip_address": "192.168.10.1"} |
| id | 921916c2-c611-45ed-af10-49af992a8192 |
| mac_address | fa:16:3e:aa:1b:80 |
| name | |
| network_id | 1dc51bc4-547b-4363-b99d-adc6246e0bf3 |
| port_security_enabled | False |
| security_groups | |
| status | ACTIVE |
| tenant_id | e33b7c74167443099c26b287c604ed1f |
neutron port-show 06f2f8c7-3961-4b29-a1a2-847cce3730ed
| Field | Value |
+-----------------------+--------------------------------------------------------------------------------------------------------------+
| admin_state_up | True |
| allowed_address_pairs | |
| binding:host_id | controller |
| binding:profile | {} |
| binding:vif_details | {"port_filter": true} |
| binding:vif_type | bridge |
| binding:vnic_type | normal |
| device_id | c1e51583-ae17-4ad8-8e28-aec7328f4114 |
| device_owner | network:router_interface |
| dns_assignment | {"hostname": "host-192-168-11-1", "ip_address": "192.168.11.1", "fqdn": "host-192-168-11-1.openstacklocal."} |
| dns_name | |
| extra_dhcp_opts | |
| fixed_ips | {"subnet_id": "cf65aa8c-23ef-4f2f-b808-7f5abd43525e", "ip_address": "192.168.11.1"} |
| id | 06f2f8c7-3961-4b29-a1a2-847cce3730ed |
| mac_address | fa:16:3e:c2:5f:14 |
| name | |
| network_id | 313f0bbf-1be3-42f9-a41f-caba06861f73 |
| port_security_enabled | False |
| security_groups | |
| status | DOWN |
| tenant_id | e33b7c74167443099c26b287c604ed1f |
第一个端口状态是ACTIVE,第二个端口状态是DOWN,请问如何查找端口DOWN的原因呢?