How TCP/IP works, step-by-step

1

1

In early days, I "googled" looking for a detailed guide/manual on How TCP/IP works; specially data flow; By example, What happens when I type "http://superuser.com" in web browser and it's receive superuser.com's home page?.

The searches results I founded doesn't work for me; because not completely answer my question.

I found these web pages interesting:

Also, I found the excellent EventHelix diagrams:

Following the examples above, I think TCP/IP works as follow:

  1. Web Browser take the URL (http://superuser.com), prepare HTTP message properly (maybe a GET request). Web browser needs to know superuser.com's IP address, so query DNS via UDP to translate superuser.com to IP address. If DNS cache found superuser.com's IP address then send response, otherwise look for an authoritative translate. Last, Browser delivery this message plus destination IP address to TCP layer.
  2. TCP receive message, decide if fragment is necessary, prepare TCP headers and dispatch segments to IP layer.
  3. IP receive segments, verify if destination IP address is lookup network, local network or remote network, query routing table to obtain gateway IP address, use ARP to find MAC address of gateway IP address, fragment segments if necessary, prepare IP headers and dispatch packets to Data-Link Layer.
  4. And so on...

The above is far away to being complete and correct.

Where I can find further and complete information about How TCP/IP data flow works? Any help will be greatly appreciated.

rjlara

Posted 2011-08-25T21:07:10.920

Reputation: 21

Question was closed 2011-08-25T21:32:19.097

2

If you want to see exactly what is going on, get wireshark and watch. Also take a look at the RFCs, they describe everything in excruciating detail.

– Zoredache – 2011-08-25T21:12:38.500

@slhck, random: It's very easy to say: "ambigous, vague, incomplete, overly broad or rhetorical". Explains why this post is so? – rjlara – 2011-08-26T00:33:40.627

Probably because you basically asked 'how does the internet work'. This isn't a general topic board. Maybe if you rephrased the first part to 'how does a TCP/IP connection get setup and closed' might be good. But there are literally dozens of technologies required to make the browser loading 'http://superuser.com' work.

– polynomial – 2011-08-26T00:37:09.183

@Polynomial: Thank you very much for your response. Your answer clarify me about my wrong question. I'll be more specific when I re-post my question. Thanks again. – rjlara – 2011-08-26T00:51:44.607

Several excellent podcasts on this page for how the internet works, episode 25 and 26...http://www.grc.com/securitynow.htm

– Moab – 2011-08-26T01:51:09.130

Answers

3

The book "TCP/IP Illustrated, Vol. 1: The Protocols" and other books in that series are considered by most people to be the best reference on the topic.

Shane Wealti

Posted 2011-08-25T21:07:10.920

Reputation: 307