why is tracert so slow?

1.21K views

I’m investigating a load of IP addresses and running a tracert to get an idea of who they are.

Considering it takes milliseconds to talk to the target machine, why does it take so long to get a list of the nodes the connection goes through?

In: Technology

try using the option (usually -n) that stops it trying to look up the host name for every hop.

Inefficient coding, basically.

Traceroute is based on modifying the Time To Live of the packet. Packets have a TTL field so that you can’t have a situation where a packet just circles around the network forever if a loop is somehow made. So each packet has a TTL value, which is decremented on every router it passes through. Once you reach zero, the router drops the packet, and sends an ICMP Time Exceeded packet to the sender.

That’s how you get that list: first try a TTL of 1, then 2, then 3…

It’s slow probably because you’re using a simply coded and inefficient program that doesn’t exploit parallelism and instead goes step by step. On Linux try `mtr` instead.