Monday, September 09, 2013

Windows 8: Built-in Command Line Network Utilities

Below is a list of command line network utilities that come with Windows that are used for troubleshooting network problems. The problem with these utilities is that they're not very intuitive until you learn to understand what you're looking at.

For example, the PING command is for checking if a remote computer or device is network accessible (note: this can be block by the device's firewall). The IPCONFIG command displays information about the  computer's TCP/IP configuration, such as its IP address.

To access these utilities utilizing the command prompt, from the Start screen, type CMD and press Enter. To exit the command prompt, close the window or type EXIT and press enter.  For more information and options on any of the commands below, use the "/?" switch at the end of them (e.g. PING /?).

PING [hostname]
Example : ping
Preforms a basic network test to check  communication with a remote device. 
TRACERT [hostname]
Example: traceroute
Shows the path and the number of routers (aka 'network hops') that the data passes through to arrive to the destination, if a connection is broken, this will show where it could be happening.
Example : ifconfig
Shows the basic TCP/IP network configuration for the computer, such as the IP address, subnet mask, and default gateway.
NSLOOKUP [hostname]
Example: nslookup
Displays the remote IP address assigned to a domain name based on the DNS information. This is a good test to make sure that the DNS connection is working properly.

Below is an example of the output:
Non-authoritative answer:
NETSTAT [options]
Example: netstat -nt
Displays the current TCP/IP based connections established on the computer. This is handy to see the remote TCP/IP connections the system is using. 
TELNET [hostname] [port]
Example: telnet 80
Provides a simple terminal session with another computer to perform different tasks, such as remote device administration or running text based applications. This utility can also be used for doing basic troubleshooting on HTTP, SMTP, and other text based  services.
ARP [options]
Example: arp -a
Shows and manages the local computer's address translation tables
NBTSTAT [options]
Example: nbtstat -n
Shows protocol statistics for NBT (NetBIOS over TCP/IP) connections.
NETSH [options]
Example: netsh interface show interface
Manages local or remote network configurations.
NET [options]
Example: net view
Displays or configures advanced network and system settings.
NLTEST [options]
Example: nltest /query
Tests the secure channels between a Windows computer in a domain and domain controllers.
PATHPING [hostname]
Example: pathping
Functions similarly to TRACERT command but also reports information about network latency and loss at each router.
GETMAC [options]
Example: getmac
Displays the MAC addresses for the NIC(s) attached to the computer.
Example: hostname
Shows the network name of the local computer.
ROUTE [options]
Example: route print
Displays and manages the local computers network routing tables.

No comments: