Tracert (Windows) or Traceroute (Unix) is a command line tool that traces the route taken by network packets to reach a specific destination IP address. When run, its lists all the hops (from one network device to another) taken by the network packet along with the time in milli seconds
How does it work?
Tracert or Traceroute works by recursively sending network packets with incremental TTL (Time-to-live) value to the destination IP address. In other words, it sends multiple ping requests. It then processes all responses received by each request to create the route taken and metrics associated with each hop.
How does it trace a domain?
Since Trace works at the network layer it cannot actually trace a Domain. Trace can send data to IP addresses only. If Trace is inititated on a domain, it first uses DNS to fetch the associated IP address of the domain and then initiates a Trace to that IP address.
Does it work across all IP address?
Yes it should work across all IP address (both IPv4 and IPv6) except when ICMP (Internet Control Message Protocol) Echo Request is blocked by firewalls in the network connecting the Trace server and end point IP address.
If a Domain has more than one IP address which IP will it trace?
This tool uses local DNS to resolve the domain to IP address and will trace the first IP returned by the DNS server.