Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a wiki or book, which explains what happens when user enters a link in the browser, and how the dns is resolved, how the router finds the route to the host etc.. I am mainly interested in routing the packets.

Thank you

share|improve this question

migrated from May 28 '10 at 3:39

This question came from our site for professional and enthusiast programmers.

There are about 10 gazillion such articles plus about 2 billion books. Try gooling for "routing tutorial" and "network tutorial". – John Gardeniers May 28 '10 at 5:13

It's definitely a broad topic. The book I am most familiar with is TCP/IP Illustrated, Vol. 1: The Protocols. In addition, here are a couple links on how routers work.

share|improve this answer

This is a somewhat detailed overview of the process. I am eliding some specifics on the routing. The actual routing decision isn't that interesting, it "just" boils down to finding the most specific route ( is a more specific netmask than In routing terms, the interesting bit is how routing information is propagatated through the network(s)).

  1. User enters in browser.
  2. The browser uses either its own resolver lib or libresolv
  3. The resolver library queries the host-defined name-server(s)
  4. The name-server either knows the answer, looks it up on behalf of the host or says "ask the root name server".
    1. The name servers may recure up to the root servers and ask for the name servers that serve the com. domain
    2. then ask who servers the domain
    3. then ask for the IP address of
  5. The browser initates a TCP connection (sends a TCP SYN) to the IP address of
  6. The host looks in its routing table for the next hop for that IP address, then sends an IP frame, with the TCP SYN embedded, with its own IP as the source and the address of as the destination. This is embedded in an ethernet frame with the source MAC of the outbound interface of the host and a destination MAC of the next-hop gateway.
  7. The default gateway receives the frame, increments TTL, re-computes the checksum and sends it on to the next hop.
  8. This process continues until the IP packet reaches the router closest to
  9. At that point, the router sees that it is destined for a local network. It consults its ARP table to see if it has an IP-to-MAC mapping for the destination.
    1. If not, it sends an ARP request, to resolve the MAC address for the IP address.
  10. The host receives the TCP SYN, sends a TCP SYNACK as response.
  11. The network traversal happens as above, only "in reverse".
  12. The user host respons with a TCP ACK.
  13. When the TCP ACK arrives at, the host OS notifies the web server that 14. there is a waiting connection.
  14. The user host sends a HTTP GET request
  15. The server host passes the HTTP GET to the web server process.
  16. The web server process responds with one or more packets with the web page.
  17. The user host passes this traffic to the browser.
  18. The browser parses the HTML and displays the page to the user (there may be more requests initiated, if there are CSS documents referenced, images referenced or other linked documents that may be needed for a complete render)
share|improve this answer

Your Answer


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.