Creating tenant networks

When a tenant network is created in OpenStack, provider attributes that describe how the network is connected to the physical infrastructure are automatically determined by Neutron based on settings hard-coded in configuration files. Typically, tenant networks are created and managed by users within a particular project and are not shared with other projects.

Getting ready

You will need the following details, at a minimum, for the network:

  • Network name

For our example, the following network name will be used:

  • Network name: COOKBOOK_TENANT_NET_1

You will need the following details, at a minimum, for the corresponding subnet:

  • Subnet name
  • Network name or ID
  • Subnet range (CIDR)

For our example, the following will be used:

  • Subnet name: COOKBOOK_TENANT_SUBNET_1
  • Network name or ID: COOKBOOK_TENANT_NET_1
  • Subnet range (CIDR): 172.16.200.0/24

How to do it…

With the openstack client installed on our system, we are now able to create a tenant network with the following steps:

  1. Create the network:
    openstack network create COOKBOOK_TENANT_NET_1
    

    The output will resemble the following:

    How to do it…

    Note

    As a non-admin user, certain network attributes may not be visible.

  2. Create the subnet:
    openstack subnet create COOKBOOK_TENANT_SUBNET_1 
    --network COOKBOOK_TENANT_NET_1 
    --subnet-range 172.16.200.0/24
    

    The output will resemble the following:

    How to do it…

How it works...

Tenant networks are created with the following syntax:

openstack network create NETWORK_NAME

When created as a non-admin user, a network's provider attributes are automatically determined by Neutron based on settings defined in the respective network plugin configuration files. Tenant networks are associated with the project that created them, and by default, are not visible or usable by other projects.

Tip

Neutron role-based access control (RBAC) can be used to share networks with other projects if desired. More information on using RBAC in the Pike release of OpenStack can be found at the following website:

https://docs.openstack.org/neutron/pike/admin/config-rbac.html

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

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