• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 4. Windows XP Applications and Tools > Active Connections Utility

Active Connections Utility \windows\system32\netstat.exe

Displays protocol statistics and current TCP/IP network connections.

To Open

Command Prompt netstat


netstat [-a] [-e] [-n] [-o] [-p proto] [-r] [-s] [interval]


Type netstat by itself to list the active incoming and outgoing network connections. This can be useful, for example, to determine exactly what is being transmitted or received across the network at any given time.

The Active Connections Utility accepts these options:


Display all connections and open ports (see Notes).


Display Ethernet statistics; it can be combined with -s.


Display addresses and ports in a numerical format (e.g.,


Display the process that owns each listed connection.

-p proto

Show the connections corresponding to the protocol; the protocol can be IP, IPv6, ICMP, ICMPv6, TCP, TCPv6, UDP, or UDPv6.


Display the routing table (see “Route”, later in this chapter).


Display statistics for each protocol. By default, statistics are shown for all protocols, but this display can be filtered with the -p option.


Repeatedly run netstat, pausing interval seconds between each display. Press Ctrl-C to stop the display at any time. If omitted, netstat will display the current statistics once and then quit.

Information is displayed in the following columns:


The protocol—usually TCP for the TCP/IP protocol used on the Internet and most local networks

Local Address

The name of the local machine, followed by a colon, and then the process ID of the application that has initiated the connection

Foreign Address

The name or IP address of the remote machine, followed by a colon, and then the port number


Shows whether the connection is established or broken


  • You must have an open command prompt window to use netstat; otherwise, the window closes before you can read the program’s output.

  • The the -a parameter is especially useful, as it lists all currently open ports. Open ports can sometimes compromise security, so it’s best to know about any back doors. See Chapter 7 for more information.

  • Type netstat /? at the command prompt for a description of the command-line options.

See Also


  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint