How to Get Cisco (CDP) Data on the Command Line.

Troubleshooting networking is rather difficult if you can only connect to your ESX box via the console. Luckily I came across the instructions below

 

To extract CDP information using the ESX command line 

  1. Log in into ESX 3.5 via SSH as root.
  2. Run the following command on the ESX command line
# vmware-vim-cmd hostsvc/net/query_networkhint

You can also specifiy a nic

# vmware-vim-cmd hostsvc/net/query_networkhint -pnic-name-vmnic0

The following information is displayed

  1. CDP information from the physical Cisco switch connecting to the ESX host .
  2. Virtual switch port information

Here is the link to the VMware KB Article. 

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1007069

Leave a Reply