2. Traceroute:-
- Traceroute is another important utility which is used to Trace the path to reach the destination IP add. and find the RTT to reach the destination IP add.
- Traceroute is also application layer utility and uses UDP protocol and has reserved port 33434 to 33523. It can trace path upto 30 hops.
- Traceroute utility is available Unix, Linux systems.
* Now the question arises that how does the traceroute know the IP add. of the devices it passes through ?
To answer this lets understand the Flow or working of Traceroute.
* Working/ Flow of Traceroute:-
1. R1 sends 3 UDP packets with TTL value 1.
2. R2 receives the UDP packet, does a route lookup and try to forward the traffic towards R3 by reducing the TTL value by 1, but as it reduces the TTL value it becomes zero and if the TTL is zero the packet can't move forward to another device. Hence, R2 generates an ICMP error message- "TTL expired in transit" or "TTL expired" to inform originator R1 with Type- 11 and Code- 0 for each UDP packet.
3. R1 receives the ICMP error message and comes to know about the 1st hop IP add.
4. Now R1 sends 3 UDP packets with the TTL value set to 2 this time.
5. As the Packets reach R2, R2 reduces the TTL value by 1( TTL becomes 1) and forwards the packets to R3. After receiving R3 tries to forward the packets by reducing the TTL value by 1 but the value becomes zero and packets couldn't be forwarded. So, this time R3 generates the ICMP error message "TTL exceeded" or "TTL expired in transit" with Type- 11 and Code- 0 . This is how R1 comes to know about the IP add. of R3.
6. Now, R1 sends 3 UDP packets with TTL value 3. The packet reaches R4, does a route lookup and find the destination IP add. in the routing table but the UFP port is not open. Hence, generates ICMP error message to inform originator (R1) with Type- 3 (Destination Unreachable) and Code- 3 (Port Unreachable) for each packet.
7. R1 comes to know about the 3rd Hop add. (R4) but ICMP error message with destination unreachable and port unreachable, R1 understands it has reached the destination and further no need to send any UDP packet with higher TTL value.
3. Tracert:-
Tracert is basically used primarily in Windows operating systems to trace the path that packets take from a source computer to a destination host across a network.
It uses the ICMP protocol instead of UDP.
* Working/ Flow of Tracert:-
1. PC1 sends 3 ICMP echo request packets with TTL value of 1.
2. R1 received packets with TTL value 1 but cannot send it further as TTL value becomes zero. So, it generates ICMP error message Type=11, code=0.
3. PC1 comes to know about the 1st Host address 10.1.1.2 (R1).
.............................................................
Skipping to the final step-
4. PC1 sends 3 ICMP request packets with TTL value 4.
5. R4 received the ICMP echo packet with TTL value 1 and destination IP address is present in the routing table. So, it generates ICMP reply message Type 0 ( Echo reply) code 0 to originator.
6. PC1 receives the ICMP reply message and comes to know about the 4th Hop address 10.1.34.4 (R4). PC1 understands that it has reached the destination and no need to send further ICMP echo request with Higher TTL value.
l Interview questions
for Network Engineer L1 asked from Network Utilities:-
## DISCLAIMER:- The
questions asked in the interview are all scenario based and indirect, So you
should try to understand the concept instead of cramming. You will be fortunate
if you receive a direct question from the interviewer.
1. What is the difference between Tracert and Traceroute?
2. What is TTL value?
3. Which protocol does Traceroute uses?
4. Which protocol does Tracert uses?
5. What is the purpose of Traceroute?
6. Describe the working of Traceroute?
Comments
Post a Comment