In BGP-EVPN with VXLAN overlay, multitenancy is achieved by logically isolating the traffic from different entities of a tenant in a shared VXLAN network. The tenant can be a group of hosts or servers and tenant entities can be group of VMs in a server or applications within a VM. Each such tenant entity can be mapped to a VLAN or VRF depending on the type of network segments (Layer 2 or Layer 3) they belong to.
Each tenant that belongs to the same Layer 2 network is mapped to a VLAN and in turn each such VLAN is mapped to the same Layer 2 VNI. So, traffic between the tenant entities belonging to the same Layer 2 virtual network is tagged with a unique Layer 2 VNI and this traffic is bridged across the VXLAN network. The traffic between different Layer 2 virtual networks is routed. This routing is achieved by grouping Layer 2 virtual networks into a VRF. Each Layer 2 virtual network is assigned with an IP address.
The following figures captures the logical separation of tenant traffic based on the network segment they belong to:
Layer 2 Multi tenancy
In SmartFabric DellEMC OS10, Layer 2 multitenancy is achieved in the following two ways: VLAN attach Mode and Port-scoped VLAN Mode.
VLAN attach mode
In this mode, each tenant entity is mapped with one VLAN and each such VLAN is mapped 1:1 with one Layer 2 VNI.
In the following example, Server-1 and Server-3 belong to the same tenant.
Traffic from Server-1 is tagged with VLAN-100 and it is mapped to VNI1001. Similarly, traffic from Server-3 is tagged with VLAN-101 and mapped to VNI1001.
![vlan-attach-mode](https://dl.dell.com/content/guides/public/html//vxlan-bgp-10-5-3-ug/images/GUID-9E17004B-1A83-4028-9962-A8B4EB2C9A9C-low.jpg)
Port-scoped VLAN mode
In the port-scoped VLAN to VNI mapping mode, instead of attaching a VLAN to the virtual network, packets tagged with a specific vlan-id on a specific port are assigned to a virtual network for bridging.
To assign a packet tagged with a specific vlan-id on a specific port to a virtual network, perform the following steps:
- Create a virtual network for VLAN tunnelling.
OS10(config)# virtual-network 10000
- Assign a member interface corresponding to a specific vlan-id on a specific port to the virtual network:
OS10(config-vn)# member interface ethernet1/1/1 vlan 10
Each vlan-id on a port cannot be a part of more than one virtual network bridge.
For example, if you apply the following configuration, an error message appears indicating that the operation is not allowed:
(config)# virtual-network 10
(config-vn)# member-interface ethernet 1/1/1 vlan 6
(config)# virtual-network 11
(config-vn)# member-interface ethernet 1/1/1 vlan 6
The following error message appears:
% Error: Operation not allowed. Reason:Only one VLAN can be mapped to an interface in a particular Virtual-Network.
To reserve vlan-id to be used internally:
NOTE Due to hardware limitations, you cannot use the default VLAN as the reserved VLAN for untagged virtual network members. The hardware expects a port configured as an untagged member of the virtual network to also be an untagged member of the reserved VLAN used (unlike the case of the tagged PV membership to virtual network). However, an untagged virtual network member port cannot be an untagged member of the default VLAN; because it results in traffic leaking. Therefore, a dedicated VLAN that does not have any other ports to be reserved as the untagged VLAN is required.
To add untagged ports using the port-scoped method, first reserve a vlan-id that you want to use internally. You need to reserve only one such VLAN for the entire switch; this VLAN is used internally for all untagged ports in all virtual networks.
Use the following commands to add the untagged port to the virtual network:
OS10(config)# virtual-network 10000
OS10(config-vn)# member interface ethernet1/1/1 untagged
![port-scoped-vlan-mode](https://dl.dell.com/content/guides/public/html//vxlan-bgp-10-5-3-ug/images/GUID-F09C2981-1B9D-4E26-B399-DAB47EE07927-low.jpg)