In this exercise, you will manage the network configuration and IP addressing for launching a tenant instance.
Outcomes
You should be able to create a tenant network and subnetwork.
As the student user on the workstation machine, use the lab command to prepare your system for this exercise.
This command ensures that all resources required for the exercise are present.
[student@workstation ~]$ lab nonpublic-networks start
Procedure 4.2. Instructions
This guided exercise is in two parts. In part 1 you use the CLI to create a tenant network and subnet, and in part 2 you use the Dashboard to review that network and create another tenant network.
Create a network named finance-network4 using the developer1 credentials in the CLI.
On workstation, source the /home/student/developer1-finance-rc user environment file.
[student@workstation ~]$ source ~/developer1-finance-rc
[student@workstation ~(developer1-finance)]$Create a network named finance-network4.
[student@workstation ~(developer1-finance)]$openstack network create \>finance-network4...output omitted...
Use the openstack network show command with the --max-width option to view the network.
[student@workstation ~(developer1-finance)]$openstack network show \>finance-network4 --max-width 80+---------------------------+--------------------------------------------------+ | Field | Value | +---------------------------+--------------------------------------------------+ | admin_state_up | UP | | availability_zone_hints | | | availability_zones | | | created_at | 2020-05-13T06:51:04Z | | description | | | dns_domain | | | id | 8319ffce-05b3-4f8d-a273-30f07e052b45 | | ipv4_address_scope | None | | ipv6_address_scope | None | | is_default | None | | is_vlan_transparent | None | | location | cloud='', project.domain_id=, | | | project.domain_name='Example', | | | project.id='4a08af8fda6a4609ad293613e0e637e3', | | | project.name='finance', region_name='regionOne', | | | zone= | | mtu | 1442 | |name|finance-network4| | port_security_enabled | True | | project_id | 4a08af8fda6a4609ad293613e0e637e3 | | provider:network_type | None | | provider:physical_network | None | | provider:segmentation_id | None | | qos_policy_id | None | | revision_number | 1 | | router:external | Internal | | segments | None | | shared | False | |status|ACTIVE| | subnets | | | tags | | | updated_at | 2020-05-13T06:51:04Z | +---------------------------+--------------------------------------------------+
Create a subnet named finance-subnet4 within the finance-network4 network. Configure this subnet to use the 192.168.4.0/24 range. Verify the settings of the subnet.
Create a subnet named finance-subnet4 in the finance-network4 network. Configure this subnet to use the 192.168.4.0/24 range.
[student@workstation ~(developer1-finance)]$openstack subnet create \>--subnet-range 192.168.4.0/24 \>--network finance-network4 \>finance-subnet4...output omitted...
Use the openstack subnet show command to show finance-subnet4. Use the openstack subnet show --max-width command to show finance-subnet4.
Note that if no allocation pools are configured when creating the subnet, OpenStack automatically assigns the full range, with the exception of the gateway and broadcast addresses.
[student@workstation ~(developer1-finance)]$openstack subnet show \>finance-subnet4 --max-width 80+-------------------+----------------------------------------------------------+ | Field | Value | +-------------------+----------------------------------------------------------+ |allocation_pools|192.168.4.2-192.168.4.254| |cidr|192.168.4.0/24| | created_at | 2020-05-13T06:56:53Z | | description | | | dns_nameservers | | |enable_dhcp|True| |gateway_ip|192.168.4.1| | host_routes | | | id | 1eb9862f-ea49-46dd-934e-07da577c1008 | | ip_version | 4 | | ipv6_address_mode | None | | ipv6_ra_mode | None | | location | cloud='', project.domain_id=, | | | project.domain_name='Example', | | | project.id='4a08af8fda6a4609ad293613e0e637e3', | | | project.name='finance', region_name='regionOne', zone= | | name | finance-subnet4 | | network_id | 8319ffce-05b3-4f8d-a273-30f07e052b45 | | prefix_length | None | | project_id | 4a08af8fda6a4609ad293613e0e637e3 | | revision_number | 0 | | segment_id | None | | service_types | | | subnetpool_id | None | | tags | | | updated_at | 2020-05-13T06:56:53Z | +-------------------+----------------------------------------------------------+
Use the Dashboard to perform the following steps.
As the developer1 user, create a network named finance-network2 and a subnet named finance-subnet2 with the 192.168.2.0/24 network address. Log out of the Dashboard when you have finished creating the network and subnet.
Log in to the Dashboard at http://dashboard.overcloud.example.com using Example as the domain, developer1 as the user name, and redhat as the password. Confirm that the selected project is finance.
Navigate to → → and then click .
In the section, enter finance-network2 in the field. Select and then click .
In the section, enter finance-subnet2 in the field. Enter 192.168.2.0/24 in the field and then click .
In the section, review the default settings, and then click .
Locate finance-subnet4 and edit the subnet by removing DHCP.
Navigate to → → and locate finance-network4. Click finance-network4.
Click and then click . Click , clear the check box, and then click .
Log out of the Dashboard.
This concludes the guided exercise.