Essential Network Troubleshooting Commands

Nov 30, 2024

Network Troubleshooting Tools

Understanding Device Configuration

  • Key Configurations: IP addresses, subnet mask, DNS settings, DHCP server.
  • Windows Command: Use ipconfig to view adapter info, IPv4/IPv6 details, hostname, DNS server, and DHCP server.
  • Detailed View: Use ipconfig /all for extensive configuration details.

Communication Testing

  • Ping Command: Checks if another device can communicate with your device.
    • Measures round-trip time.
    • Sends 4 requests in Windows and shows TTL (Time to Live).
  • Example: Pinging 9.9.9.9 showed 4 received replies, 0% packet loss, and round-trip times between 16-21 ms.

Network Statistics with NETSTAT

  • Utility: Available on Windows, Linux, Mac OS.
  • Common Commands:
    • netstat -a: Lists all connections.
    • netstat -b: Displays applications using connections (needs admin rights).
    • netstat -n: Shows IP addresses only, no name resolution.

Domain Name Resolution

  • NSLookup Command: Queries DNS servers to resolve domain names to IP addresses.
    • Example: nslookup www.professormesser.com shows multiple IP addresses for redundancy.

Windows Specific Commands

  • Net Commands: Used for viewing and managing network shares and user accounts.
    • net view: List shares on a server.
    • net use: Map drives.
    • net user: Manage user accounts.

Traceroute for Path Tracking

  • Traceroute (tracert): Maps the route a packet takes across the network using ICMP and TTL.
    • Process: Sends packets with increasing TTLs to map intermediate devices.
    • Example: Tracing to 9.9.9.9 with tracert -d showed 8 hops.

Pathping for Combined Data

  • Pathping: Combines ping and traceroute functions.
    • Phases:
      • Phase 1: Traceroute.
      • Phase 2: Measures round-trip times and packet loss.
    • Example: pathping -n 9.9.9.9 provides detailed metrics over 200 seconds.

Utility and Analysis

  • Usage: These commands help diagnose connectivity issues, examine routing paths, and identify network problems.
  • Practical Application: Use them to analyze network performance and track down where issues may arise.