This is more of a quick one for reference as there are numerous articles on this in the blogosphere. Enabling Cisco CDP on your vSwitch’s is fantastic for troubleshooting NIC problems and Documentations. As Cisco CDP is enabled by default on most devices all you need to do from the ESX side is the following.
From the command line of your ESX host run the following command for each vSwitch
esxcfg-vswitch –B both vSwitch0
Now when you view the vSwitch configuration on your ESX host you will be able to see more information about the physical switchthe host is connected to, including switch name and most importantly the switch port number.
If you login to your cisco switch and run the following command
show cdp entry *
You will then be able to see the reserve of this information from the Cisco switch itself, very usefully when diagnosing networking or cabling issues.
My next step is to write a powershell script that will grab the information from ESX and document it. Watch this space.
A PowerShell script like this one you mean 😉
http://www.virtu-al.net/2009/02/13/more-network-info/
You have a script for everything mate! Will update the post how about one that creates me a nice visio diagram based on the CDP info. Now that would be cool!
Nice article.
One question/comment. In pretty much all the esx installations I have undertaken (that I can remember at any rate), I have never set the CDP command, but have alwasy been able to see the port info when selecting one of the vmnics. I know the actual Cisco’s switches have CDP enabled though.
Are you sure it is not enabled by default in ESX installations?
Thanks
David
Intersting you have me thinking if I have actually checked it before running these commands now, afaik it doesn’t appear until this has run but this may have changed within vSphere without me realising. I am doing some fresh installs Monday so will take a look.
Thanks for your comment
Barry