Operations 12 min read

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.

Golang Shines
Golang Shines
Golang Shines
Master Common Network Commands: Detailed Ping, ARP, Tracert, and Route Usage

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).

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

network troubleshootingpingarpnetwork diagnosticsroutetracertWindows commands
Golang Shines
Written by

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.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.