In today's world, almost everything is transmitted via the internet. People of all ages—from 2-3-year-old children to our 70-year-old grandparents—are using the internet. Therefore, it's important to understand why the internet is so essential today, how data is transferred between countries in seconds, how emails are sent, and whether there's a wired connection between our computers and the receiver's computer. These questions often arise.
The answer to all these questions lies in computer networking. Now, the question is: What is computer networking, and how did it help in developing the internet?
Computer networking is a sub-branch of computer science where our computers connect to other devices, including not just other computers but also routers, mobile phones, printers, etc.
To enable computer networking, it is necessary to follow certain protocols. Protocols are simply conventions or rules. We frequently encounter this term in the news when describing meetings between leaders of two nations, as in "protocols were followed." Similarly, in today's world of online classes, due to COVID-19, you might hear the phrase, "Is my screen visible?" followed by "Yes, it is," which is also a kind of protocol. Just as we follow protocols when writing a letter, we follow protocols in networking as well.
Each computer is called a node. Let’s assume we have several computers named A, B, C, D, etc. Now, we need to transfer some data or a file from computer A to computer D, but computer A is not directly connected to computer D. So, how do we proceed? The first idea that might come to mind is to connect the computers using wires and then transfer the data. However, this is only practical for small areas. In larger areas, numerous wiring connections would make it difficult to remember which wire connects to which.
This is why the store-and-forward concept is used in computer networks. First, a path is chosen, for example, A-F-G-D. The file is first transferred to computer F, which stores it on its hard disk. This storage is necessary because F might already be busy transferring other files, or it might have a queue of messages. After storing, F transfers the file to G, and then G transfers it to D. Eventually, the file reaches its destination, node D.
Now, how does the next computer verify whether the file was received correctly? And what does the computer do if it detects an error? There are several methods for error-checking, but the most efficient is using a Cyclic Redundancy Check (CRC). The CRC for the entire file is computed and appended to the data. At the destination, the CRC is recomputed on the received data and compared with the original to ensure they match. Positive/negative acknowledgment methods are also used for this purpose. All these techniques fall under error control. If an error is detected, the entire file is retransmitted.
For large files, the probability of errors increases, so large files are divided into smaller chunks or blocks, called packets, which are transmitted individually. This minimizes errors, as smaller packets are less likely to be corrupted.
Each packet has a header containing the source address, destination address, packet number, and CRC. Using this information, the packet is routed to the next computer in the network.
A common question is, how is the path chosen? There are two approaches: the virtual circuit approach and the datagram approach. In the virtual circuit approach, the path is determined at the start of the transmission, at the source node. In the datagram approach, the path is chosen dynamically, meaning the packet is sent to the next node on the route that is most efficient at that moment. With virtual circuits, packets arrive at the destination in the same order they were sent, and there’s no need to carry source and destination addresses—just a Virtual Circuit Number (VCN). A routing table is used to record the VCN and the next node.
In the datagram approach, the packet carries both source and destination addresses, and each node finds the next step using a routing algorithm.
To understand the details of network protocols, it's essential to learn about the Open Systems Interconnection (OSI) model. We will cover the OSI model in the next article.
Thank you!