Master Common Network Commands: Detailed Ping, ARP, Tracert, and Route Usage
This guide walks network engineers through the core Windows commands ping, arp, tracert, and route, explaining each option, interpreting output fields such as bytes, time, and TTL, demonstrating batch ping scripts, ARP record management, traceroute customizations, and route table manipulation for dual‑NIC setups.
Ping Command
Ping is a versatile TCP/IP utility used to test connectivity, resolve hostnames, and infer the remote operating system from the TTL value.
Basic usage : ping <IP_or_hostname> sends four echo requests by default.
Interpretation of output :
bytes : size of the ICMP packet.
time : round‑trip latency; smaller values indicate faster response.
TTL : Time‑To‑Live; helps guess the remote OS (e.g., Windows vs. Linux).
Continuous ping : ping -t <IP> runs until interrupted with Ctrl+C, then summarizes packets sent/received.
Specify count : ping -n 10 <IP> sends ten packets and reports min/avg/max times.
Set packet size : ping -l 65500 -t <IP> sends large packets; Windows caps size at 65500 bytes, and misuse can cause denial‑of‑service attacks.
Record route : ping -r 9 <IP> records up to nine hops.
ARP Command
ARP (Address Resolution Protocol) maps an IPv4 address to a MAC address, essential for layer‑2 communication.
Display cache : arp -a lists IP‑to‑MAC mappings.
Add static entry : arp -s <IP> <MAC> binds a MAC address to an IP, useful for preventing IP conflicts.
Delete entry : arp -d <IP> removes a specific cache entry; arp -d * clears the entire table (requires disabling network traffic).
Tracert Command
Tracert traces the route packets take to a destination, revealing each hop.
Basic syntax : tracert <IP_or_hostname>.
Suppress name resolution : tracert -d baidu.com shows only IP addresses.
Limit maximum hops : tracert -h 3 baidu.com stops after three hops.
Set timeout per hop : tracert -w 6 baidu.com waits six milliseconds for each reply.
Route Command
Route displays and manipulates the IP routing table, allowing control over which interface handles specific subnets.
View table : route print shows current routes, including default gateways (0.0.0.0).
Add a static route :
route add 49.222.151.207 mask 255.255.255.255 0.0.0.0 metric 1(example for an external gateway).
Add a subnet route for internal network : route add 10.168.0.0 mask 255.255.255.0 10.168.1.1 metric 1 directs traffic for 10.168.* to the internal NIC.
Delete a route : route delete <destination>.
By combining these commands, network engineers can quickly diagnose connectivity loss, IP conflicts, slow responses, and configure dual‑NIC environments without repeatedly unplugging cables.
Article sourced from 计算科学与信息化 (reprinted with permission).
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Golang Shines
We share daily the latest Golang technical articles, practical resources, language news, tutorials, and real-world projects to help everyone learn and improve.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
