Chapter 5. VLAN-aware instances In Red Hat OpenStack Services on OpenShift (RHOSO) environments, there are two ways to associate an instance with a VLAN: VLAN trunks or VLAN transparent networks. A trunk is a collection of ports that enables you to route network traffic to multiple VLANs by using tags. Compared to access ports which can only send and receive network traffic on one VLAN, trunks typically offer lower latency and higher bandwidth. In RHOSO environments, a trunk consists of a parent port with one or more subports associated with the parent. VLAN trunks support VLAN-aware instances by combining VLANs into a single trunked port. For example, a project data network can use VLANs or tunneling segmentation (GENEVE), while the instances see the traffic tagged with VLAN IDs. Network packets are tagged immediately before they are injected to the instance and do not need to be tagged throughout the entire network. With a VLAN transparent network, you set up VLAN tagging in the VM instances. The VLAN tags are transferred over the network and consumed by the instances on the same VLAN, and ignored by other instances and devices. In a VLAN transparent network, the VLANs are managed in the instance. You do not need to set up the VLAN in the OpenStack Networking Service (neutron). The following table compares certain features of VLAN trunks and VLAN transparent networks: Trunk Transparent Mechanism driver support ML2/OVN ML2/OVN VLAN setup managed by OpenStack Networking Service (neutron) VM instance IP assignment Assigned by DHCP. Configured in the instance. VLAN ID Fixed. Instances must use the VLAN ID configured in the trunk. Flexible. You can set the VLAN ID in the instance. Implementing a trunk for VLAN-tagged traffic consists of the following steps: Create a parent port, and use it to create a trunk. Create one or more subports and associate them with the parent port. Create a sub-interface that tags traffic for the VLAN associated with the subport. When you create an instance, specify the parent port ID as the vNIC for the instance. This section contains the following topics: Section 5.1, "Creating a trunk" Section 5.2, "Adding subports to the trunk" Section 5.3, "Understanding trunk states" Section 5.4, "Configuring an instance to use a trunk" Section 5.5, "Enabling VLAN transparency" 5.1. Creating a trunk In Red Hat OpenStack Services on OpenShift (RHOSO) environments, the first step for making an instance VLAN-aware is to create a trunk. When you create a trunk, you start by first creating a parent port. , using the parent port, you create the trunk. During trunk creation, the RHOSO Networking service (neutron) adds a trunk connection to the parent port. Prerequisites The administrator has created a project for you and has provided you with a clouds.yaml file for you to access the cloud. The python-openstackclient package resides on your workstation. Procedure Confirm that the system OS_CLOUD variable is set for your cloud: USD echo USDOS_CLOUD my_cloud Reset the variable if necessary: USD export OS_CLOUD=my_other_cloud As an alternative, you can specify the cloud name by adding the --os-cloud <cloud_name> option each time you run an openstack command. Identify the network connected to the instances that you want to give access to the trunked VLANs: USD openstack network list -c Name -c Subnets --max-width=55 Sample output +-------------+---------------------------------------+ | Name | Subnets | +-------------+---------------------------------------+ | private | 47d34cf0-0dd2-49bd-a985-67311d80c5c4, | | | 82014d36-9e60-43eb-92fc-74674573f4e8, | | | d7535565-113f-4192-baa6-da21f301f141 | | private2 | 7ee56cef-83c0-40d1-b4e7-5287dae1c23c | | public | 49dda67d-814e-457b-b14b-77ef32935c0f, | | | 6745edd4-d15f-4971-89bf-70307b0ad2f1, | | | cc3f81bb-4d55-4ead-aad4-5362a7ca5b04 | | lb-mgmt-net | 5ca08724-568c-4030-93eb-f2e286570a25 | +-------------+---------------------------------------+ Create the parent trunk port, and attach it to the network that the instances connect to. Example In this example, a port named parent-trunk-port is created on the public network. This port is the parent port, as you can use it to create subports: USD openstack port create --network public parent-trunk-port Sample output Create a trunk using the parent port. Example In this example, the trunk is named trunk1 , and its parent port is named parent-trunk-port : USD openstack network trunk create --parent-port parent-trunk-port trunk1 Sample output Verification View the trunk connection: USD openstack network trunk list --max-width=72 Sample output View the details of the trunk connection: USD openstack network trunk show parent-trunk Sample output steps Proceed to Section 5.2, "Adding subports to the trunk" . Additional resources port create in the Command line interface reference network trunk create in the Command line interface reference network trunk list in the Command line interface reference network trunk show in the Command line interface reference Section 5.3, "Understanding trunk states" 5.2. Adding subports to the trunk In Red Hat OpenStack Services on OpenShift (RHOSO) environments, after you have created the trunk, the step for making an instance VLAN-aware is to create one or more subports. Subports are children of the trunk parent port. Prerequisites The administrator has created a project for you and has provided you with a clouds.yaml file for you to access the cloud. The python-openstackclient package resides on your workstation. You have a trunk associated on the network that connects to instances that you want to give access to the trunked VLANs. Procedure Confirm that the system OS_CLOUD variable is set for your cloud: USD echo USDOS_CLOUD my_cloud Reset the variable if necessary: USD export OS_CLOUD=my_other_cloud As an alternative, you can specify the cloud name by adding the --os-cloud <cloud_name> option each time you run an openstack command. Obtain the MAC address of the parent port. Retain this name, because you will need it later: Example USD openstack port show parent-trunk-port --max-width=72 Sample output +-------------------------+--------------------------------------------+ | Field | Value | +-------------------------+--------------------------------------------+ | admin_state_up | UP | | allowed_address_pairs | | | binding_host_id | | | binding_profile | | | binding_vif_details | | | binding_vif_type | unbound | | binding_vnic_type | normal | | created_at | 2024-09-25T20:18:40Z | | data_plane_status | None | | description | | | device_id | | | device_owner | | | device_profile | None | | dns_assignment | fqdn='host-10-0-0-236.openstacklocal.', | | | hostname='host-10-0-0-236', | | | ip_address='10.0.0.236' | | | fqdn='host-2002-c000-200-- | | | 64.openstacklocal.', | | | hostname='host-2002-c000-200--64', | | | ip_address='2002:c000:200::64' | | dns_domain | | | dns_name | | | extra_dhcp_opts | | | fixed_ips | ip_address='10.0.0.236', subnet_id='6745ed | | | d4-d15f-4971-89bf-70307b0ad2f1' | | | ip_address='2002:c000:200::64', subnet_id= | | | '49dda67d-814e-457b-b14b-77ef32935c0f' | | id | 530ff46e-b285-4ad7-a77a-7dca1fb9174d | | ip_allocation | immediate | | mac_address | fa:16:3e:0f:b8:cb | | name | parent-trunk-port | | network_id | bcdb3cc0-8c0b-4d2d-813c-e141bb97aa8f | | numa_affinity_policy | None | | port_security_enabled | True | | project_id | 24089d2fe1a94dd29ca2f665794fbe92 | | propagate_uplink_status | None | | qos_network_policy_id | None | | qos_policy_id | None | | resource_request | None | | revision_number | 1 | | security_group_ids | 9bf70539-31b0-47e5-a0ea-3ee409de0499 | | status | DOWN | | tags | | | trunk_details | {'trunk_id': | | | 'ef2aff85-9e51-43d4-ab28-2ab833f049b3', | | | 'sub_ports': []} | | updated_at | 2024-09-25T20:18:40Z | +-------------------------+--------------------------------------------+ Create a subport of the parent port for the trunk. Example In this example, a port is created, subport1 . By specifying the MAC address assigned to the parent port, fa:16:3e:33:c4:75 , the port created becomes a subport of the parent port: USD openstack port create --network private --mac-address fa:16:3e:33:c4:75 subport1 Sample output +-------------------------+--------------------------------------------+ | Field | Value | +-------------------------+--------------------------------------------+ | admin_state_up | UP | | allowed_address_pairs | | | binding_host_id | | | binding_profile | | | binding_vif_details | | | binding_vif_type | unbound | | binding_vnic_type | normal | | created_at | 2024-09-25T20:19:28Z | | data_plane_status | None | | description | | | device_id | | | device_owner | | | device_profile | None | | dns_assignment | fqdn='host-10-0-24-31.openstacklocal.', | | | hostname='host-10-0-24-31', | | | ip_address='10.0.24.31' | | dns_domain | | | dns_name | | | extra_dhcp_opts | | | fixed_ips | ip_address='10.0.24.31', subnet_id='47d34c | | | f0-0dd2-49bd-a985-67311d80c5c4' | | id | 4ce8382f-5efc-4794-83f8-1f89ef7efe68 | | ip_allocation | immediate | | mac_address | fa:16:3e:0f:b8:cb | | name | subport1 | | network_id | 317be3d3-5265-43f7-b52b-930e3fd19b8b | | numa_affinity_policy | None | | port_security_enabled | True | | project_id | 24089d2fe1a94dd29ca2f665794fbe92 | | propagate_uplink_status | None | | qos_network_policy_id | None | | qos_policy_id | None | | resource_request | None | | revision_number | 1 | | security_group_ids | 9bf70539-31b0-47e5-a0ea-3ee409de0499 | | status | DOWN | | tags | | | trunk_details | None | | updated_at | 2024-09-25T20:19:28Z | +-------------------------+--------------------------------------------+ Note 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. Associate the port with the trunk. Example In this example, subport1 is associated with trunk1 . The segmentation type is vlan and the segmentation ID, the VLAN ID, is 55 . The type and ID are attributes from the network ( private ) that was used to create subport1 in an earlier command: USD openstack network trunk set --subport port=subport1,\ segmentation-type=vlan,segmentation-id=55 trunk1 steps Proceed to Section 5.4, "Configuring an instance to use a trunk" . Additional resources port create in the Command line interface reference network trunk set in the Command line interface reference Section 5.3, "Understanding trunk states" 5.3. Understanding trunk states The table that follows describes the various state values for trunks in a Red Hat OpenStack Services on OpenShift (RHOSO) environment: Table 5.1. Valid trunk state values State field value Description 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. After successful completion the trunk returns to ACTIVE . 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. Remove the resource that caused the error to return the trunk to a healthier state. Do not add more subports while in the ERROR state, as this can cause more issues. Additional resources Section 5.2, "Adding subports to the trunk" Section 5.1, "Creating a trunk" Section 5.4, "Configuring an instance to use a trunk" 5.4. Configuring an instance to use a trunk In Red Hat OpenStack Services on OpenShift (RHOSO) environments, you can configure an instance to use a trunk as its connection to a network. Compared to access ports which can only send and receive network traffic on one VLAN, trunks typically offer lower latency and higher bandwidth. You must configure the VM instance operating system to use the MAC address that the RHOSO Networking service (neutron) assigned to the subport. You can also configure the subport to use a specific MAC address during the subport creation step. Prerequisites The administrator has created a project for you and has provided you with a clouds.yaml file for you to access the cloud. The python-openstackclient package resides on your workstation. You have a trunk that you can configure your instances to connect to. For more information, see Section 5.1, "Creating a trunk" . Procedure Confirm that the system OS_CLOUD variable is set for your cloud: USD echo USDOS_CLOUD my_cloud Reset the variable if necessary: USD export OS_CLOUD=my_other_cloud As an alternative, you can specify the cloud name by adding the --os-cloud <cloud_name> option each time you run an openstack command. Obtain the trunk name and the parent port ID that you want to connect your instance to. Retain this information, because you will need it later: Example USD openstack network trunk list -c Name -c "Parent Port" Sample output +--------+--------------------------------------+ | Name | Parent Port | +--------+--------------------------------------+ | trunk1 | 530ff46e-b285-4ad7-a77a-7dca1fb9174d | +--------+--------------------------------------+ Create an instance that uses the parent port-id as its vNIC. Example In this example, an instance, testInstance , is created and connected to the parent port by specifying the port ID, 530ff46e-b285-4ad7-a77a-7dca1fb9174d : USD openstack server create --image cirros --flavor m1.tiny \ --security-group default --key-name sshaccess \ --nic port-id=530ff46e-b285-4ad7-a77a-7dca1fb9174d testInstance Sample output +--------------------------------------+---------------------------------+ | Property | Value | +--------------------------------------+---------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | | | OS-EXT-SRV-ATTR:host | - | | OS-EXT-SRV-ATTR:hostname | testinstance | | OS-EXT-SRV-ATTR:hypervisor_hostname | - | | OS-EXT-SRV-ATTR:instance_name | | | OS-EXT-SRV-ATTR:kernel_id | | | OS-EXT-SRV-ATTR:launch_index | 0 | | OS-EXT-SRV-ATTR:ramdisk_id | | | OS-EXT-SRV-ATTR:reservation_id | r-juqco0el | | OS-EXT-SRV-ATTR:root_device_name | - | | OS-EXT-SRV-ATTR:user_data | - | | OS-EXT-STS:power_state | 0 | | OS-EXT-STS:task_state | scheduling | | OS-EXT-STS:vm_state | building | | OS-SRV-USG:launched_at | - | | OS-SRV-USG:terminated_at | - | | accessIPv4 | | | accessIPv6 | | | adminPass | uMyL8PnZRBwQ | | config_drive | | | created | 2024-09-25T20:22:19Z | | description | - | | flavor | m1.tiny (1) | | hostId | | | host_status | | | id | 88b7aede-1305-4d91-a180-67e7eac | | | 8b70d | | image | cirros (568372f7-15df-4e61-a05f | | | -10954f79a3c4) | | key_name | sshaccess | | locked | False | | metadata | {} | | name | testInstance | | os-extended-volumes:volumes_attached | [] | | progress | 0 | | security_groups | default | | status | BUILD | | tags | [] | | tenant_id | 745d33000ac74d30a77539f8920555e | | | 7 | | updated | 2024-09-25T20:22:19Z | | user_id | 8c4aea738d774967b4ef388eb41fef5 | | | e | +--------------------------------------+---------------------------------+ Additional resources network trunk create in the Command line interface reference network trunk list in the Command line interface reference network trunk show in the Command line interface reference 5.5. Enabling VLAN transparency In Red Hat OpenStack Services on OpenShift (RHOSO) environments, you can enable VLAN transparency if you need to send VLAN tagged traffic between virtual machine (VM) instances. In a VLAN transparent network you can configure the VLANS directly in the VMs without configuring them in the RHOSO Networking service (neutron). Prerequisites You have the oc command line tool installed on your workstation. You are logged on to a workstation that has access to the RHOSO control plane as a user with cluster-admin privileges. Provider network of type Local, VLAN, VXLAN, or GENEVE. Do not use VLAN transparency in deployments with flat type provider networks. Ensure that the external switch supports 802.1q VLAN stacking using ethertype 0x8100 on both VLANs. OVN VLAN transparency does not support 802.1ad QinQ with outer provider VLAN ethertype set to 0x88A8 or 0x9100. Procedure Create a YAML file and add the following content: Apply the updated OpenStackControlPlane CR configuration: USD oc apply -f <control_plane_update.yaml> Replace <control_plane_update.yaml> with the name of the YAML file that contains your update. Wait until Red Hat OpenShift Container Platform (RHOCP) creates the resources related to the OpenStackControlPlane CR. Check the status of the control plane deployment: USD oc get openstackcontrolplane -n OPENSTACK Sample output NAME STATUS MESSAGE openstack-control-plane Unknown Setup started The OpenStackControlPlane resources are created when the status is "Setup complete". Tip Append the -w option to the get command to track deployment progress. Access the remote shell for the OpenStackClient pod from your workstation: Confirm that the Networking service has successfully loaded the vlan_transparent extension: USD openstack extension list --network --max-width=72 \ | grep vlan-transparent Sample output If the Networking service has successfully loaded the loaded the vlan_transparent extension, you should see output similar to the following: | Vlantransparent | vlan-transparent | Provides Vlan | | | | Transparent Networks | Create the network using the --transparent-vlan argument. Example USD openstack network create <network-name> --transparent-vlan Replace <network-name> with the name of the network that you are creating. Exit the openstackclient pod: USD exit Set up a VLAN interface on each participating VM. Set the interface MTU to 4 bytes less than the MTU of the underlay network to accommodate the extra tagging required by VLAN transparency. For example, if the underlay network MTU is 1500 , set the interface MTU to 1496 . The following example command adds a VLAN interface on eth0 with an MTU of 1496 . The VLAN is 50 and the interface name is vlan50 : Example USD ip link add link eth0 name vlan50 type vlan id 50 mtu 1496 USD ip link set vlan50 up USD ip addr add 192.128.111.3/24 dev vlan50 Access the remote shell for the OpenStackClient pod from your workstation: Set --allowed-address on the VM port. Set the allowed address to the IP address you created on the VLAN interface inside the VM. Optionally, you can also set the VLAN interface MAC address. Note An alternative to setting an allowed address pair, is to disable port security on the port by using the port set --disable-port-security command. Example The following example sets the IP address to 192.128.111.3 with the optional MAC address 00:40:96:a8:45:c4 on port fv82gwk3-qq2e-yu93-go31-56w7sf476mm0 : USD openstack port set --allowed-address ip-address=192.128.111.3,\ mac-address=00:40:96:a8:45:c4 fv82gwk3-qq2e-yu93-go31-56w7sf476mm0 Exit the openstackclient pod: USD exit Verification Ping between two VMs on the VLAN using the VLAN interface name IP address that you set in an earlier step, for example, vlan50 . Use tcpdump on eth0 to see if the packets arrive with the VLAN tag intact. Additional resources network create in the Command line interface reference port set in the Command line interface reference

Commands:
dnf list installed python-openstackclient
echo USDOS_CLOUD my_cloud
export OS_CLOUD=my_other_cloud
openstack network list -c Name -c Subnets --max-width=55
+-------------+---------------------------------------+ | Name | Subnets | +-------------+---------------------------------------+ | private | 47d34cf0-0dd2-49bd-a985-67311d80c5c4, | | | 82014d36-9e60-43eb-92fc-74674573f4e8, | | | d7535565-113f-4192-baa6-da21f301f141 | | private2 | 7ee56cef-83c0-40d1-b4e7-5287dae1c23c | | public | 49dda67d-814e-457b-b14b-77ef32935c0f, | | | 6745edd4-d15f-4971-89bf-70307b0ad2f1, | | | cc3f81bb-4d55-4ead-aad4-5362a7ca5b04 | | lb-mgmt-net | 5ca08724-568c-4030-93eb-f2e286570a25 | +-------------+---------------------------------------+
openstack port create --network public parent-trunk-port
+-------------------------+--------------------------------------------+ | Field | Value | +-------------------------+--------------------------------------------+ | admin_state_up | UP | | allowed_address_pairs | | | binding_host_id | | | binding_profile | | | binding_vif_details | | | binding_vif_type | unbound | | binding_vnic_type | normal | | created_at | 2024-09-25T20:18:40Z | | data_plane_status | None | | description | | | device_id | | | device_owner | | | device_profile | None | | dns_assignment | fqdn='host-10-0-0-236.openstacklocal.', | | | hostname='host-10-0-0-236', | | | ip_address='10.0.0.236' | | | fqdn='host-2002-c000-200-- | | | 64.openstacklocal.', | | | hostname='host-2002-c000-200--64', | | | ip_address='2002:c000:200::64' | | dns_domain | | | dns_name | | | extra_dhcp_opts | | | fixed_ips | ip_address='10.0.0.236', subnet_id='6745ed | | | d4-d15f-4971-89bf-70307b0ad2f1' | | | ip_address='2002:c000:200::64', subnet_id= | | | '49dda67d-814e-457b-b14b-77ef32935c0f' | | id | 530ff46e-b285-4ad7-a77a-7dca1fb9174d | | ip_allocation | immediate | | mac_address | fa:16:3e:0f:b8:cb | | name | parent-trunk-port | | network_id | bcdb3cc0-8c0b-4d2d-813c-e141bb97aa8f | | numa_affinity_policy | None | | port_security_enabled | True | | project_id | 24089d2fe1a94dd29ca2f665794fbe92 | | propagate_uplink_status | None | | qos_network_policy_id | None | | qos_policy_id | None | | resource_request | None | | revision_number | 1 | | security_group_ids | 9bf70539-31b0-47e5-a0ea-3ee409de0499 | | status | DOWN | | tags | | | trunk_details | {'trunk_id': | | | 'ef2aff85-9e51-43d4-ab28-2ab833f049b3', | | | 'sub_ports': []} | | updated_at | 2024-09-25T20:18:40Z | +-------------------------+--------------------------------------------+
openstack network trunk create --parent-port parent-trunk-port trunk1
+-----------------+--------------------------------------+ | Field | Value | +-----------------+--------------------------------------+ | admin_state_up | UP | | created_at | 2024-09-25T20:19:43Z | | description | | | id | ef2aff85-9e51-43d4-ab28-2ab833f049b3 | | name | trunk1 | | port_id | 530ff46e-b285-4ad7-a77a-7dca1fb9174d | | project_id | 24089d2fe1a94dd29ca2f665794fbe92 | | revision_number | 1 | | status | ACTIVE | | sub_ports | | | tags | [] | | tenant_id | 24089d2fe1a94dd29ca2f665794fbe92 | | updated_at | 2024-09-25T20:19:43Z | +-----------------+--------------------------------------+
openstack network trunk list --max-width=72
+--------------------+--------------+--------------------+-------------+ | ID | Name | Parent Port | Description | +--------------------+--------------+--------------------+-------------+ | ef2aff85-9e51-43d4 | parent-trunk | 530ff46e-b285-4ad7 | | | -ab28-2ab833f049b3 | | -a77a-7dca1fb9174d | | +--------------------+--------------+--------------------+-------------+
openstack network trunk show parent-trunk
+-----------------+--------------------------------------+ | Field | Value | +-----------------+--------------------------------------+ | admin_state_up | UP | | created_at | 2024-09-25T20:19:43Z | | description | | | id | ef2aff85-9e51-43d4-ab28-2ab833f049b3 | | name | trunk1 | | port_id | 530ff46e-b285-4ad7-a77a-7dca1fb9174d | | project_id | 24089d2fe1a94dd29ca2f665794fbe92 | | revision_number | 1 | | status | ACTIVE | | sub_ports | | | tags | [] | | tenant_id | 24089d2fe1a94dd29ca2f665794fbe92 | | updated_at | 2024-09-25T20:19:43Z | +-----------------+--------------------------------------+
dnf list installed python-openstackclient
echo USDOS_CLOUD my_cloud
export OS_CLOUD=my_other_cloud
openstack port show parent-trunk-port --max-width=72
+-------------------------+--------------------------------------------+ | Field | Value | +-------------------------+--------------------------------------------+ | admin_state_up | UP | | allowed_address_pairs | | | binding_host_id | | | binding_profile | | | binding_vif_details | | | binding_vif_type | unbound | | binding_vnic_type | normal | | created_at | 2024-09-25T20:18:40Z | | data_plane_status | None | | description | | | device_id | | | device_owner | | | device_profile | None | | dns_assignment | fqdn='host-10-0-0-236.openstacklocal.', | | | hostname='host-10-0-0-236', | | | ip_address='10.0.0.236' | | | fqdn='host-2002-c000-200-- | | | 64.openstacklocal.', | | | hostname='host-2002-c000-200--64', | | | ip_address='2002:c000:200::64' | | dns_domain | | | dns_name | | | extra_dhcp_opts | | | fixed_ips | ip_address='10.0.0.236', subnet_id='6745ed | | | d4-d15f-4971-89bf-70307b0ad2f1' | | | ip_address='2002:c000:200::64', subnet_id= | | | '49dda67d-814e-457b-b14b-77ef32935c0f' | | id | 530ff46e-b285-4ad7-a77a-7dca1fb9174d | | ip_allocation | immediate | | mac_address | fa:16:3e:0f:b8:cb | | name | parent-trunk-port | | network_id | bcdb3cc0-8c0b-4d2d-813c-e141bb97aa8f | | numa_affinity_policy | None | | port_security_enabled | True | | project_id | 24089d2fe1a94dd29ca2f665794fbe92 | | propagate_uplink_status | None | | qos_network_policy_id | None | | qos_policy_id | None | | resource_request | None | | revision_number | 1 | | security_group_ids | 9bf70539-31b0-47e5-a0ea-3ee409de0499 | | status | DOWN | | tags | | | trunk_details | {'trunk_id': | | | 'ef2aff85-9e51-43d4-ab28-2ab833f049b3', | | | 'sub_ports': []} | | updated_at | 2024-09-25T20:18:40Z | +-------------------------+--------------------------------------------+
openstack port create --network private --mac-address fa:16:3e:33:c4:75 subport1
+-------------------------+--------------------------------------------+ | Field | Value | +-------------------------+--------------------------------------------+ | admin_state_up | UP | | allowed_address_pairs | | | binding_host_id | | | binding_profile | | | binding_vif_details | | | binding_vif_type | unbound | | binding_vnic_type | normal | | created_at | 2024-09-25T20:19:28Z | | data_plane_status | None | | description | | | device_id | | | device_owner | | | device_profile | None | | dns_assignment | fqdn='host-10-0-24-31.openstacklocal.', | | | hostname='host-10-0-24-31', | | | ip_address='10.0.24.31' | | dns_domain | | | dns_name | | | extra_dhcp_opts | | | fixed_ips | ip_address='10.0.24.31', subnet_id='47d34c | | | f0-0dd2-49bd-a985-67311d80c5c4' | | id | 4ce8382f-5efc-4794-83f8-1f89ef7efe68 | | ip_allocation | immediate | | mac_address | fa:16:3e:0f:b8:cb | | name | subport1 | | network_id | 317be3d3-5265-43f7-b52b-930e3fd19b8b | | numa_affinity_policy | None | | port_security_enabled | True | | project_id | 24089d2fe1a94dd29ca2f665794fbe92 | | propagate_uplink_status | None | | qos_network_policy_id | None | | qos_policy_id | None | | resource_request | None | | revision_number | 1 | | security_group_ids | 9bf70539-31b0-47e5-a0ea-3ee409de0499 | | status | DOWN | | tags | | | trunk_details | None | | updated_at | 2024-09-25T20:19:28Z | +-------------------------+--------------------------------------------+
openstack network trunk set --subport port=subport1, segmentation-type=vlan,segmentation-id=55 trunk1
dnf list installed python-openstackclient
echo USDOS_CLOUD my_cloud
export OS_CLOUD=my_other_cloud
openstack network trunk list -c Name -c "Parent Port"
+--------+--------------------------------------+ | Name | Parent Port | +--------+--------------------------------------+ | trunk1 | 530ff46e-b285-4ad7-a77a-7dca1fb9174d | +--------+--------------------------------------+
openstack server create --image cirros --flavor m1.tiny --security-group default --key-name sshaccess --nic port-id=530ff46e-b285-4ad7-a77a-7dca1fb9174d testInstance
+--------------------------------------+---------------------------------+ | Property | Value | +--------------------------------------+---------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | | | OS-EXT-SRV-ATTR:host | - | | OS-EXT-SRV-ATTR:hostname | testinstance | | OS-EXT-SRV-ATTR:hypervisor_hostname | - | | OS-EXT-SRV-ATTR:instance_name | | | OS-EXT-SRV-ATTR:kernel_id | | | OS-EXT-SRV-ATTR:launch_index | 0 | | OS-EXT-SRV-ATTR:ramdisk_id | | | OS-EXT-SRV-ATTR:reservation_id | r-juqco0el | | OS-EXT-SRV-ATTR:root_device_name | - | | OS-EXT-SRV-ATTR:user_data | - | | OS-EXT-STS:power_state | 0 | | OS-EXT-STS:task_state | scheduling | | OS-EXT-STS:vm_state | building | | OS-SRV-USG:launched_at | - | | OS-SRV-USG:terminated_at | - | | accessIPv4 | | | accessIPv6 | | | adminPass | uMyL8PnZRBwQ | | config_drive | | | created | 2024-09-25T20:22:19Z | | description | - | | flavor | m1.tiny (1) | | hostId | | | host_status | | | id | 88b7aede-1305-4d91-a180-67e7eac | | | 8b70d | | image | cirros (568372f7-15df-4e61-a05f | | | -10954f79a3c4) | | key_name | sshaccess | | locked | False | | metadata | {} | | name | testInstance | | os-extended-volumes:volumes_attached | [] | | progress | 0 | | security_groups | default | | status | BUILD | | tags | [] | | tenant_id | 745d33000ac74d30a77539f8920555e | | | 7 | | updated | 2024-09-25T20:22:19Z | | user_id | 8c4aea738d774967b4ef388eb41fef5 | | | e | +--------------------------------------+---------------------------------+
apiVersion: core.openstack.org/v1beta1 kind: OpenStackControlPlane metadata: name: openstack-control-plane spec: neutron: template: customServiceConfig: | [DEFAULT] vlan_transparent = true
oc apply -f <control_plane_update.yaml>
oc get openstackcontrolplane -n OPENSTACK
NAME STATUS MESSAGE openstack-control-plane Unknown Setup started
oc rsh -n openstack openstackclient
openstack extension list --network --max-width=72 | grep vlan-transparent
| Vlantransparent | vlan-transparent | Provides Vlan | | | | Transparent Networks |
openstack network create <network-name> --transparent-vlan
exit
ip link add link eth0 name vlan50 type vlan id 50 mtu 1496 ip link set vlan50 up ip addr add 192.128.111.3/24 dev vlan50
oc rsh -n openstack openstackclient
openstack port set --allowed-address ip-address=192.128.111.3, mac-address=00:40:96:a8:45:c4 fv82gwk3-qq2e-yu93-go31-56w7sf476mm0
exit