If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

The Internet protocol suite

AP.CSP:
CSN‑1 (EU)
,
CSN‑1.B (LO)
,
CSN‑1.B.1 (EK)
,
CSN‑1.C (LO)
,
CSN‑1.C.4 (EK)
As we've seen over the course of this unit, there are many protocols that power the Internet. Each protocol operates at a different layer, building functionality on top of the layer below it.
The layers of Internet protocols are often visualized in a diagram like this:
A diagram of the Internet protocols suite with four layers. From top to bottom:
  • Application layer: includes boxes for HTTP, DNS, and TLS.
  • Transport layer: includes boxes for TCP & UDP.
  • Network layer: includes a single box for IP (v4 and v6).
  • Link layer: includes boxes for Ethernet & Wireless LAN.
That diagram is by no means complete. There are many more protocols in the Internet protocol suite—especially at the application layer—such as SMTP for sending email and FTP for uploading files.
Let's review protocols at each layer and their contributions to the Internet.

Layer by layer

At the bottom layer, two computing devices need a physical mechanism to send digital data to each other. They send electromagnetic signals either over a wired or wireless connection and interpret the signal as bits. The type of physical connection affects the bit rate and bandwidth.
An illustration of two computers connected to each other with a wire. The wire shows alternating electrical signals (high and low) corresponding to labeled binary digits (1 and 0).
Once a network is bigger than two computers, we need addressing protocols to uniquely identify who is sending data and who should receive the data. Every node on the Internet is identified with an IP address.
An illustration of three laptop computers, each labeled with an IP address.
The route between any two computers on the Internet isn't just a straight path from A to B. The data must pass from router to router until it finally reaches its destination, a strategy that comes from the Internet routing protocol.
An illustration of the Internet routing protocol. Two computers are on either side of the illustration and a network of eight routers are between them. Green arrows trace a path from the left computer, through 5 routers, to the right computer.
Data needs to be broken up into small packets, which are then reassembled at the destination. The Transmission Control Protocol (TCP) is used to ensure reliable transport of those packets, with sequencing, acknowledgement, and retries. A faster but less reliable transport protocol is the User Datagram Protocol (UDP).
An illustration of the Transmission Control Protocol. Two computers are shown with arrows going back and forth. The arrow going from left to right is overlaid with binary data labeled as "Sequence #1" and the arrow going from right to left is overlaid with a thumbs up.
There are many uses for the data flowing around the Internet, such as sending emails, uploading files, or chatting online. The most common use of the Internet is the World Wide Web, with its millions of publicly viewable websites, all made possible due to the HyperText Transfer Protocol (HTTP). We can visit a website by typing a domain name in the browser address bar, since the browser knows how to turn the domain into an IP address using the Domain Name System (DNS).
An illustration of the HyperText Transfer Protocol. A laptop computer is shown on the right with a web browser that's visiting the URL "http://www.example.com/index.html". A server is shown on the left, labeled with the domain name "www.example.com". An arrow goes from right to left, overlaid with "HTTP/1.1 200 OK".
When the data contains private information, it needs to be transported securely from the sender to the destination. The Transport Layer Security (TLS) protocol uses algorithms to encrypt the data, while certificate authorities help users trust the encryption.
An illustration of the certificate chain of trust. Starts with an icon labeled "user" on the left. There's an arrow labeled "trusts" from user icon to an icon of a smartphone labeled "client" . Another arrow labeled "trusts" flows from client icon to an icon of a computer labeled "certificate authority". A final arrow flows from certificate authority icon to an icon of a computer labeled "server".

A protocol stack

When a message is sent through the Internet, it doesn't use every protocol in the suite. It does use at least one protocol from every layer, however.
When you're loading a webpage from a domain your browser has never visited before, your browser may need to make a DNS request. This stack of protocols is used when a DNS request is sent through the Internet:
A diagram of the Internet protocols suite with four layers. From top to bottom:
  • Application layer: includes a box for DNS.
  • Transport layer: includes a box for UDP.
  • Network layer: includes a single box for IP (v4).
  • Link layer: includes boxes for Ethernet & Wireless LAN.
Then your browser will make an HTTP request to fetch the webpage. This protocol stack is used when an HTTP request is sent through the Internet:
A diagram of the Internet protocols suite with four layers. From top to bottom:
  • Application layer: includes a box for HTTP.
  • Transport layer: include a box for TCP.
  • Network layer: includes a single box for IP (v4).
  • Link layer: includes boxes for Ethernet & Wireless LAN.
If the webpage is served over HTTPS, then the stack includes multiple protocols at the application layer (both HTTP and TLS):
A diagram of the Internet protocols suite with four layers. From top to bottom:
  • Application layer: includes boxes for HTTP and TLS.
  • Transport layer: includes a box for TCP.
  • Network layer: includes a single box for IP (v4).
  • Link layer: includes boxes for Ethernet & Wireless LAN.

🙋🏽🙋🏻‍♀️🙋🏿‍♂️Do you have any questions about this topic? We'd love to answer—just ask in the questions area below!

Want to join the conversation?

  • starky tree style avatar for user EineName
    Wow, with all of the layers the machines have to use to communicate, I'm just impressed that the internet works at all! (or that it was invented :)).
    (19 votes)
    Default Khan Academy avatar avatar for user
  • starky sapling style avatar for user John Schur
    I may have missed it but I'm not sure how the most efficient server/host route is initially established. Is that done by a general broadcast out through the entire network and then progressively improves the routing efficiency by timing measurements?
    (0 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user Abhishek Shah
      Packets may not travel via the most efficient/optimal path. A protocol called Border Gateway Protocol (BGP), however, uses a local broadcast to communicate with nearby nodes and generally forms the basis of how a path is established.

      Since nodes can go online/offline (e.g. Internet outage), the protocol supports changing network graphs. So at any given time, the path constructed by the protocol may not be "optimal".

      Additionally, the idea of "most efficient" depends on the method of comparison. One metric behind the "best" path is timing, but others might be based on shortest physical distance or avoiding inter-ocean/satellite network links.

      Hope this helps!
      (5 votes)
  • duskpin ultimate style avatar for user Gracie Wang
    What's the rule of IPv6 addresses?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Shreyas Taware
    So when an https request is made, does that mean that along with the http & tls protocol, the dns protocol is also called to convert the website name into the IP address?
    (0 votes)
    Default Khan Academy avatar avatar for user
    • sneak peak green style avatar for user ARaveMistake
      1. You enter a domain (ex. google.com)
      2. Your browser and PC fetches IP address of said domain
      3. Your browser makes a HTTP request to the server that owns target IP adress asking for a webpage to download
      4. Target server sends back HTTP response containing the website contents (if it has been found successfully)
      5. Your browser loads the web page contents

      If the site supports HTTPS then TLS also comes in play, sending encrypted information between you and target server, said information is then decrypted and read by the receiver. No one can intercept the package that way.
      (1 vote)
  • male robot donald style avatar for user Sebastian Jones
    So which protocol doesn't power the internet?
    (0 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user grantjci7650
    Can the Internet Protocol Suite be used to build other websites?
    (0 votes)
    Default Khan Academy avatar avatar for user
  • hopper happy style avatar for user TimeStop@ɛ
    The text says, "The data must pass from router to router..." I'm assuming this doesn't mean like my router. I googled, and one site says that the packets travel through many different Internet Service Providers. However, there are a lot of contradictions and nonspecific answers. So does anyone know the exact name of the computer that receives and keeps sending packets?
    (0 votes)
    Default Khan Academy avatar avatar for user
  • stelly blue style avatar for user aniketprasad123
    why DNS request require UDP transport protocol
    (0 votes)
    Default Khan Academy avatar avatar for user
    • aqualine ultimate style avatar for user Akshhat Srivastava
      The priority for a DNS request is time (users give up if a website doesn't load quickly) so it prefers using UDP over TCP since the latter first establishes a secure connection using a 3-way handshake. Although UDP is an unreliable protocol, it can be made reliable by implementing some features at the application layer such as timer countdown.
      (2 votes)
  • stelly blue style avatar for user Sabrina
    So what is the link layers like ethernet and wireless lan used for?
    (0 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user ankitrajput5618
    can you give an example for above topic?
    (0 votes)
    Default Khan Academy avatar avatar for user