Displays statistics and current connections for TCP/IP.


netstat [-a] [-e] [-n] [-s] [-p protocol] [-r] [interval]



Lists all TCP/IP connections and their current statuses.


Displays frame statistics for network adapters (can be used with -s option).


Lists addresses and port numbers as numbers instead of trying to resolve them using DNS. This is useful if DNS isn’t working properly and you want to avoid long timeouts when using netstat.

-p protocol

When used in conjunction with -s option, displays statistics for the specified protocol, which can be either TCP, UDP, ICMP, or IP.


Displays the routing table.


Displays statistics and connections for all TCP/IP protocols.


Causes the output to be refreshed every interval seconds until Ctrl-C is pressed.


Show statistics for Ethernet frames:

                     netstat -e
Interface Statistics
                           Received            Sent
Bytes                      48446148        43795441
Unicast packets              195267          207067
Non-unicast packets           12311            6830
Discards                          0               0
Errors                            0               0
Unknown protocols             15400

Show statistics for TCP protocol and the current state of TCP connections:

                     netstat -s -p tcp TCP Statistics Active Opens = 7631 Passive Opens = 4689 Failed Connection Attempts = 269 Reset Connections = 380 Current Connections = 23 Segments Received = 160892 Segments Sent = 173884 Segments Retransmitted = 680 Active Connections Proto Local Address Foreign Address State TCP test:ldap ESTABLISHED TCP test:ldap ESTABLISHED ...

Get Windows 2000 Administration in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.