Updating network attributes

Network attributes can be updated using the openstack network set and openstack network unset commands.

Getting ready

When updating a network, ensure that you are authenticated as an administrator or are the owner of the network. You will need the following details:

  • Network name or ID
  • Attribute to update

For our example, the following will be used:

  • Network name: COOKBOOK_PROVIDER_NET
  • Attribute to update: router:external

How to do it…

With the OpenStack client installed on our system, we are now able to update the network with the following command:

openstack network set COOKBOOK_PROVIDER_NET --external

No output is returned.

How it works...

Networks are updated with the following syntax:

openstack network set NETWORK 
[--share | --no-share] 
[--description <description>] 
[--external | --internal] 

openstack network unset [--tag <tag> | --all-tag] NETWORK

The share and no-share parameters dictate whether the network can be shared among projects or is limited to the owner of the network.

The description parameter allows users to provide a useful description of the network.

When specified, the --external option qualifies a network as a gateway network for a router. The network will serve as a floating IP network for attached instances. Networks are considered internal by default.

Note

Not all network plugins support updating certain network attributes for existing networks. If a change is required, the network may need to be deleted and recreated.

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

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