Do you have Cisco Switches? Are you using CDP?

In my office, we use Cisco gear for networking. Cisco has it’s own protocol called the Cisco Discovery Protocol (CDP). CDP allows you to identify information about the device you’re connected to. Be it from a server to see what port you’re plugged into on the switch, or from the device!  There’s a program for Windows called CDP Monitor that will do this too.. It’s VERY handy, esp if you’re dealing with a physical server and trying to trace the connection.

The VMware vCenter vDS switch supports CDP. It’s very easy to enable too… Go to the NETWORKING tab in vCenter, right click on your vDS switch, go to EDIT SETTINGS, Under PROPERTIES, click ADVANCED and there you have CDP! Your choice for CDP is either LISTEN, ADVERTISE, or BOTH.

Listen – You only received CDP information from the connected device/switch.
Advertise – You only SEND CDP information to the connected device/switch.
Both – You both Listen AND send.

I set to both, this way I can see info in vCenter and my network team can get the NIC info from their switches!

Now, did you know you could enable CDP for your standard switch as well? I haven’t been able to find it in the vCenter GUI, but you CAN do it via the CLI and the “esxcfg-vswitch” command! Connect to your HOST via Putty and login as root.

The command to view your current CDP config (set to LISTEN by default) is below. For output, it’ll say either: listen, advertise, or both.

esxcfg-vswitch -b vSwitch0 (or whatever your vSwitch name is).</pre>

Next, to change this setting, you’ll use the command:

esxcfg-vswitch -B both vSwitch0 (again, or whatever your vSwitch name is).

This will change the setting to BOTH. The change takes effect immediately, no reboot or anything needed!

Now that CDP is enabled, We can go into vCenter, click on a HOST, go to Manage, then Networking.  Click on Virtual Switches, expand one of the NICs and click on the blue information circle.

If you’re still on 6.0 or older, Login to vCenter, click on a host from the HOSTS and CLUSTERS view, Click CONFIGURATION, Networking.  Then click on the blue box next to the VMNIC.


Ben Liebowitz, VCP, vExpert
NJ VMUG Leader

Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.