59.4. 端口设置
设置端口属性
使用方法:
| value | Summary |
|---|---|
| <port> | 要修改的端口(名称或 id) |
| value | Summary |
|---|---|
| -h, --help | 显示帮助信息并退出 |
| --description <description> | 此端口的描述 |
| --device <device-id> | 端口设备 ID |
| --mac-address <mac-address> | 此端口的 MAC 地址(仅限管理员) |
| --device-owner <device-owner> | 此端口的设备所有者。这是使用端口(如 network:dhcp)的实体。 |
| --vnic-type <vnic-type> | 此端口的 vNIC 类型(直接 | direct-physical | macvtap | normal | baremetal | virtio-forwarder | vdpa, default: normal) |
| --host <host-id> | 在主机 <host-id> 上分配端口(仅限 ID) |
| --dns-domain dns-domain | 将 dns domain 设置为此端口(需要端口的 dns_domain 扩展) |
| --dns-name <dns-name> | 为这个端口设置 dns 名称(需要 dns 集成扩展) |
| --numa-policy-required | 调度此端口所需的 NUMA 关联性策略 |
| --numa-policy-preferred | 调度此端口的首选 NUMA 关联性策略 |
| --numa-policy-legacy | 使用旧模式调度此端口的 NUMA 关联性策略 |
| --enable | 启用端口 |
| --disable | 禁用端口 |
| --name <name> | 设置端口名称 |
| --fixed-ip subnet=<subnet>,ip-address=<ip-address> | 这个端口所需的 ip 和/或子网(名称或 id):subnet=<subnet>,ip-address=<ip-address> (repeat 选项来设置多个固定 IP 地址) |
| --no-fixed-ip | 清除固定 ip address.Specify --fixed-ip 和 --no-fixed-ip 的现有信息,以覆盖当前的固定 IP 地址。 |
| --binding-profile <binding-profile> | 要传递的自定义数据作为 binding:profile. data 可传递为 <key>=<value> 或 JSON。(重复设置多个 binding:profile 数据) |
| --no-binding-profile | 清除 binding:profile. 的现有信息。指定 --binding-profile 和 --no-binding-profile 来覆盖当前的 binding:profile 信息。 |
| --qos-policy <qos-policy> | 将 qos 策略附加到此端口(名称或 ID) |
| --security-group <security-group> | 与此端口关联的安全组(名称或 ID)(重复设置多个安全组) |
| --no-security-group | 清除与此端口关联的现有安全组 |
| --enable-port-security | 为此端口启用端口安全性 |
| --disable-port-security | 禁用此端口的端口安全性 |
| --allowed-address ip-address=<ip-address>[,mac-address=<mac-address>] | 添加与此端口关联的 allowed-address 对:ip-address=<ip-address>[,mac-address=<mac-address>] (重复选项来设置多个允许地址对) |
| --no-allowed-address | 清除与此端口关联的现有 allowed-address 对。(指定 --allowed-address 和 --no- allowed-address,以覆盖当前的允许地址对) |
| --extra-dhcp-option name=<name>[,value=<value>,ip-version={4,6}] | 要分配给此端口的额外 dhcp 选项:name=<name>[,value=<value>,ip-version={4,6}] (重复设置多个额外 DHCP 选项) |
| --data-plane-status <status> | 设置此端口的数据平面状态(活跃 | down)。使用 port unset 命令取消设置它为 None (需要 data plane 状态扩展) |
| --tag <tag> | 要添加到端口的标签(重复选项可设置多个标签) |
| --no-tag | 清除与端口关联的标签。指定 --tag 和 --no-tag 以覆盖当前标签 |