Tuesday, May 26, 2009

Enabling CDP on Vswitch

Enabling CDP on ESX for a vSwitch.

There is no GUI for enabling or disabling CDP for a vSwitch (yet), so it’s off to the CLI.

esxcfg-vswitch --set-cdp both vSwitch0

Replace the italicized parts of that command with the appropriate information for your environment. That sets CDP to both listen (receive CDP transmissions) and announce (send CDP transmissions). I recommend using both, although I have not currently found a way to explore the CDP information that ESX is gathering by listening to announcements.


Enabling CDP on ESXi for a vSwitch.

 Of course, since we are using ESXi there is no Service Console, so this time we’ll have to rely upon the next-generation equivalent of VIMA.

The command from next-gen VIMA looks like this:

vicfg-vswitch --server vcenter.domain.com -h esxi.domain.com -B bothvSwitch0

Unless you’ve set some environment variables, you’ll be prompted for username and password. I substituted the “-h” for “-−vihost” and “-B” for “-−set-cdp”. Again, you’ll need to replace the italicized portions with the appropriate information for your environment. I did find that using IP addresses didn’t seem to work well; I had to use fully-qualified domain names instead. 

No comments:

Post a Comment