By default, CDP on ESX(i) 3.5-5.0 is set to
listen. This allows ESX to read CDP information from attached Cisco Devices. To
listen and
advertise vSwitch information, the following must be performed on the ESX host.
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()