官术网_书友最值得收藏!

Creating a Network with a specific VLAN

When the user creates a Network, the VLAN ID is automatically assigned to it. However, there can be situations when a Network is required to use a specific VLAN. This can happen when the physical network is preconfigured to carry a certain type of traffic using a specific VLAN ID.

Getting ready

You will need the following information to create a Network with a specific VLAN:

  • The project (tenant) name for which the Network needs to be created
  • A VLAN ID from the range configured in the ML2 configuration file

How to do it…

The following steps will show you how to create a Network with a specific VLAN ID:

  1. Log in to the OpenStack Horizon dashboard using a user ID with an administrative role.
  2. In the left navigation menu, click on Admin | System and Networks.
  3. On the right-hand side, we will get a list of all the Networks. As we logged in with an administrative role, we should be able to view all the networks across all the projects:
    How to do it…
  4. Click on the + Create Network button to display the Create Network screen for the administrators. Note that this screen is different from the one shown for tenants, which is as follows:
    How to do it…
  5. Enter a name for the Network. Select a Project and select VLAN as Provider Network Type. Once you choose VLAN as the Network type, the screen will prompt you to provide more details as shown here:
    How to do it…
  6. Enter physnet1 as the value for Physical Network. This was the alias that was used when configuring OVS as the mechanism driver in the recipe titled Configuring Neutron to use the Open vSwitch mechanism driver.
  7. In the Segmentation ID field, enter a VLAN ID from the range that was configured for Neutron. Note that if you enter a VLAN ID that is already in use, the create network request will fail.
  8. Now click on Create Network. Once the network creation succeeds, the network will show in the list. Note that this mechanism creates a Network without a subnet. Therefore, you will see that the Subnets Associated column is empty:
    How to do it…
  9. Click on the Network name of the newly created Network to view its details. You can see that the Segmentation ID that we entered has been used to create the Network:
    How to do it…

Users can use the + Create Subnet button to add a Subnet to this Network. The preceding steps showed you how a user with an administrative role could create a Network with a specific VLAN.

How it works…

When a network is created as shown in this recipe, the Neutron server validates the segmentation ID against the VLAN ID range configured in Neutron. If the segmentation ID falls within the range, Neutron will check whether the segmentation ID is already in use or not. If the ID is not in use, then the Network creation will succeed.

主站蜘蛛池模板: 榆树市| 通化市| 沽源县| 伊宁县| 平舆县| 乾安县| 玉溪市| 邳州市| 赫章县| 铁岭县| 鄄城县| 连州市| 年辖:市辖区| 项城市| 华宁县| 潮州市| 永宁县| 府谷县| 喀什市| 泾源县| 息烽县| 湛江市| 驻马店市| 兰溪市| 兴城市| 景谷| 安康市| 金塔县| 大竹县| 休宁县| 桃源县| 邳州市| 马尔康县| 营山县| 抚顺市| 晋宁县| 通化市| 修文县| 高邑县| 玉山县| 龙门县|