Internet 101 - How data is transmitted?

Internet 101 - How data is transmitted?

Summary of concepts such as routers, HTML, HTTP, TCP, the way request is sent ...

If you read my "Internet 101- IP and DNS" and “What is the internet, how does it work? Who is the owner? " articles, until now, I have explained it as if communication from one device to another is direct. But actually, the road is not straight. Imagine if you are in heavy traffic, you will go straight in 15 minutes barely. If you continue on the road on the right and turn to your destination, you will go to the place you want much earlier. You are more likely to take the second way. Communication on the Internet is actually like this. We said that information is transmitted in bits. This information is also in the packages. When transferring packages, it is also important to go to the destination in the fastest way possible. It tries all possibilities for this ...

Packages have a limit. When sending very large data there will be so many bits that it will be impossible to carry in a packet, perhaps unsafe. Therefore, the data is split into multiple packages. Destination and source IP addresses are specified in each packet. Thus, whether the packets prefer different routes or reach the destination at different times, all packets are combined when they reach the destination and the information emerges.

Routers manage the traffic. They direct the packages to the appropriate directions depending on the congestion of the traffic. Each router controls multiple paths. It directs the incoming data to whichever path it controls that the data will go easily.

Having different path options makes it “fault-tolerant”. This provides us with the "reliability" principle.

0_V7GgEmhmBAyKVskb.png

How do we know if the data is fully transmitted? To achieve this, we should know a new protocol: TCP (Transmission Control Protocol). TCP manages the sending and receiving of all data in packets. When it ensures receipt for each packet sent, it sends a message to the source that the information came from. When all the packages arrive, they confirm that they have received them and the task is completed. If all packages do not arrive, it does not confirm and the target sends the packets again. If TCP confirms, the transaction is complete, otherwise, packets are sent over and over again.

The best thing about TCP and router systems is that they are “scalable”.

Routers work with 3 devices and 3 million devices. The more routers we add, the internet becomes more "reliable", due to the "fault tolerance" and "redundancy" principles. With the keywords of Connect, Communication, and Collaborate, devices connect within protocols, communicate with each other, and work together.

Let's think we're going to visit a website. First, an application is needed to access the web page: Browsers. Chrome, Firefox... You entered one and enter the URL (Uniform Resource Locator) of the website you want. For example google.com. Here you see a new protocol used between the destination and source: HTTP (HyperText Transfer Protocol). We can think of it as a language used by one device to request documents from another.

Looking at the requests between the server and the computer communicating on the Internet, the majority are "GET requests". It has a simple structure like "GET requested-document-name". For example, we request "Get/login" to the site where we want to open the login page.

We basically tell by HTML (HyperText Markup Language) how the content on a website will look. We set basic aspects such as letters bold or italic right or left with HTML. While the text of a web page is located directly in HTML, images, and videos come from another URL. The browser sends separate HTTP requests for each of them to open images and videos. It shows when a positive answer is received.

The more images or videos on a web page, the more HTTP requests there will be. This will cause the page to load slowly.

While browsing the internet, we do not just display. Sometimes we fill out forms, sometimes we search. For such requests, POST requests over HTTP are used. For example, when searching for cat video, the "POST/search HTTP/1.1 Query = Cat + Video" request goes away. If the result is positive, it is shown on our screen. To continue with the example of the login page, when the user name and password information are entered on the login page and the OK is said, the POST request goes to the server with the user name and password. If the server verifies this information, a user-specific page opens. After the connection, the server sends cookie data to the web page. This data is necessary for the website to remember who you are. The web page stores this data, and you remain logged in when you refresh the page. If this data was not stored, we would have to log in every time we refreshed the page. Cookie data is a kind of identity card for a web page.

Internet is public, links are shared, information is sent in plain text. This brings with it dangers. These dangers are snooping and tampering processes to capture your information. To avoid these dangers, reliable websites provide communication on the secure channel using SSL (Security Sockets Layer) and TLS (Transport Layer Security). Because we don't want your communications to be spied or altered without your permission, we can think of SSL and TLS as layers that prevent them. There is a simple method to find out that these exist. When we type the URL into the browser, if we see a lock icon, it means it is protected by these layers. Besides, we see that HTTPS is written at the beginning of the URL. HTTPS (HyperText Transfer Protocol Secure) is the protocol that ensures that HTTP requests are secure and protected. The website provides a "Digital certificate" to the browser to establish a trusted connection. This certificate is like an official identification card proving it is the website it claims. These certificates are issued by the certificate authorities. If a website does not have a certificate and tries to connect to a trusted connection, the browser will warn you. You do not want someone without a certificate in your trusted port, you will never know who they are :)


If we summarize the Internet 101 series (you can access all links below), what we have learned so far is basically as follows:

  • HTTP & DNS -> Provides transmission
  • TCP / IP & Routing -> Control packets
  • Cables, networks & Wifi -> Provides physical space for all these operations If everything comes together, the internet will exist….

In this article, I tried to explain how information is transmitted on the internet. You can access the entire Internet 101 series from the links below:


Resources: