This week I explore the network using the traceroute command in the terminal.
$ traceroute IPADDRESS
Traceroute is a command that tests the connection between two points, such as my router to a website on the internet, by sending a small package (64 hops maximum) across the network.
The way to use the traceroute in the terminal. We need to have an IP Adress of the destination. We can get the address by typing
$ nslookup www.example.com
The result will be like this
Sometimes there're also multiple addresses show up. (I don't know why)
After getting an IP address, we can use that IP address to do the traceroute command. After getting an ITP and finished traceroute, I created a map by using Traceroute Mapper. The result was so interesting. When I try a web address with .co.th or other countries, I can see the package sending across the globe from NY to its destination.
Here are some results
Traceroute to ITP - using my local router
Traceroute to ITP - using my remote host
Traceroute to www.bangchak.co.th/ - using my local router
Travel home through the network
This is my favorite route. I decided to pick one .co.th web address to travel back home through the network.
This is the first route that hasn't finished tracing before its maximum.
Traceroute to www.amazon.com - compare between various routers
Google home linked
5G network
2.4G network (Maximum hops)
My iPhone Hotspot
My remote host
NYU network (maximum hops)
Analysis
Even using the same computer tracing the same website in the same location, the route appears to be changing all the time. At my place, there are 3 distinct addressed networks, 5G, 2.4G, and google home linked network. When I try traceroute through these different networks, mostly the first 6 hops are quite similar. I guess it might be because even their IP address is different even they are using the same network.
When I did nslookup command, sometimes there are multiple IP addresses appear. On my guess, it might be because they are using multiple servers to serve the website.
I tried traceroute to various sites. Most of the time, the request was blocked and went to the maximum hops.
When looking into traceroute maps, most of the route is traveling across the country from NY(my location) to LA or Sanfransico.
Sometimes it took a long route. Sometimes it short. I wonder if there is a default route that we send data across the internet like me taking an F train to school or they are just randomly moving? What are the criteria to pick which is the next stop? How all these million requests around the world happen in just a blink?
Comments