How-to do a tcpdump on vCenter Server Appliance?
I was doing some troubleshooting around the new Platform Services Controller (PSC) in HA mode in vSphere 6 and I needed to validate session persistence across PSC nodes. Nothing is better than using tcpdump to check network traffic coming in and out from both nodes.
mynewshinyvcsa6:~ # tcpdump
bash: tcpdump: command not found
What? What do you mean by “command not found”? :)
In fact, tcpdump and netcat are present but not installed by default (for security reasons). You can install them on vCSA 6 by running:
mynewshinyvcsa6:~ # /etc/vmware/gss-support/install.sh
Preparing... ########################################### [100%]
1:tcpdump ########################################### [ 50%]
2:netcat ########################################### [100%]
There you go!
FYI, the command to install tcpdump on vCSA 5.5 is a bit different:
myproductionvcsa55:~ # /etc/gss_support/install.sh
Preparing... ########################################### [100%]
1:tcpdump ########################################### [100%]
If you’re not familiar with tcpdump syntax, you can always check the manpage. :)