Chapter 12. VLAN-Aware Instances
12.1. Overview Copy linkLink copied to clipboard!
Instances can now send and receive VLAN-tagged traffic over a single vNIC. This ability is particularly useful for NFV applications (VNFs) that expect VLAN-tagged traffic, allowing multiple customers/services to be served by a single vNIC.
For example, the tenant data network can use VLANs, or tunneling (VXLAN/GRE) segmentation, while the instances will see the traffic tagged with VLAN IDs. As a result, network packets are tagged just before they are injected to the instance; they don’t need to be tagged throughout the entire network.
To implement this, start by creating a parent port and attaching it to an existing neutron network. Doing so will add a trunk connection to the parent port you created. Next, create subports. These subports are the ports that connect VLANs to instances, thereby allowing connectivity to the trunk. Within the instance operating system, you need to create a sub-interface that tags traffic for the VLAN associated with the subport.
12.2. Review the Trunk Plugin Copy linkLink copied to clipboard!
In a director-based deployment, the trunk plugin is turned on by default. You can review the configuration on the controller nodes:
1.On the controller node, confirm that the trunk
plugin is enabled in /etc/neutron/neutron.conf. For example:
service_plugins=router,metering,qos,trunk
service_plugins=router,metering,qos,trunk
12.3. Create a Trunk Connection Copy linkLink copied to clipboard!
1. Identify the network that requires the trunk port connection. This would be the network that will contain the instance that requires access to the trunked VLANs. In this example, this is the public network:
2. Create the parent trunk port, and attach it to the network that the instance will be connected to. In this example, a neutron port named parent-trunk-port
is created on the public network. This trunk will be considered the parent port, as you can use it to create subports.
3. Create a trunk using the port you just created. In this example the trunk is named parent-trunk
.
4. View the trunk connection:
- View the details of the trunk connection:
12.4. Add Subports to the Trunk Copy linkLink copied to clipboard!
1. Create a neutron port. This port will be used as a subport connection to the trunk. You must also specify the MAC address that was assigned to the parent port:
If you receive the error HttpException: Conflict
, confirm that you are creating the subport on a different network to the one that has the parent trunk port. This example uses the public
network for the parent trunk port, and private
for the subport.
2. Associate the port with the trunk (parent-trunk
), and specify the VLAN ID (55
):
openstack network trunk set --subport port=subport-trunk-port,segmentation-type=vlan,segmentation-id=55 parent-trunk
openstack network trunk set --subport port=subport-trunk-port,segmentation-type=vlan,segmentation-id=55 parent-trunk
12.5. Configure an Instance to use a Trunk Copy linkLink copied to clipboard!
The instance operating system must be configured to use the MAC address that neutron assigned to the subport. You can also configure the subport to use a specific MAC address during the subport creation step.
1. Review the configuration of your network trunk:
2. Create an instance that uses the parent port id
as its vNIC:
12.6. Trunk States Copy linkLink copied to clipboard!
-
ACTIVE
: The trunk is working as expected and there are no current requests. -
DOWN
: The virtual and physical resources for the trunk are not in sync. This can be a temporary state during negotiation. -
BUILD
: There has been a request and the resources are being provisioned. Upon successful completion the trunk will return toACTIVE
. -
DEGRADED
: The provisioning request did not complete, so the trunk has only been partially provisioned. It is recommended to remove the subports and try again. -
ERROR
: The provisioning request was unsuccessful. Removing the resource that led to the error will return the trunk to a healther state. Do not add more subports while in theERROR
state, as this can cause more issues.