Search This Blog

Tuesday, August 28, 2012

How traceroute works?


Let’s have the following topology:

When running traceroute , from R1 to R5 (R1#traceroute 5.5.5.5), the following actions occur:
     1.       R1 send UDP to R5 (source 5.5.5.5) with TTL of 1 and destination port of 33434
     2.       R2 replay to R1 with ICMP type 11 code 0 (time-to-live exceeded)
     3.       R1 repeats step 1 two more times when each time he raises the destination port in 1  (33435 and 33436 respectively)
     4.       R1 send UDP to R5 (source 5.5.5.5) with TTL of 2 and destination port of 33437
     5.       R3 replay to R1 with ICMP type 11 code 0 (time-to-live exceeded)
     6.       R1 repeats step 4 two more times when each time he raises the destination port in 1 (33438 and 33439 respectively)
     7.       R1 send UDP to R5 (source 5.5.5.5) with TTL of 2 and destination port of 33440
     8.       R4 replay to R1 with ICMP type 11 code 0 (time-to-live exceeded)
     9.       R1 repeats step 7 two more times when each time he raises the destination port in 1  (33441 and 33442 respectively)
     10.   R1 send UDP to R5 (source 5.5.5.5) with TTL of 2 and destination port of 33443
     11.   R5 replay to R1 with ICMP type 3 code 3 (Destination unreachable)
     12.   R1 repeats step 7 two more times when each time he raises the destination port in 1 (33444 and 33445 respectively)

      or in flow chart:
      
 

No comments:

Post a Comment