47.4. 端口集


设置端口属性

使用方法:

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-name dns-name] [--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>
Copy to Clipboard Toggle word wrap

Expand
表 47.14. 位置参数
概述

<port>

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

Expand
表 47.15. 可选参数
概述

--enable

启用端口

--no-security-group

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

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

添加与这个端口关联的 allowed-address 对: ip-address=<ip-address>[,mac-address=<mac-address>](用于设置多个 allowed-address 对)

--fixed-ip subnet=<subnet>,ip-address=<ip-address>

此端口所需的 ip 和/或子网(名称或 id):subnet=<subnet>,ip-address=<ip-address> (用于设置多个固定 IP 地址)

--disable-port-security

禁用此端口的端口安全性

--enable-port-security

为此端口启用端口安全性

--name <name>

设置端口名称

--no-binding-profile

清除绑定现有信息:profile.specify both --binding-profile 和 --no-binding-profile 以覆盖当前的绑定:profile 信息。

--device-owner <device-owner>

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

--device <device-id>

端口设备 ID

--qos-policy <qos-policy>

将 qos 策略附加到此端口(名称或 id)

-h, --help

显示帮助信息并退出

--disable

禁用端口

--data-plane-status <status>

设置此端口的 data plane 状态(活跃)

缩减)。使用端口 unset 命令将其设定为 None (需要 data plane 状态扩展)

--mac-address <mac-address>

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

--no-tag

与端口关联的显式标签。指定 --tag 和 --no-tag 以覆盖当前标签

--binding-profile <binding-profile>

要传递的自定义数据:profile. 数据可能会作为 <key>=<value> 或 JSON 传递。(重复选项可设置多个绑定:profile 数据)

--security-group <security-group>

与这个端口关联的安全组(名称或 ID)(重复选项来设置多个安全组)

--vnic-type <vnic-type>

该端口的 vNIC 类型(直接)

direct-physical

macvtap

normal

baremetal

virtio-forwarder,默认:常规)

--tag <tag>

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

--description <description>

这个端口的描述

--no-fixed-ip

清除固定 ip address.Specify 和 --fixed-ip 和 --no-fixed-ip 的现有信息,以覆盖当前的固定 IP 地址。

--host <host-id>

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

--no-allowed-address

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

--dns-name dns-name

将 dns name 设置为此端口(需要 dns integration extension)

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat