1. What is ping?
ping is a basic network troubleshooting command used to check:
How ping works
Common usage
Useful options
What ping helps you diagnose
-
Internet not working → check basic connectivity
-
High latency → network congestion
-
Packet loss → poor connection or faulty router
-
DNS issues → try pinging IP instead of domain
2. What is traceroute?
traceroute shows the path a packet takes from your computer to a destination.
It helps you identify:
How traceroute works
-
Sends packets with increasing TTL (Time To Live) values.
-
Each router on the path decreases TTL and sends back an ICMP Time Exceeded message.
-
You see each “hop” between you and the destination.
Common usage
If traceroute is not installed:
Useful options
Ping vs Traceroute — Key Difference
| Feature |
ping |
traceroute |
| Checks host availability |
✔ |
✖ |
| Shows path/hops |
✖ |
✔ |
| Measures latency |
✔ |
✔ (per hop) |
| Packet loss detection |
✔ |
Partial |
| Protocol used |
ICMP |
UDP/ICMP/TCP |
When to use what?
Use ping when:
-
You want to quickly check if a server is reachable.
-
You want to know latency.
-
You want to check for packet loss.
Use traceroute when:
-
Network is slow and you want to find where the delay happens.
-
Path between two servers is changing.
-
You want to detect where packets are getting dropped.