Systems Engineering and RDBMS

Finding Active Network Ports Using ‘netstat.exe’

Posted by decipherinfosys on April 15, 2007

The netstat.exe command is a simple yet powerful command line tool that can help you with basic networking issues, such as what ports are active on your personal computer, all the way up to assisting with complex tasks like troubleshooting network connectivity problems within a distributed computing environment.

As many of us move away from command line tools in favor of GUI-based network monitoring tools, it is always nice to review the features of a ‘back to basics’ command.

Netstat has approximately 10 switches associated with it, and typing netstat ? provides a brief summary of each. 

Running netstat without any switches displays all ports open on the machine at the time the command is run.

If you need more information, like a list of all ports that are listening on a machine, simply add the -a switch. The output of a netstat -acommand is displayed in the the following screen-shot:

netstat_a

If you prefer to see the Local Addresses in numerical IP address form, you can add the -n switch to the command, which changes the output to this:

netstat_an

In Windows 2003, netstat has gained the -oswitch. This switch is extremely helpful because it identifies which process identifier (PID), or program, is listening on a given port. So netstat -ano will provide the following information:

netstat_ano

As you can see from the above examples, netstat.exe is a basic command that can provide some very useful information.

Sorry, the comment form is closed at this time.

 
%d bloggers like this: