OpenStack 端口绑定命令详解
在 OpenStack 中,可以使用以下命令来绑定端口:
- 使用 neutron 命令行工具绑定端口:
neutron port-update <port-id> --binding:host_id <compute-node-id> --binding:vnic_type <vnic-type>
其中,<port-id> 是要绑定的端口的 ID,<compute-node-id> 是要绑定到的计算节点的 ID,<vnic-type> 是虚拟网卡类型,可以是 'normal' 或 'direct'。
- 使用 Nova 命令行工具绑定端口:
nova interface-attach <server-id> --port-id <port-id> --net-id <network-id> --fixed-ip <ip-address>
其中,<server-id> 是要绑定端口的实例的 ID,<port-id> 是要绑定的端口的 ID,<network-id> 是要绑定到的网络的 ID,<ip-address> 是要分配给实例的 IP 地址。
注意:以上命令需要使用管理员权限进行操作。
原文地址: https://www.cveoy.top/t/topic/oV8T 著作权归作者所有。请勿转载和采集!