NETSTAT
The netstat command line utility is used to troubleshoot TCP/IP connections. If you type the netstat command by itself, it displays a list of connections that your system has with remote systems and the associated ports.
Like nbtstat, netstat supports a number of switches to help you get the most information possible out of the command. Table below lists some of the more popular netstat switches.
NETSTAT SwitchesSwitch | Description |
---|---|
/? | Shows a list of switches supported by netstat and a brief description of each switch. |
/a | Using the -a switch displays all connections that your system has but also all listening ports. A port is what an application uses as an endpoint of communication. For example, applications such as Internet Explorer use a port, and that port is where a Web server sends the data so that the data reaches Internet Explorer. |
/o | Displays the process ID of the application that has opened the port. You can use this information with Task Manager to track down the application that opened the port. |
-A <ip address> | Shows the connections for the protocol provided to the switch. For example, you could type netstat -p TCP to view all the TCP connections. In this example, you will not see the UDP connections. |
An example usage of the netstat command is as follows:
netstat -a -o
PATHPING
pathping is a newer command line utility to the Windows world that allows you to ping a destination, but like the tracert command, you get a list of hops (routers) from the source to the destination. After the list of hops is determined, pathping sends a number of messages to each hop to calculate statistics on each hop, such as the number of lost packets.
NSLOOKUP
nslookup is a TCP/IP utility used to query DNS and to troubleshoot problems associated with DNS. With nslookup, you can query for a specific type of record, such as e-mail server records (known as MX records) if you want to know the mail servers for a particular company.
In this tutorial:
- Networking the Operating System
- Understanding Networking Components
- Installing a network adapter in Windows 2000/XP/2003
- Network client
- Protocols
- IPX/SPX
- Services
- The TCP/IP Protocol
- Subnet mask
- Default gateway
- Configuring TCP/IP en masse using DHCP
- Understanding Name Resolution
- WINS
- The LMHOSTS file
- The HOSTS file
- Troubleshooting with TCP/IP Utilities
- PING
- TRACERT
- NETSTAT
- Sharing File System Resources
- Enabling File and Printer Sharing in Windows 2000/XP/2003
- Sharing a folder in Windows XP
- Hidden shares
- Using a UNC path
- Sharing Printer Resources
- Understanding Windows Services
- Browser service