Enabling vSwitch Cisco Discovery Protocol (CDP)

I recently attended the VMware vSphere Troubleshooting course.  It was a very good course and I’d recommend it to anyone responsible for day-to-day maintenance of a virtual infrastructure.  During the course we discussed the vMA (vSphere Management Assistant) and looked at some of the vSwitch configuration options you could set.  One option stood out to me…the CDP Mode of a standard vSwitch.  I knew my vSwitch had the ability to read CDP information, but the class text suggested it could announce its configuration.  Once I had a few minutes to get back into my lab I decided to deploy the vMA and test this configuration.

Downloading and deploying the vMA was rather straight forward.  Once the OVF template was deployed and powered on, a wizard walks you through all of the remaining configuration.  Once the vMA is only, login with the vi-admin user account.  The first step to enabling CDP requires that the host or vCenter be added to the vMA.  I decided to go with each host…so I added it like so:

sudo vifp addserver esxhostname.domain.name
vifpinit esxhostname.domain.name

To verify the existing CDP mode you can type the following command (the name of the vSwitch is case sensitive):

vicfg-vswitch -b vSwitch0

By default a vSwitch will have a CDP mode of listen, but it is very easy to change to both

vicfg-vswitch -B both vSwitch0

The physical switch now shows the following:

show cdp neighbor
Device ID:       esxhostname.domain.name
Local Intrfce:   Gig 1/3
Capability:      Switch
Platform:        VMware ES
Port ID:         vmnic0
This entry was posted in Virtualization. Bookmark the permalink.

One Response to Enabling vSwitch Cisco Discovery Protocol (CDP)

  1. Pingback: EnterpriseAdmins.org » Blog Archive » Update to Enabling vSwitch CDP (vMA 4.1)

Leave a Reply

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

*

Notify me of followup comments via e-mail. You can also subscribe without commenting.