Skip to content

Instantly share code, notes, and snippets.

@ob1-sc
Last active September 3, 2020 08:57
Show Gist options
  • Save ob1-sc/0616141120b23223eaa3d0aa1da17a09 to your computer and use it in GitHub Desktop.
Save ob1-sc/0616141120b23223eaa3d0aa1da17a09 to your computer and use it in GitHub Desktop.
Setup Distributed Switch Mac Learning
  1. Download William Lam scripts and browse to correct folder
git clone https://github.com/lamw/vghetto-scripts.git
cd powershell
  1. Install powershell
$ sudo snap install powershell --classic
  1. Start powershell
$ pwsh
  1. Install PowerCli
> Install-Module VMware.PowerCLI -Scope CurrentUser
  1. Connect to vcenter
> Set-PowerCLIConfiguration -InvalidCertificateAction:Ignore
> Connect-VIServer -server <vcenter dns/ip>
  1. Toggle MAC Learning on your DVSwitch portgroup
> . ./MacLearn.ps1
> Set-MacLearn -DVPortgroupName @("<portgroup name>") -EnableMacLearn $true -EnablePromiscuous $false -EnableForgedTransmit $true -EnableMacChange $false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment