How to view Cisco CDP information from a Windows server
By now most of you should be familiar with how to view CDP details from your VMware ESX server. This can be very helpful when working with your network team to identify what port and VLAN you are connected to. I use this commonly when setting up new ports or troubleshooting a possible network issue. It saves the time of going into the datacenter and trying to trace back the cables.
So this is a pretty easy thing to do on Windows also. You will need to download and install WinPcap and Windump tools. Both of these tools are free and small installs. There are many other uses for these tools, today I will just be covering how to user for CDP captures. One last note before starting is that if CDP is turned off on your Cisco switches you will not get any information when trying this.
The first thing you want to do is to install WinPcap and Windump is just a .exe and requires no install. Not to get a list of all network interfaces in your machine use the following command. You can use this information to choose a certain interface to capture details for. I typically like to capture the information for all interfaces so I do them one by one.
Next we can run the actual command to capture the details. Use the command string listed below with the only bit that you will need to change is the -i part. This will allow you to select the different network interfaces that you listed in the previous command.
windump -i 1 -nn -v -s 1500 -c 1 ether[20:2] == 0x2000
Once you run the command above you should see an output similar to image below. I have highlighted the important sections that show the Address of the switches mgmt port, Port ID is the port your connected to and VLAN ID shows you the current VLAN setting for the port.
About Brian Suhr
Brian is a VCDX5-DCV and a Sr. Tech Marketing Engineer at Nutanix and owner of this website. He is active in the VMware community and helps lead the Chicago VMUG group. Specializing in VDI and Cloud project designs. Awarded VMware vExpert status 6 years for 2016 - 2011. VCP3, VCP5, VCP5-Iaas, VCP-Cloud, VCAP-DTD, VCAP5-DCD, VCAP5-DCA, VCA-DT, VCP5-DT, Cisco UCS Design