After Deprec

openstack_cloud_computing_cookbook

Issue link: https://read.uberflip.com/i/1334488

Contents of this Issue

Navigation

Page 215 of 317

Chapter 10 205 Automatically assigning fixed networks to tenants When using VlanManager to separate tenants, we can manually assign VLANs and network ranges to them by creating a secure multi-tenant environment. We can, however, have OpenStack manage this association for us, so that when we create a project it automatically gets assigned these details. Getting ready To begin with, ensure you are logged in to the OpenStack API server as well as a client that can access the keystone environment. How to do it... 1. Carry out the following steps to configure networking in OpenStack to automatically assign new tenants' individual VLANs and private (fixed) IP in the file /etc/nova/ nova.conf, and ensure there is a flag called --vlan_start with a VLAN ID, for example: --vlan_start=100 2. We can now create a range of networks, each with 256 addresses available, by issuing the following command: sudo nova-manage network create --num_networks=10 --network_size=256 --fixed_range_v4=10.0.0.0/8 --label=auto 3. This creates 10 networks, with 256 IP addresses starting from 10.0.0.0/24 to 10.0.9.0/24 and starting from VLAN ID 100 to VLAN ID 110. You can specify an alternative VLAN start ID on the command line by adding in the --vlan=id option, where id is a number. How it works... By specifying the --num_networks option and specifying the --network_size option (the number of IPs in each of the created networks), we can tell our OpenStack environment to create multiple networks within the range specified by --fixed_range_v4. When projects are created now, rather than having to manually associate an address range with a tenant, they are automatically assigned a VLAN, starting from the --vlan_start ID, as specified in /etc/nova/nova.conf. www.it-ebooks.info

Articles in this issue

Links on this page

Archives of this issue

view archives of After Deprec - openstack_cloud_computing_cookbook