54.8. 路由器集


设置路由器属性

使用方法:

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] [--tag <tag>]
                            [--no-tag]
                            <router>
Copy to Clipboard Toggle word wrap

Expand
表 54.22. 位置参数
概述

<router>

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

Expand
表 54.23. 可选参数
概述

--description <description>

设置路由器描述

--distributed

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

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

与路由器目的地关联的路由:目标子网(以 CIDR 表示法)网关:下一个 IP 地址(重复选项以设置多个路由)

--no-ha

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

--enable

启用路由器

--no-tag

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

--name <name>

设置路由器名称

--ha

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

--tag <tag>

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

--centralized

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

--disable-snat

在外部网关中禁用源 nat

--external-gateway <network>

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

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

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

--no-route

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

-h, --help

显示帮助信息并退出

--disable

禁用路由器

--enable-snat

在外部网关中启用源 nat

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2025 Red Hat