CLI command that displays network connections for TCP, UDP, Routing Tables, and a number of network interface and network protocol statistics.

Usage

NameDescription
-aDisplays all active connections and the TCP and UDP ports on which the computer is listening.
-bDisplays the binary (executable) program’s name involved in creating each connection or listening port. (Windows XP, Windows Server 2003 and newer Windows operating systems; not Microsoft Windows 2000 or older).
-bCauses -i to report the total number of bytes of traffic.
-eDisplays ethernet statistics, such as the number of bytes and packets sent and received. This parameter can be combined with -s.
-fDisplays fully qualified domain names for foreign addresses (only available on Windows Vista and newer operating systems).
-f Address FamilyLimits display to a particular socket address family, unix, inet, inet6
-gDisplays multicast group membership information for both IPv4 and IPv6 (may only be available on newer operating systems)
-iDisplays network interfaces and their statistics
-mDisplays the memory statistics for the networking code (STREAMS statistics on Solaris).
-nDisplays active TCP connections, however, addresses and port numbers are expressed numerically and no attempt is made to determine names.
-oDisplays active TCP connections and includes the process id (PID) for each connection. You can find the application based on the PID in the Processes tab in Windows Task Manager. This parameter can be combined with -a, -n, and -p. This parameter is available on Microsoft Windows XP, Windows Server 2003, and Windows 2000 if a hotfix is applied.
-p protocolShows connections for the protocol specified by protocol. In this case, protocol can be tcp, udp, tcpv6, or udpv6. If this parameter is used with -s to display statistics by protocol, protocol can be tcp, udp, icmp, ip, tcpv6, udpv6, icmpv6, or ipv6.
-pShow which processes are using which sockets (similar to -b under Windows) (you must be root to do this)
-P protocolShows connections for the Protocol specified by protocol. In this case, protocol can be ip, ipv6, icmp, icmpv6, igmp, udp, tcp, or rawip.
-rDisplays the contents of the IP routing table. (This is equivalent to the route print command under Windows.)
-sDisplays statistics by protocol. By default, statistics are shown for the TCP, UDP, ICMP, and IP protocols. If the IPv6 protocol for Windows XP is installed, statistics are shown for the TCP over IPv6, UDP over IPv6, ICMPv6, and IPv6 protocols. The -p parameter can be used to specify a set of protocols.
-tDisplay only TCP connections.
-uDisplay only UDP connections.
-WDisplay wide output - doesn’t truncate hostnames or IPv6 addresses
-xDisplays NetworkDirect connections, listeners, and shared endpoints.
-yDisplays the TCP connection template for all connections.Cannot be combined with the other options.
-vWhen used in conjunction with -b it will display the sequence of components involved in creating the connection or listening port for all executables.
IntervalRedisplays the selected information every Interval seconds. Press CTRL+C to stop the redisplay. If this parameter is omitted, netstat prints the selected information only once.
-hDisplays help at the command prompt.
-?Displays help at the command prompt.
/?Displays help at the command prompt.