🛠️

The Windows Network Command Line

Feb 17, 2025

Network Troubleshooting Commands

Importance of Understanding Device Configuration

  • Essential to know IP addresses, subnet masks, DNS settings, and other IP configurations.
  • ipconfig command in Windows provides detailed network configuration.
    • Displays adapter information, IP details (IPv4 and IPv6).
    • Shows hostname, IP address, subnet mask, default gateway.
    • Use ipconfig /all for more detailed information, including DHCP and DNS server details.

Ping Command

  • Used to check communication with another device on the network.
  • Sends requests and measures round-trip time.
  • Example: Ping to the Quad 9 server (9.9.9.9).
    • Sends four requests, measures response time, TTL (Time to Live).
    • Useful for initial network communication checks.

Netstat Command

  • Stands for network statistics, available on Windows, Linux, macOS.
  • Displays active connections and listening ports.
    • netstat -a: Shows all connections and listening ports.
    • netstat -b: Shows binaries, requires admin privileges.
    • netstat -n: Shows IP addresses only, without name resolution.
  • Use elevated command prompt for certain options (e.g., netstat -b).

NSLookup Command

  • Resolves domain names to IP addresses.
  • Example: nslookup www.professormesser.com.
    • Queries DNS server to find the IP address for a domain.
    • Can show multiple IP addresses for redundancy.

Windows NET Command

  • Summarizes Windows-specific commands related to networking.
    • net view: Shows available shares on a remote server.
    • net use: Maps a drive to a network share.
    • net user: Views and manages user accounts.

Traceroute Command

  • Identifies the route packets take to reach a destination.
  • Windows command: tracert.
    • Uses ICMP protocol and TTL (Time to Live) to trace routes.
    • Displays each hop along the path to the destination.
  • Useful for diagnosing routing problems or examining the network path.

Pathping Command

  • Combines features of Ping and Traceroute.
  • Measures round-trip time and packet loss for each hop.
  • Takes longer but provides detailed insights into network issues.
  • Example command: pathping -n 9.9.9.9 displays only IP addresses.

Summary

  • These commands are essential for diagnosing and understanding network issues.
  • Knowing when and how to use each command can help quickly identify and resolve connectivity problems.