alex / what-happens-when

An attempt to answer the age old interview question "What happens when you type google.com into your browser and press enter?"
39.78k stars 5.53k forks source link

TCP/IP layers #882

Open Frankenstei opened 1 year ago

Frankenstei commented 1 year ago

It is expedient that we attempt to explain what happens when we type google.com and click enter in terms of the TCIP/IP model.

The five layers in this model includes

  1. Application layer
  2. Transport layer
  3. Internet layer
  4. Data link layer
  5. Physical layer

When the user types google.com into their Web browser and presses enter, the user has just begun their communication at the application layer of the TCP/IP model

  1. The application layer is where the HTTP and DNS request are processed, the session is also created in this layer
  2. The transport layer ensures end to end connectivity between the user's end device and the server. Protocols like UDP (user datagram protocol) and HTTP operate at this level.
  3. Internet layer is where the ARP requests and responses takes place, where the communication between the MAC addresses and the IP address of the devices along the path between the user's end device and the server takes place.
  4. The data link and physical layer help deliver the request to the physical hardware the actual Google server is located.
Mado007 commented 11 months ago

Explanation of the TCP/IP Model Layers in Web Browsing Process

In this explanation, we will walk through the process of typing "google.com" into a web browser and pressing enter, using the TCP/IP model's five layers as a framework.

1. Application Layer:

2. Transport Layer:

3. Internet Layer:

4. Data Link Layer:

5. Physical Layer:

This breakdown demonstrates how the TCP/IP model helps in understanding the step-by-step process of initiating a web request, from the user's input to the delivery of data to the Google server and back.