72.10. 子网集
设置子网属性
使用方法:
value | Summary |
---|---|
<subnet> | 要修改的子网(名称或 id) |
value | Summary |
---|---|
-h, --help | 显示帮助信息并退出 |
--extra-property type=<property_type>,name=<property_name>,value=<property_value> | 可以使用此属性传递其他参数。额外属性的默认类型是字符串(str),但也可以使用其他类型。可用的类型有: dict,list,str,bool,int.如果 列出 类型,则 value 可以是以分号分隔的值列表。对于 字典 值,代表以分号分隔的 key:value 对列表。 |
--name <name> | 更新子网的名称 |
--dhcp | 启用 dhcp |
--no-dhcp | disable dhcp |
--dns-publish-fixed-ip | 在 dns 中启用发布固定 ips |
--no-dns-publish-fixed-ip | 在 dns 中禁用发布固定 ips |
--gateway | 指定子网的网关。选项为: <ip-address>: Specific IP 地址用作网关,无 : 此子网不使用网关,如 --gateway 192.168.9.1、--gateway none。 |
--network-segment <network-segment> |
与此子网(名称或 ID)关联的网络段。只有在当前值为 |
--description <description> | 设置子网描述 |
--tag <tag> | 要添加到子网的标签(重复选项可设置多个标签) |
--no-tag | 清除与子网关联的标签。指定 --tag 和 --no-tag 来覆盖当前的标签 |
--allocation-pool start=<ip-address>,end=<ip-address> | 此子网的分配池 IP 地址,例如:start=192.168.199.2,end=192.168.199.254 (需要添加多个 IP 地址) |
--no-allocation-pool | 从子网清除关联的 allocation-pools。指定 --allocation-pool 和 --no-allocation- 池,以覆盖当前的分配池信息。 |
--dns-nameserver <dns-nameserver> | 此子网的 DNS 服务器(重复选项可设置多个 DNS 服务器) |
--no-dns-nameservers | 清除 dns nameserver 的现有信息。指定 --dns-nameserver 和 --no-dns-nameserver 以覆盖当前的 DNS Nameserver 信息。 |
--host-route destination=<subnet>,gateway=<ip-address> | 此子网的附加路由,如 destination=10.10.0.0/16,gateway=192.168.71.254 destination: destination subnet (以 CIDR 表示法)gateway: nexthop IP address (repeat 选项来添加多个路由) |
--no-host-route | 从子网清除关联的 host-routes。指定 --host-route 和 --no-host-route 来覆盖当前的主机路由信息。 |
--service-type <service-type> | 此子网的服务类型,如 network:floatingip_agent_gateway。必须是网络端口的有效设备所有者值(重复设置多个服务类型) |