搜索

59.4. 端口集

download PDF

设置端口属性

使用方法:

openstack port set [-h] [--description <description>]
                          [--device <device-id>] [--mac-address <mac-address>]
                          [--device-owner <device-owner>]
                          [--vnic-type <vnic-type>] [--host <host-id>]
                          [--dns-domain dns-domain] [--dns-name <dns-name>]
                          [--numa-policy-required | --numa-policy-preferred | --numa-policy-legacy]
                          [--enable | --disable] [--name <name>]
                          [--fixed-ip subnet=<subnet>,ip-address=<ip-address>]
                          [--no-fixed-ip]
                          [--binding-profile <binding-profile>]
                          [--no-binding-profile] [--qos-policy <qos-policy>]
                          [--security-group <security-group>]
                          [--no-security-group]
                          [--enable-port-security | --disable-port-security]
                          [--allowed-address ip-address=<ip-address>[,mac-address=<mac-address>]]
                          [--no-allowed-address]
                          [--data-plane-status <status>] [--tag <tag>]
                          [--no-tag]
                          <port>

表 59.14. positional 参数
概述

<port>

要修改的端口(名称或 id)

表 59.15. 命令参数
概述

-h, --help

显示帮助信息并退出

--description <description>

此端口的描述

--device <device-id>

端口设备 ID

--mac-address <mac-address>

此端口的 MAC 地址(仅限管理员)

--device-owner <device-owner>

此端口的设备所有者。这是使用端口的实体(如 network:dhcp)。

--vnic-type <vnic-type>

此端口的 vNIC 类型(直接 | 直接物理 | macvtap | normal | baremetal | virtio-forwarder, default: normal)

--host <host-id>

在主机 <host-id> 上分配端口(仅限id)

--dns-domain dns-domain

将 dns 域设置为此端口(端口需要 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。(repeat 选项用于设置多个 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)关联的安全组(名称或 ID)(用于设置多个安全组的选项)

--no-security-group

清除与此端口关联的现有安全组

--enable-port-security

为此端口启用端口安全性

--disable-port-security

禁用此端口的端口安全性

--allowed-address ip-address=<ip-address>[,mac-address=<mac-address>]

添加与这个端口关联的允许地址对: ip-address=<ip-address>[,mac-address=<mac-address>](repeat 选项来设置多个 allowed-address 对)

--no-allowed-address

清除与此端口关联的现有允许地址对。(指定 --allowed-address 和 --no- allowed-address 来覆盖当前允许的地址对。)

--data-plane-status <status>

设置此端口的数据平面状态(active | down)。使用 port unset 命令将其取消设置为 None (需要 data plane 状态扩展)

--tag <tag>

要添加到端口的标签(重复选项可设置多个标签)

--no-tag

清除与端口关联的标签。指定 --tag 和 --no-tag 来覆盖当前的标签

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.