Put your knowledge of ports and protocols to use with netstat, a command line utility found in all operating systems.
In its most simple usage, after instructing my Web browser to go to www.rit.edu, I immediately executed the netstat -n command (-n kept the output in numerical form), and saw the following line in the output:
TCP 192.168.1.52:49439 129.21.1.40:80 ESTABLISHED
This shows that my browser had opened up port 49439 to connect to the RIT Webserver on port 80.
In addition to –n, you can explore other powerful switches, like -a, -b, and -f, at these links:
How to See What Web Sites Your Computer is Secretly Connecting To, Lori Kaufman, How-To GeekUsing the Netstat Command to Monitor Network Traffic, Sean Wilkins, Petri IT KnowledgebaseNetstat tips and tricks for Windows Server admins, Rick Vanover, TechRepublicNetstat, Microsoft TechNetNetstat, Mac OS X: List listening ports and programs using netstat转载于:https://www.cnblogs.com/sec875/articles/10358441.html