-
Book Overview & Buying
-
Table Of Contents
OpenStack Networking Cookbook
By :
We have seen how to use the Horizon dashboard to create a Network. Let's now do the same with OpenStack CLI. Several CLI commands offer additional capabilities when compared to the dashboard. So it is good to develop a sound knowledge of the CLI commands.
You will need the following information to create a Network using CLI:
The next set of steps will show you how to use the Neutron CLI commands to create a Network:
openstack@controller:~$ source author_openrc.sh
openstack@controller:~$ cat author_openrc.sh export OS_TENANT_NAME=cookbook export OS_USERNAME=author export OS_PASSWORD=password export OS_AUTH_URL=http://controller:35357/v2.0 openstack@controller:~$ openstack
neutron net-create, and in the simplest form, the only argument required is the Network name:
neutron net-list command:
--tenant-id option. This option allows users with an administrative role to create a Network for another tenant. The following screenshot shows you how an administrative user (for an administrative project or tenant) creates a Network for a cookbook tenant:
cookbook, is the tenant name used for this command:
When the user executes the neutron net-create command, the user name and tenant name attributes are taken from the shell environment variables that were initialized at the beginning. Neutron creates the Network with this user and tenant (or project). However, once the --tenant-id option is used, the Network is created on behalf of the tenant whose ID is specified.
Users can specify several other arguments while creating Networks. These options are provider:network_type, --provider:segmentation_id, and router:external. While we will be taking a closer look at these parameters in the subsequent chapters, it is important to note that some of these options are available only if users have the administrative privilege.
To view the details of a specific Network, you can use the neutron net-show command.
Change the font size
Change margin width
Change background colour