How the Internet works? TCP/IP

nazarhapak

Nazar Hapak

Posted on June 7, 2024

How the Internet works? TCP/IP

Understanding how the Internet works is a fundamental step for anyone diving into the world of web development. Whether you're a beginner starting out or an experienced developer refreshing your knowledge, knowing the basics of the Internet provides a strong foundation to build upon.

In this article, we'll explore the core concepts of how the Internet operates, from the role of servers and clients to the intricacies of protocols and data transmission.

What is the Internet? 🌐

The Internet is a large network of computers that communicate with each other. The whole idea of the Internet is to ensure that computers stay connected, regardless of any disruption. This idea was implemented using decentralized network. If one part of the network fails, data can be rerouted through other paths.

Network is two or more computers connected either physically or wirelessly. The Internet consists of numerous smaller networks connected together. These networks communicate through a variety of protocols and hardware.

Note, that computers that are connected to network are called host. This term you can often see in tutorials and other posts. Network hosts that share or receive information are classified as server or client.

The internet provides a wide range of services that facilitate communication, information access, commerce, entertainment, and more. For example: Email, World Wide Web(WWW), File Transfer.

Note, that WWW is not the Internet. World Wide Web (WWW) is a system of interconnected public webpages accessible through the Internet.

Infrastructure of the Internet 📡

How exactly computer from your home and any other computer can reach computers from all over the world? Here are some of components that make this possible:

  • Routers and switches are intermediary devices that manage the flow of data between and inside the networks. They ensure data packets find the most efficient path from the source to the destination.
  • Modem is a computer hardware that transforms data from digital format to a format suitable for wireless transmission.
  • Inernet Service Provider (ISP) is a company that manages high-performance routers that are linked together and can also access other ISP's routers.
  • Submarine cables are fiber optic cables laid on the ocean floor to connect continents, enabling high-speed internet communication between regions.

Note, that fiber optic cables are used to transfer data over long distances, as they have much lower attenuation compared to copper cables. If you want to dive deeper in how the submarine cables transfer data between continents, I recommend to watch this short video.

Infractructure of network in the Internet

Interesting fact: The data that is transferred through the Internet moves with speed that is close to speed of light, that is why you can download your videos so fast.

Data transfering through the Internet 🗃️

TCP/IP - suite of protocols that defines how information moves from sender to receiver. It is commonly used in the Internet. The key component of TCP/IP is IP adress (unique numerical adress assigned to every device on the Internet).

TCP/IP can be understood in terms of layers:

  1. Application Layer - defines how application uses the network (for example HTTP for communication between browser and web-server)
  2. Transport Layer - creates and contains conversations between application processes on host (Can be either TCP or UDP)
  3. Network Layer - data is being broken into packages in order to be delivered fast (uses IP headers so data from one host can find it's way to another host)
  4. Data Link Layer - delivery of traffic on a single portion of computer network
  5. Physical Layer (transmitting data through physical network connection)

Packages or packets, are small units of data transmitted over a network. When large amounts of data need to be sent, they are broken down into smaller packets for efficient transmission.

Example of communication between web browser and web server on the Internet using TCP/IP:

  1. Client prepares HTTP request. (HTTP is the underlying protocol used for communication on the World Wide Web)
  2. TCP Header is added to the HTTP request, forming a segment.
  3. Segment is broken into packages. IP Header(mostly IP adresses of client and server) is added to each of packets. (When the packets arrive, host strips off IP Headers and reassembles the packets into original data).
  4. Ethernet Header (Mostly MAC-adresses of computers in subnetwork) and Ethernet trailer are added to every packet. This creates Ethernet frame
  5. Data is transmitted through physical connections.

Typical TCP/IP packet structure

Summary 📝

Internet is a complex network of interconnected computers that communicate through TCP/IP protocol.

Thank you for reading, leave a comment if you want and never stop learning!💖

💖 💪 🙅 🚩
nazarhapak
Nazar Hapak

Posted on June 7, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

How the Internet works? TCP/IP
webdev How the Internet works? TCP/IP

June 7, 2024