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>
值 | 概述 |
---|---|
<router> | 要修改的路由器(名称或 ID) |
值 | 概述 |
---|---|
-h, --help | 显示帮助信息并退出 |
--name <name> | 设置路由器名称 |
--description <description> | 设置路由器描述 |
--enable | 启用路由器 |
--disable | 禁用路由器 |
--distributed | 将路由器设置为分布式模式(仅禁用路由器) |
--centralized | 将路由器设置为集中式模式(仅禁用路由器) |
--route destination=<subnet>,gateway=<ip-address> | 将路由添加到路由器目的地:目的地子网(以 CIDR 表示法)网关:下一跳 IP 地址(repeat 选项)来添加多个路由。这已被弃用,而是使用 路由器添加/删除路由,因为在与 --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> (repeat 选项来设置多个固定 IP 地址) |
--enable-snat | 在外部网关上启用源 nat |
--disable-snat | 在外部网关中禁用源 nat |
--qos-policy <qos-policy> | 将 qos 策略附加到路由器网关 ips |
--no-qos-policy | 从路由器网关 ips 中删除 qos 策略 |
--tag <tag> | 要添加到路由器的标签(repeat 选项用于设置多个标签) |
--no-tag | 清除与路由器关联的标签。指定 --tag 和 --no-tag 来覆盖当前的标签 |