12 CMD command tools in Windows that network engineers must master!
Hello everyone, I am the "person" that the IT and engineering companies of Party A often call - a network expert of a communications manufacturer. Today I will share the commonly used network operation commands in CMD under Windows.
Press Menu key + R and enter "CMD" to open the command window.
1. Ping
Command introduction: Detect network connectivity
Basic usage: Enter "ping [target IP address/domain name]" in the command prompt, for example, "ping www.baidu.com", it will send ICMP packets to the target and return information such as response time to determine whether the target is reachable and the network status.
2. IPConfig
Command introduction: View IP configuration information
Basic usage: Enter "ipconfig" in CMD to view the local IP address, subnet mask, default gateway and other network configuration information. If you add the "/all" parameter, such as "ipconfig /all", you can also get more detailed information, including MAC address, DNS server, etc.
3. Getmac
Command Introduction: Get MAC address
Basic usage: Enter "getmac" in the command prompt to display the physical address (MAC address) of the local network adapter. If there are multiple network cards, all will be listed.
4. HostName
Command introduction: View host name
Basic usage: Enter "hostname" in CMD to display the host name of the current computer.
5. NSLookUp
Command introduction: query DNS information
Basic usage: Enter "nslookup [domain name]" in the command prompt, for example, "nslookup www.google.com", to query the IP address corresponding to the domain name. It can also be used to query DNS server related information to help diagnose DNS related problems.
6. Tracert
Command Introduction: Traceroute
Basic usage: Enter "tracert [target IP address/domain name]" in CMD, such as "tracert 1.1.1.1", which will display all routing node information that the data packet passes through from the local computer to the target address, including the IP address and response time of each hop, which is used to troubleshoot network path failures.
7. Netstat
Command introduction: View network connections
Basic usage: Enter "netstat" in the command prompt to view the current computer's network connection status, such as TCP, UDP connections, etc. Adding different parameters, such as "-a" (display all connections and listening ports) and "n" (display addresses and ports in digital form) can obtain more detailed information for understanding network activities and troubleshooting network security issues.
8. Arp
Command Introduction: View ARP Cache
Basic usage: Enter "arp -a" in CMD to view the ARP (Address Resolution Protocol) cache table of the local computer, which displays the mapping relationship between IP addresses and MAC addresses, and helps solve network communication problems within the LAN.
9. PathPing
Command Introduction: Comprehensive Path Test
Basic usage: Enter "pathping [target IP address/domain name]" in the command prompt, for example, "pathping www.microsoft.com". It combines the functions of "ping" and "tracert" to send data packets over a period of time to detect information such as packet loss rate in the network path, which is used to evaluate the quality of the network link.
10. SystemInfo
Command introduction: View system information
Basic usage: Enter "systeminfo" in CMD to obtain detailed information about the computer, including operating system version, BIOS version, processor information, memory size, etc., for system management and troubleshooting.
11. Nbtstat
Command Introduction: View NetBIOS Information
Basic usage: Enter "nbtstat -a [IP address/host name]" in the command prompt, for example, "nbtstat -a 192.168.0.1", to view the name table information based on NetBIOS (Network Basic Input/Output System), which is used to troubleshoot NetBIOS-related problems in the LAN.
12. Netsh
Command Introduction: Network Configuration Tool
Basic usage: "netsh" is a powerful command. For example, you can set the static IP address of the network interface by entering "netsh interface ip set address [interface name] static [IP address] [subnet mask] [gateway]". It can be used to configure network interfaces, firewalls, proxies and other network settings. The specific usage varies depending on the configuration task.