Name

Active Connections Utility — \windows\system32\netstat.exe

Synopsis

Displays protocol statistics and current TCP/IP network connections.

To Open

Command Prompt netstat

Usage

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

Description

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:

-a

Display all connections and open ports (see Notes).

-e

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

-n

Display addresses and ports in a numerical format (e.g., 192.168.0.1:88).

-o

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.

-r

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

-s

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

interval

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:

Proto

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, ...

Get Windows XP in a Nutshell, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.