6 minutes ago, Catsrules said:
Ahh so tracert actually don't know all of the ip addresses in the route, it is only when the routers replies back to the request telling tracert there ip?
So how do the routers know I am asking for a response back? Does tracert send a special request or something that most routers listen for?
Traceroute sends packets with a TTL starting at 1 and increasing by 1 for each hop until the destination is reached. Because the router that receives the packet will decrement the TTL by 1, the router will set it to 0 and by doing so will send out a time exceeded error message back to the client. Repeat by incrementing the TTL by 1 and one further hop sending the time exceeded error message back. The message will be sourced by the routers interface in most cases when it responds back, thus giving the IP address of the router away. Routers can be set to ignore and not respond with the time exceeded messages or they can be filtered by a firewall (which, unless configured otherwise, won't respond by default)
Forgot to mention, depending on the client it might do UDP instead and in that case it will pick a random port that's usually not listened on and in that case a port unreachable message will be sent instead.