You are on page 1of 1

NETSTAT [-a] [-e] [-n] [-s] [-p proto] [-r] [interval]

-a
-e
-n

Displays all connections and listening ports.


Displays Ethernet statistics. This may be combined with the -s option.
Displays addresses and port numbers in numerical form.
proto Shows connections for the protocol specified by proto; proto may be TCP or UDP.
-p
If used with the -s option to display per-protocol statistics, proto may be TCP, UDP, or
IP.
-r
Displays the routing table.
Displays per-protocol statistics. By default, statistics are shown for TCP, UDP and IP; the
-s
-p option may be used to specify a subset of the default.
Redisplays selected statistics, pausing interval seconds between each display. Press
interval CTRL+C to stop redisplaying statistics. If omitted, netstat will print the current
configuration information once.
Examples
Tip: Keep in mind that if you have network applications open, such as the Internet browser
you're using to view this page, additional items will be listed when you run "netstat" and the
"netstat -a" command. So you may see items from Computer Hope in your list. If you want a true
listing of background Internet connections, close all programs and run the command. Finally, it is
also normal to see one or more 0.0.0.0 and 127.0.0.1 addresses.
netstat
Displays all local network information. Below is an example of what may be displayed.
Proto
TCP
TCP
TCP

Local Address
hope:4409
hope:3708
hope:4750

Foreign Address
www.computerhope.com:telnet
multicity.com:80
www.google.com:80

State
ESTABLISHED
CLOSE_WAIT
CLOSE_WAIT

netstat -an
Displays all connections on the computers in numerical format, only displaying the local and
foreign IP addresses.
netstat 5

You might also like