IP Commands for DOS/Windows

Get a quick guide to essential IP-related commands on DOS and Windows, including ipconfig, ping, tracert, and netstat.

Viewing Network Configuration with IPCONFIG

The ipconfig command is the primary tool for viewing IP configuration on Windows. Running ipconfig in a Command Prompt shows basic information about your active adapters, including IPv4 and IPv6 addresses, subnet masks, and default gateways.

Adding the /all switch (ipconfig /all) displays detailed information such as DHCP servers, DNS servers, and lease times. This is invaluable when diagnosing connectivity problems or documenting network settings.

Testing Connectivity with PING and TRACERT

The ping command sends ICMP echo requests to a host to test basic connectivity and measure round-trip time. For example, ping 8.8.8.8 checks whether you can reach a public DNS server, while ping your-router-ip helps verify local network health.

tracert (trace route) shows the path packets take to reach a destination, listing each hop along the way. This helps you identify where delays or failures occur—on your local network, at your ISP’s edge, or deeper in the internet.

Advanced Tools: NETSTAT and PATHPING

netstat displays active connections and listening ports, which is useful for spotting unexpected services or confirming that servers are bound to the right interfaces. Options like netstat -ano can show process IDs for further investigation.

pathping combines features of ping and tracert, running multiple tests along the route to measure packet loss at each hop. These built-in tools provide a strong starting point for TCP/IP troubleshooting without requiring additional software.