69.10. 路由器设置


设置路由器属性

使用方法:

openstack router set [-h] [--name <name>] [--description <description>]
                            [--enable | --disable]
                            [--distributed | --centralized]
                            [--route destination=<subnet>,gateway=<ip-address>]
                            [--no-route] [--ha | --no-ha]
                            [--external-gateway <network>]
                            [--fixed-ip subnet=<subnet>,ip-address=<ip-address>]
                            [--enable-snat | --disable-snat]
                            [--qos-policy <qos-policy> | --no-qos-policy]
                            [--tag <tag>] [--no-tag]
                            <router>
Copy to Clipboard Toggle word wrap

Expand
表 69.34. positional 参数
valueSummary

<router>

要修改的路由器(名称或 id)

Expand
表 69.35. 命令参数
valueSummary

-h, --help

显示帮助信息并退出

--name <name>

设置路由器名称

--description <description>

设置路由器描述

--enable

启用路由器

--disable

禁用路由器

--distributed

将路由器设置为分布式模式(仅禁用路由器)

--centralized

将路由器设置为集中式模式(仅禁用路由器)

--route destination=<subnet>,gateway=<ip-address>

将路由添加到路由器目的地:目的地子网(以 CIDR 表示法)网关:下一个跃点 IP 地址(重复添加多个路由)。这已被弃用,而是使用 路由器添加/删除路由,因为在不与 --no-route 一同使用时,在并发客户端之间出现竞争条件,以覆盖 路由 的当前值。

--no-route

清除与路由器关联的路由。指定 --route 和 --no-route 来覆盖路由的当前值。

--ha

将路由器设置为高可用性(仅禁用路由器)

--no-ha

清除路由器的高可用性属性(仅禁用路由器)

--external-gateway <network>

用作路由器的网关的外部网络(名称或 ID)

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

外部网关上所需的 ip 和/或子网(名称或 id):subnet=<subnet>,ip-address=<ip-address> (重复选项来设置多个固定 IP 地址)

--enable-snat

在外部网关上启用源 nat

--disable-snat

在外部网关中禁用源 nat

--qos-policy <qos-policy>

将 qos 策略附加到路由器网关 ips

--no-qos-policy

从路由器网关 ips 中删除 qos 策略

--tag <tag>

要添加到路由器的标签(重复选项可设置多个标签)

--no-tag

清除与路由器关联的标签。指定 --tag 和 --no-tag 以覆盖当前标签

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat