Master 9 Essential Network Commands for Troubleshooting
This guide explains nine common Windows network commands—ping, ipconfig, arp, traceroute, route, nslookup, nbtstat, netstat, and net—detailing their purpose, basic syntax, useful options, and step‑by‑step troubleshooting procedures to help diagnose connectivity issues.
1. ping command
Ping (Packet Internet Groper) is a utility that tests network connectivity by sending ICMP Echo Request packets to a target host and measuring the round‑trip time.
It operates at the application layer of the TCP/IP model. Basic syntax: ping hostname, ping domain, or ping IP_address.
Typical usage order for fault isolation:
ping 127.0.0.1 – checks loopback, network card, TCP/IP stack.
ping local IP – verifies local configuration.
ping another LAN IP – tests LAN connectivity.
ping gateway IP – confirms the default gateway is reachable.
ping remote IP – checks external routing and ISP connectivity.
ping localhost – same as 127.0.0.1, verifies host name resolution.
ping http://www.baidu.com – forces DNS resolution; failures may indicate DNS problems.
Common options: ping IP -t – continuous ping until interrupted. ping IP -l 2000 – send packets of 2000 bytes instead of the default 32. ping IP -n 20 – send exactly 20 packets.
2. ipconfig command
ipconfig displays the IP configuration of each network interface. It is useful when the computer obtains its address via DHCP.
Common options: ipconfig – shows IP address, subnet mask, and default gateway for each interface. ipconfig /all – includes DNS, WINS, MAC address, and DHCP lease information. ipconfig /release – releases the DHCP‑assigned address. ipconfig /renew – requests a new DHCP lease.
3. arp command
ARP (Address Resolution Protocol) maps IP addresses to MAC (physical) addresses.
Typical uses: arp -a – displays the entire ARP cache. arp -a IP – shows cache entries for a specific interface. arp -s IP MAC – adds a static ARP entry. arp -d IP – deletes a specific ARP entry.
4. traceroute command
Traceroute (called tracert on Windows) displays the path packets take to reach a destination host.
Usage: tracert host_name or tracert ip_address.
The output shows five columns: hop number, three round‑trip times, and the router name/IP.
If fewer than three replies are received for a hop, an asterisk (*) is shown.
5. route command
The route command displays and manipulates the IP routing table.
Key options: route print – shows the current routing table. route add destination mask netmask gateway metric n – adds a static route. route change destination ... – modifies an existing route. route delete destination – removes a route.
6. nslookup command
nslookup queries DNS to obtain the IP address associated with a domain name (or vice‑versa).
Typical usage:
Run nslookup alone to see the default DNS server.
Enter a domain name (e.g., www.baidu.com) to retrieve its IP address.
7. nbtstat command
nbtstat displays NetBIOS over TCP/IP statistics and can reveal local workgroup, computer name, and MAC address.
Examples: nbtstat -n – shows local NetBIOS name table. nbtstat -a IP – queries remote host information.
8. netstat command
netstat shows active network connections, listening ports, Ethernet statistics, routing tables, and protocol‑specific counters.
Common options: netstat -a – displays all connections and listening ports. netstat -n – shows addresses numerically. netstat -e – Ethernet statistics (bytes sent/received, errors, etc.). netstat -r – routing table (similar to route print). netstat -s – protocol‑specific statistics.
9. net command
The net family provides access to Windows network services (e.g., net start, net stop, net use).
Use net /? for a list of commands; most accept /y (auto‑confirm) and /n (prompt) switches.
These nine commands form a fundamental toolkit for diagnosing and resolving common network problems on Windows systems.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Open Source Linux
Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
