Layer 2 (L2) edge bridge allows virtual machines to communicate via layer 2 and establishes a bridge between sites. This can be use for migrating virtual machines between sites for example a vm that might be on normal vlan port groups/nsx-v to an overlay network on nsx-t.

I have setup two VCF environments, one vm is on a normal vlan port group vlan 100 and the other I will put on the new overlay segment I am going to create. Then I will test connectivity between the vms and gateway.

High-level tasks

1. ESXi hosts are trunked with the vlan of the virtual machine (Using vlan 100 in my lab)

2. Create two port group with vlan trunking with promiscuous mode and forged transmits accepted, and uplinks active and standby on them.

3. Run the command to enable reverse filter on the ESXi host where the Edge VM is running

4. Deploy Edge on the destination site or the new segment location your using for overlay

5. Add edge(s) to cluster

6. Create edge bridge profile

7. Create overlay segment for the virtual machine

8. Add edge bridge to the overlay segment

9. Assign edge profile vlan transport zone and vlan id

10. Put vm on new overlay segment

11. Test vms can ping each other across the vcf environments and gateway

A picture containing text, handwriting, font, diagram

Description automatically generated

1. Trunk your vlan to the ESXi hosts via your switch

2. Create two port group with vlan trunking, with promiscuous mode and forged transmits accepted, and uplinks active and standby at my destination.

Create a new port group on your dvs

Give your port group a meaningful name.

A screenshot of a computer

Description automatically generated

Change vlan to VLAN trunking and click customize.

A screenshot of a computer

Description automatically generated

Change promiscuous mode and forged transmits to accept.

A screenshot of a computer

Description automatically generated

Next

A screenshot of a computer

Description automatically generated with medium confidence

Change first port group to uplink1 as active and uplink2 as standby.

A screenshot of a computer

Description automatically generated with medium confidence

Next

A screenshot of a computer

Description automatically generated with medium confidence

Next

A screenshot of a computer

Description automatically generated

Finish

A screenshot of a computer

Description automatically generated

Create another port group but uplink2 as active and uplink1 as standby.

A screenshot of a computer

Description automatically generated with medium confidence 3. Run the command to enable reverse filter on the ESXi host where the Edge VM is running.

SSH to the host running your edge and run the below.

esxcli system settings advanced set -o /Net/ReversePathFwdCheckPromisc -i 1

A picture containing screenshot, text, software, computer icon

Description automatically generated

disable and enable promiscuous mode on both port groups.

disable promiscuous mode first.

A screenshot of a computer

Description automatically generated with medium confidence

A screenshot of a computer

Description automatically generated with medium confidence

Then enable back promiscuous mode back.

A screenshot of a computer

Description automatically generated with medium confidence

A screenshot of a computer

Description automatically generated with medium confidence

4. Deploy edge on destination site

A screenshot of a computer

Description automatically generated with medium confidence

Put in your name, FQDN and size.

A screenshot of a computer

Description automatically generated

Put in your credential details.

A screenshot of a computer

Description automatically generated

Select your vcenter, cluster and datastore.

A screenshot of a computer

Description automatically generated with medium confidence

Put in your management details of your edge.

A screenshot of a computer

Description automatically generated

Add your transport zones one for vlan and one for overlay

I am using the existing uplink profile.

Put in your TEP details. (Same range as my other teps)

Then assign your uplinks to the new port groups you created.

A screenshot of a computer

Description automatically generated

A screenshot of a computer

Description automatically generated with medium confidence

For prod I recommend two edges.

5. Add edge(s) to cluster

Add that edge into a new edge cluster.

A screenshot of a computer

Description automatically generated with medium confidence

Give it a name and select your edge(s) and click the right arrow

Click add.

A screenshot of a computer

Description automatically generated with medium confidence

A screenshot of a computer

Description automatically generated with medium confidence

6. Create edge bridge profile

Since this is a lab, I am not using a backup edge node.

Give it a name, select your new edge cluster and then select your primary and backup node edge.

A picture containing screenshot, text, software, number

Description automatically generated

A picture containing text, line, screenshot, font

Description automatically generated

7. Create overlay segment for the virtual machine

A screen shot of a computer

Description automatically generated with medium confidence

Type a meaningful name for the segment and select the ‘overlay’ transport zone you used during your edge deployment.

A screenshot of a computer

Description automatically generated

8. Add edge bridge to the overlay segment

Click yes to continue configuring.

A screenshot of a computer

Description automatically generated with medium confidence

Click Set next to edge bridges.

A screenshot of a computer

Description automatically generated

Add edge bridge.

A screenshot of a computer

Description automatically generated with medium confidence

9. Assign edge profile, ‘vlan’ transport zone and vlan id

From the drop down select the edge profile, select the ‘vlan’ transport zone you used in your edge deployment and add vlan id.

A screenshot of a computer

Description automatically generated with medium confidence

Save

A screenshot of a computer

Description automatically generated with low confidence

A screenshot of a computer

Description automatically generated with medium confidence

10. Put vm on the new overlay segment

Edit the virtual machine you want on the new overlay segment and change network.

A screenshot of a computer

Description automatically generated with medium confidence

11. Test vms can ping each other across the vcf environments and gateway.

Ping test gateway

Ping test to win10-1 on other vcf environment

Done

Official VMware documentation

Option 2b – https://docs.vmware.com/en/VMware-NSX-T-Data-Center/3.2/administration/GUID-0E28AC86-9A87-47D4-BE25-5E425DAF7585.html

https://docs.vmware.com/en/VMware-NSX-T-Data-Center/3.2/migration/GUID-12FE83E9-2FA9-40F7-A3FF-BC21E13F6720.html

Additionally if you don’t want promiscuous mode on you can turn on mac learning on the port group, I used the following commands.

run this in your powershell for get-maclearn command – https://github.com/lamw/vmware-scripts/blob/master/powershell/MacLearn.ps1
Set-ExecutionPolicy Unrestricted
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false
Connect-VIServer -Server 172.16.30.62
Get-MacLearn -DVPortgroupName @(“pg-L2bridge”)
Get-MacLearn -DVPortgroupName @(“pg-L2bridge-2”)
Set-MacLearn -DVPortgroupName @(“pg-L2bridge”) -EnableMacLearn $true -EnablePromiscuous $false -EnableForgedTransmit $true -EnableMacChange $false
Set-MacLearn -DVPortgroupName @(“pg-L2bridge-2”) -EnableMacLearn $true -EnablePromiscuous $false -EnableForgedTransmit $true -EnableMacChange $false

By Kader