Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

For example in this pic taken from Wikipedia

[Bigger Version]

alt text

  1. What are all these 12 server names that are listed? I know they are servers that are supposed to be the path that the network packet had to travel to reach the destination. But why do I need to go to any server except the server that actually serves the request by providing me the file I requested?

  2. What are the three timing informations that are mentioned for each server name?


Isn't the process supposed to be like this (copied from here)?

The browser communicated with a name server to translate the server name www.howstuffworks.com" into an IP Address, which it uses to connect to the server machine. The browser then formed a connection to the server at that IP address on port 80. (We'll discuss ports later in this article.) Following the HTTP protocol, the browser sent a GET request to the server, asking for the file "http://www.howstuffworks.com/web-server.htm." (Note that cookies may be sent from browser to server with the GET request -- see How Internet Cookies Work for details.) The server then sent the HTML text for the Web page to the browser. (Cookies may also be sent from server to browser in the header for the page.) The browser read the HTML tags and formatted the page onto your screen.

share|improve this question
1  
You can copy and paste text in Linux, no need to use a picture. –  starblue Aug 24 '10 at 20:16
add comment

2 Answers 2

up vote 6 down vote accepted

The 12 lines are the nodes the packet had to go through to get to wikimedia's server. You need to go through 12 nodes because your computer isn't connected directly into wikimedia's server. It is connected to a node at xs4all.net (an ISP, naturally), which is connected to another xs4net node, which is connected to wvfiber.net, which is connected to as30217.net, which is connected to wikimedia.org, so that's the best path the routers could find to get the packet to the destination. If your computer was plugged directly into the target computer there would be only one hop; try tracerouting to another computer on your local network:

> [mrozekma@etudes-2 ~] % traceroute etudes-1
traceroute to etudes-1 (192.168.0.10), 30 hops max, 40 byte packets
 1  etudes-1 (192.168.0.10)  0.196 ms  0.190 ms  0.152 ms

The timing information on the right side of each hop is the round-trip time for the packet. By default three packets are sent per hop, so it shows three timings; if you give traceroute the -q option you can control how many packets are sent:

> [mrozekma@etudes-2 ~] % traceroute -q 1 etudes-1
traceroute to etudes-1 (192.168.0.10), 30 hops max, 40 byte packets
 1  etudes-1 (192.168.0.10)  0.177 ms
share|improve this answer
1  
Those aren't servers. If they actually serve something or not is another issue. In this case they simply act as forwarders. –  nc3b Aug 22 '10 at 20:31
    
@nc3b True; I switched to "node" –  Michael Mrozek Aug 22 '10 at 20:37
add comment

The hosts shown by traceroute are not servers, they're routers. Traceroute shows the hops on the IP route from the computer of the person who took this snapshot to the wikipedia server. The description of HTTP that you quote looks at a much higher level where all this routing is transparent.

I think the best way of explaining this is through a metaphor. HTTP (for example) requires a bidirectional communication channel between the client and the server; this channel is provided by TCP. TCP is built in turn on top of IP. The goal of IP is to transmit packets from one IP address to another. An TCP connection requires IP packets going from the client to the server and IP packets going from the server to the client.

Ok, now think of each IP packet as a letter that you drop in a mail box and that the Post Office carries to its destination. Traceroute shows all the stages on the journey of the letter from your dwelling to the recipient's dwelling: the mail box it's dropped in, the town post office, the district sorting office, the regional mail hub, etc., until the letter reaches the recipient's mail slot. This is basically what you see when you watch the progress of a registered tracked parcel with DHL/UPS/...

In this example, the first two hops are called ….xs4all.net; they're clearly from the snapshot author's ISP. The next few lines are from WV Fiber, which operates international transit lines. I don't know who as30217.net is; probably an ISP for datacenters. The final two machines are from Wikipedia.

IP routing is completely transparent to higher-level protocols such as TCP and a fortiori all protocols built over TCP. In fact, traceroute has to play some tricks to obtain the information at all.

share|improve this answer
    
How/by whom is the path of the packet decided? –  Lazer Aug 22 '10 at 20:57
    
Each router has a list of neighbors from which a routing algorithm will decide which is the "lowest cost" path if multiple paths are available. –  txwikinger Aug 22 '10 at 21:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.