How Internet Connection Works: Internet Protocols
Have you ever wondered how we connect to the internet? When you send an email to your friend or teacher from your email application, how does that information reach them? In this article, we will discuss the workings of the Internet and Internet protocols.
IP (Internet Protocol)
The internet is a network of networks that are interconnected in a way that allows them to communicate with each other. The way this communication happens is through the Internet Protocol (IP). IP determines how data is transmitted from point A to point B, and it is a kind of inter-networking language. It is connectionless and unreliable, which we will discuss in more detail later in the article.
What is an IP address?
An IP address is the unique identifier of a device connected to an internet network. For example, just as our homes have unique addresses that are used to deliver packages, computers have IP addresses that allow data packets to be sent to the correct destination. An IP address is represented by four sets of eight-bit numbers in decimal form. For example, an IP address could be 22.214.171.124.
However, there is a problem with this system. IP addresses were designed to be 32-bit unique addresses for each computer, which means there are only around 4 billion possible addresses. Unfortunately, this is not enough to accommodate the growing number of internet users, which is currently around 7 billion people. While some solutions have been proposed to address this issue, they are only temporary fixes. In the future, we will use 128-bit addresses that consist of eight sets of 16-byte numbers instead of 32-bit addresses. This new system is called IPv6, while the old system is called IPv4.
An example of an IPv6 address is 2001:4860:4860:0:0:0:0:8844 or 2001:4860:4860::8844
DHCP (Dynamic Host Configuration Protocol)
We mentioned that each computer has a unique IP address, but how are these addresses obtained? Who or what assigns them to your computer? The DHCP (Dynamic Host Configuration Protocol) server, which is located somewhere between our computer and the internet, is responsible for this task. If you paid attention to the IP addresses and the locations of devices with those addresses, you can guess the relationship between them.
TCP (Transmission Control Protocol)
We previously mentioned that the Internet Protocol is the protocol that enables transmission between sender and receiver machines. The Transmission Control Protocol (TCP) is the communication control protocol that ensures that the transmitted data packet is delivered to the correct service on the receiving device. Unlike IP, TCP provides a guarantee of correct transmission. Both the packet and the destination address need to be known correctly, which is why you may often see the terms TCP and IP used together.
UDP (User Datagram Protocol)
Like TCP, UDP is also defined in the transport layer. The difference with UDP is that it allows the transfer of small, query, and test-oriented data. Since the data is small in size, there is no need to fragment it. The UDP protocol does not have a mechanism to control whether the data has been delivered.
When we combine the IP address of a machine with the port number belonging to the software defined on that machine, we obtain a unique value composed of the IP address and port number. Some of these port numbers are commonly used and have become standardized. These standardized protocols at the application layer are as follows:
HTTP (Hypertext Transfer Protocol) - used for the transfer of web pages (port: 80)
HTTPS (Hypertext Transfer Protocol Secure) - used for secure transfer of web pages (port: 443)
FTP (File Transfer Protocol) - used for file transfer (port: 21) SSH (Secure Shell) - used for remote access (port: 22)
SMTP (Simple Mail Transfer Protocol) - used for email delivery (port: 25)
POP3 (Post Office Protocol 3) - used for email retrieval (port: 110)
IMAP (Internet Message Access Protocol) - used for email retrieval (port: 143)
DNS (Domain Name System) - used for resolution of domain names to IP addresses (port: 53)
As you may have noticed, I mentioned some layers throughout the text, and these layers and the protocols they contain can be visualized under 4 main headings, along with their relationships, as shown in the diagram below.