🌐

The Windows Network Command Line

Sep 4, 2025

Overview

This lecture covers essential Windows networking commands for troubleshooting, including IP address discovery, connectivity testing, route tracing, and network shares management.

Viewing Network Configuration

  • Use the ipconfig command to display adapter, IP, subnet mask, DNS, and DHCP server information for IPv4 and IPv6.
  • ipconfig /all provides more detailed network configuration, including host name and proxy settings.

Testing Network Connectivity

  • The ping command checks communication with another network device and measures round trip times.
  • Windows ping sends four data packets and reports any packet loss and round trip speed.
  • The TTL (Time to Live) value in ping shows remaining hops, helping diagnose route changes.

Analyzing Active Connections

  • netstat displays active connections and listening ports.
  • netstat -a lists all connections and listening ports on the device.
  • netstat -b shows the executable responsible for each connection (requires administrator rights).
  • netstat -n displays connections using only IP addresses without name resolution.

DNS Resolution

  • Use nslookup to resolve domain names to IP addresses and view DNS server responses.
  • Multiple IPs may appear for redundancy if a domain has several servers.

Managing Windows Networks and Shares

  • Windows net commands manage resources like user accounts and shared files.
  • net view \\servername lists available shares on a remote server.
  • net use [drive:] \\servername\sharename maps a shared drive to a drive letter.
  • net user views and manages user accounts on a device.

Tracing Network Paths

  • tracert traces the route packets take to reach a destination, listing each router (hop) along the way.
  • TTL in tracert refers to the number of routers a packet can traverse, not actual time.
  • Some routers or firewalls may not respond, resulting in missing data for certain hops.

Combined Path and Ping Analysis

  • pathping combines ping and tracert, first mapping the route and then measuring round trip times and packet loss at each hop.
  • pathping takes longer but gives detailed hop-by-hop network performance statistics.

Key Terms & Definitions

  • IP Address — Unique identifier for a device on a network.
  • Subnet Mask — Determines the network and host portions of an IP address.
  • DNS (Domain Name System) — Translates domain names to IP addresses.
  • DHCP (Dynamic Host Configuration Protocol) — Assigns IP address settings automatically.
  • TTL (Time to Live) — Limits the number of hops a packet can make.
  • Ping — Tests connectivity between devices.
  • Traceroute (tracert) — Maps the path packets take to a destination.
  • Netstat — Displays network connections and listening ports.
  • nslookup — Queries DNS for domain resolution.

Action Items / Next Steps

  • Practice using ipconfig, ping, netstat, nslookup, tracert, and pathping commands.
  • Try mapping a shared network drive with net use.
  • Review details from ipconfig /all for your device's configuration.