Updating a subnet in the CLI

To update a subnet in the CLI, use the openstack subnet set and openstack subnet unset commands as follows:

openstack subnet set
[--name <name>] [--dhcp | --no-dhcp]
[--gateway <gateway>]
[--description <description>] [--tag <tag>]
[--no-tag]
[--allocation-pool start=<ip-address>,end=<ip-address>]
[--no-allocation-pool]
[--dns-nameserver <dns-nameserver>]
[--no-dns-nameservers]
[--host-route destination=<subnet>,gateway=<ip-address>]
[--no-host-route] [--service-type <service-type>]
<subnet>

openstack subnet unset
[--allocation-pool start=<ip-address>,end=<ip-address>]
[--dns-nameserver <dns-nameserver>]
[--host-route destination=<subnet>,gateway=<ip-address>]
[--service-type <service-type>]
[--tag <tag> | --all-tag]
<subnet>

The --name argument specifies the updated name of the subnet.

The --dhcp and --no-dhcp arguments enable or disable DHCP services for the subnet, respectively.

Instances that rely on DHCP to procure or renew an IP address lease might lose network connectivity over time if DHCP is disabled.

The --gateway  argument defines the gateway address for the subnet. The two possible options when updating a subnet includes none or an IP address of the user's choosing.

The --tag argument, when used with the set command, will add the specified tag to the subnet. When used with the unset command, the specified tag will be removed from the subnet. Using the --all-tag with the unset command will remove all tags from the subnet.

The --allocation-pool argument, when used with the set command, adds the specified pool to the subnet. When used with the unset command, the specified pool will be removed from the subnet.

The--dns-nameserver argument, when used with the set command, adds the specified DNS name server to the subnet. When used with the unset command, the specified DNS name server is removed from the subnet. Using --no-name-servers will remove all DNS name servers from the subnet.

The --host-route argument, when used with the set command, adds the specified static route defined using destination and next hop pairs. When used with the unset command, the specified route is removed. Using --no-host-route with the set command will remove all host routes from the subnet.

The subnet argument specifies the name of the subnet being modified.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset