Summary and Examples of Network Commands
These commands are essential for any IT professional to diagnose, monitor, and troubleshoot network issues on a daily basis. Each one provides a specific insight into the network's communication, configuration, or behavior.
1. ipconfig
Summary: Displays basic IP configuration of the machine.
Example: ipconfig
Use Case: Quickly check if the computer received a valid IP (e.g., 192.168.1.10).
2. ipconfig /all
Summary: Shows detailed network information, such as MAC, DNS, and DHCP.
Example: ipconfig /all
Use Case: Find out the address of the DHCP server that assigned the IP.
3. ipconfig /release
Summary: Releases the current IP obtained via DHCP.
Example: ipconfig /release
Use Case: Disconnect the machine from the network to force a new lease.
4. ipconfig /renew
Summary: Requests a new IP from the DHCP server.
Example: ipconfig /renew
Use Case: After releasing the IP, renew it to obtain a new configuration.
5. ipconfig /flushdns
Summary: Clears the local DNS cache.
Example: ipconfig /flushdns
Use Case: After changing a DNS record, clear the cache to resolve correctly.
6. ping [host]
Summary: Tests connectivity with another device.
Example: ping 8.8.8.8
Use Case: Check if there is Internet access.
7. tracert [destination]
Summary: Shows the packet path to the destination.
Example: tracert google.com
Use Case: Identify where packet loss or slowdown is occurring.
8. nslookup [domain]
Summary: Queries DNS records for a domain.
Example: nslookup youtube.com
Use Case: Verify if the domain is resolving to the correct IP.
9. netstat -ano
Summary: Lists active connections and open ports.
Example: netstat -ano
Use Case: Identify if there is a suspicious connection on a specific port.
10. arp -a
Summary: Displays the ARP table (IP associated with MAC).
Example: arp -a
Use Case: Find out the MAC address of a device on the local network.
11. hostname
Summary: Shows the computer name.
Example: hostname
Use Case: Confirm the machine's name to identify it on the network.
12. getmac
Summary: Shows the MAC addresses of the network interfaces.
Example: getmac
Use Case: Obtain the MAC address for firewall release or reserved DHCP.
13. net use
Summary: Connects to shared resources.
Example: net use Z: \\server\share
Use Case: Map a network drive to access files.
14. net share
Summary: Lists folders shared on the machine.
Example: net share
Use Case: Check which folders are exposed on the local network.
15. net start
Summary: Shows running services.
Example: net start
Use Case: Confirm if the print service is active.
16. net stop [service]
Summary: Stops a Windows service.
Example: net stop spooler
Use Case: Restart a stalled print queue.
17. netsh interface show interface
Summary: Shows network interfaces and their status.
Example: netsh interface show interface
Use Case: Check if the network interface is enabled.
18. netsh wlan show profile
Summary: Lists saved Wi-Fi networks.
Example: netsh wlan show profile
Use Case: Check which Wi-Fi networks the computer has connected to.
19. pathping [destination]
Summary: Combines ping and traceroute, showing latency and loss.
Example: pathping 8.8.8.8
Use Case: Diagnose slowness on a specific link.
20. route print
Summary: Displays the system's routing table.
Example: route print
Use Case: Check for conflicting persistent routes.