🌐

Network Troubleshooting Commands

Jun 11, 2025

Overview

This lecture covers essential network troubleshooting commands in Windows, explaining how to obtain system information, test connectivity, analyze network paths, and manage user accounts and shared resources.

Network Configuration & Diagnostics

  • Use ipconfig to display a computer's IP address, subnet mask, default gateway, and adapter details.
  • The ipconfig /all command provides extended info, including DNS servers, DHCP status, and hostname.
  • Use netstat to view active network connections, showing protocol, local and foreign addresses, and connection state.
  • netstat -a lists all active and listening ports; netstat -b shows the executable involved (requires administrator privileges).
  • Use netstat -n to display numerical IP addresses instead of resolving DNS names.

Testing Network Connectivity

  • The ping command checks if a device is reachable on the network by sending ICMP packets.
  • Ping returns roundtrip response time and packet loss statistics.
  • Useful for confirming connectivity to critical servers, such as DNS.

Analyzing Network Paths

  • tracert (trace route) displays the path packets take through routers to a destination.
  • Time To Live (TTL) is the number of hops a packet can make before being discarded.
  • Each router decrements the TTL, and when it reaches zero, an ICMP "time exceeded" message is sent back.

DNS and Name Resolution Tools

  • Use nslookup to query DNS servers for IP addresses or domain names and troubleshoot name resolution issues.

Managing Shares and Drives

  • Use net view \\<servername> to list shared resources on a server.
  • net use H: \\<servername>\<sharename> maps a network share to a local drive letter.

User Account Information

  • net user <username> /domain displays details about a user, including group memberships and account status.

Advanced Path Analysis

  • pathping combines features of ping and tracert, first mapping the route and then computing loss and latency statistics for each hop.
  • Useful for identifying problematic routers or firewall blocks along a network path.

Key Terms & Definitions

  • IP Address — Unique identifier for a device on a network.
  • Subnet Mask — Defines the network and host portions of an IP address.
  • Default Gateway — Router that forwards traffic to other networks.
  • ICMP (Internet Control Message Protocol) — Network layer protocol used by ping and tracert for diagnostics.
  • TTL (Time To Live) — Limits a packet's hops across routers.
  • Netstat — Utility for displaying active network connections.
  • Tracert — Traces the path packets take to a network destination.
  • Pathping — Combines tracert and ping to analyze latency and loss per hop.
  • DNS (Domain Name System) — Resolves domain names to IP addresses.
  • DHCP (Dynamic Host Configuration Protocol) — Automatically assigns IP addresses to devices.

Action Items / Next Steps

  • Practice using commands: ipconfig, ping, tracert, netstat, nslookup, net view, net use, net user, and pathping.
  • Review output formats and options for each command.
  • Explore additional nslookup features for DNS troubleshooting.