Study of traceroute Command
Experiment
Study of traceroute Command
๐ฏ Aim
To trace the path taken by packets from the source to a destination host using the traceroute command.
๐ Objective
By the end of this experiment, students will be able to:
- Identify intermediate routers (hops) in a network path
- Measure delay at each hop
- Analyze routing behavior in networks
- Diagnose network delays and failures
๐ Theory
The traceroute command is used to:
- Track the path packets take to reach a destination
- Display each intermediate router (hop)
๐ It works by manipulating the TTL (Time To Live) field:
- Sends packets with increasing TTL values (1, 2, 3, …)
- Each router decreases TTL by 1
- When TTL reaches 0, the router sends back an ICMP “Time Exceeded” message
๐ This helps identify each hop along the route.
๐งพ Syntax
-
<destination>→ IP address or domain name
๐ง Common Options
-
-n→ Do not resolve hostnames (faster) -
-m <max_hops>→ Set maximum hops -
-q <queries>→ Number of probes per hop -
-w <wait_time>→ Wait time for response -
-I→ Use ICMP instead of UDP
๐งฐ Prerequisites
- Linux system
- Internet connectivity
-
tracerouteinstalled
Installation:
๐ฌ Procedure & Commands
1️⃣ Trace Route to a Website
2️⃣ Trace Using IP Address
3️⃣ Disable Hostname Resolution
4️⃣ Limit Maximum Hops
5️⃣ Use ICMP Mode
๐ฅ️ Sample Output
traceroute mec.ac.in traceroute to mec.ac.in (172.67.179.117), 30 hops max, 60 byte packets 1 _gateway (14.139.184.209) 0.573 ms 0.845 ms 0.838 ms 2 * * * 3 * * * 4 10.255.221.33 (10.255.221.33) 22.921 ms 10.255.222.33 (10.255.222.33) 22.914 ms 22.908 ms 5 dsl-tn-085.99.246.61.airtelbroadband.in (61.246.99.85) 32.630 ms 32.622 ms 32.617 ms 6 * * 116.119.61.206 (116.119.61.206) 160.389 ms 7 162.158.20.18 (162.158.20.18) 185.576 ms 185.568 ms 185.205 ms 8 162.158.20.48 (162.158.20.48) 174.281 ms 162.158.20.55 (162.158.20.55) 201.434 ms 201.427 ms 9 172.67.179.117 (172.67.179.117) 174.260 ms 174.253 ms 181.788 ms
๐ Output Interpretation
| Field | Meaning |
|---|---|
| Hop number | Step in the route |
| IP/hostname | Router at that hop |
| ms values | Round-trip times |
* * * | No response (timeout/firewall) |
๐ Exercises for Students
- Trace route to a popular website and count hops.
- Identify your default gateway (first hop).
-
Compare results with and without
-n. - Observe delays at different hops.
-
Find where packet loss occurs (
* * *).
❓ Viva Questions
-
What is the purpose of
traceroute? - How does TTL help in traceroute?
-
Why do some hops show
* * *? -
Difference between
pingandtraceroute? - What is a hop?
⚠️ Precautions
- Some routers block ICMP/UDP → incomplete results
- Results may vary due to dynamic routing
- Use responsibly in lab environments
✅ Result
The traceroute command is a powerful diagnostic tool used to analyze network paths and delays, helping in troubleshooting connectivity issues.
Comments
Post a Comment