1. Gather the current vSwitch configuration on the host by running the following command:
esxcfg-vswitch -l
2. To set the CDP status for a vSwitch, run the following. Use the appropriate vswitch name for your environment:
esxcfg-vswitch -B both vSwitch1
3. Confirm the change by running the following:
esxcfg-vswitch -b vSwitch1
**Update Feb 15th 2013**
The esxcli command to configure CDP on an ESXi host with a standard switch is:
esxcli network vswitch standard set -c both -v vSwitch0
**Update Jan 27th 2017**
Commands for setting up CDP on a standard switch through powerCLI
$esxcli
= Get-EsxCli -VMHost myhost.mycompany.com
$esxcli.network.vswitch.standard.set("both","9000","vSwitch1")
Confirm by running the following:
$esxcli.network.vswitch.standard.list()
No comments:
Post a Comment