How does the internet work?
What does the internet mean for you? Wikipedia, Whatsapp, Google, Youtube, Pokemon Go, Stackoverflow, Tinder, Uber, or something else?
The internet has become a necessity of our daily life, but how does the internet, as a system works that consists of signals and cables, internet protocols, routing, TCP and UDP, DNS and web servers, IPv4 and IPv6, firewalls, applications and lot more.
Before the 1970s, computers were standalone in computing centers, and soon the Internet's predecessor, the ARPANET, was created. Initially, it consisted of only a few machines, so-called Internet nodes.
In the 1970s, the International Organization for Standardization (ISO) was working on standardizing the Open Systems Interconnect model (OSI model) that should theoretically model a layered architecture for different relevant functionalities when connecting Computers.
The ISO/ OSI model is an excellent reference for designing distributed systems where multiple computers connect to do some cooperative task, such as retrieving a website and transferring it from one host computer to another client computer. However, a more straightforward protocol stack emerged with time: the TCP/ IP stack. We will learn about the hybrid of both that best reflects today’s Internet architecture.
Computer networks are a fascinating piece of software architecture! They proved to scale well and to be extensible very well. Even though the core mechanisms were developed in the 1970s, with few modifications, they still form the core of today’s Internet.
The applications evolved as in the 1970s, nobody had Facebook, and This makes the design even more interesting as it is future-proof.
The layered model of the internet:
The positioning of the layers and the colors are the main difference between the three models in their level of detail.
Each layer has different functionality, and the so-called Medium is the physical connection between machines below the layers. In the image, a copper wire is a medium, but air for sound transmissions or electro-magnetical waves can also be used, as you know them from wireless LAN, for instance.
The light blue Network Access Layer provides all functionality to transfer the smallest information unit, a Bit, between two connected hosts. This layer is split into two parts in the vLab and the ISO/ OSI model. The white part, Physical Layer, provides functionality to encode Bits into signals, such as a signal as a physical phenomenon the sender creates and the receiver can detect.
The dark blue Data Link Layer provides functionality to manage the connection between the two communicating nodes. It covers functionality such as addressing or checking the integrity of data. such as many receivers being connected to your wire. Each of them could have a letter of the morse code alphabet as an address. When a receiver sees that the first sent character matches its assigned address (e.g., S = *), it knows the following data is for it. Data integrity means that the receiver can fully retrieve the data generated by the sender. There are different methods to ensure this, such as sending additional data in case some got lost or introducing acknowledgments for data and retransmitting in case of a loss.
The green layer is the Internet or Network Layer. The core functionality is enabling connections over multiple hosts. This layer enables complex connections over multiple friends and, in reality, over the entire Internet, and we need addresses again. The Internet Protocol (IP) addresses allow you can address over more than one layer two direct connection, and such a direct link is also called a hop. When I send something to your friend, and she sees that it was for you, as the address says, she can recreate the original signal on the link between you two, and it works if the intermediate chain is longer.
The next yellow layer, the Transport Layer, addresses applications. The Transport Layer address, the so-called Port, helps you with that. There are always different implementations of the functionality on each layer, the so-called Protocols. On layer 4, one protocol, the Transmission Control Protocol (TCP), allows your client to send as much data as wanted, and it takes care of chopping it into packets that can be transmitted over the wire. The chopping of data streams into discrete packets is required as the Internet typically has a shared use of the medium, the wire, in this case. The layer 4 instances on the sender would then chop the stream into packets and hand them over to the lower layer again and again. Then the signals are sent over, the layers reconstruct the data, and layer 4 on the receiver side assembles the stream from the packets again.
The Application Layer is the top layer in the TCP/ IP and the vLab model, and it contains the applications such as the web server and your web browser. In the case of the ISO/ OSI model, this layer can also be divided into different functions and as we want to focus on the networking part in this course, this differentiation is not necessary, and it is also tricky as it is application specific.
In the series of blogs, we will go through the model's layers from bottom to top.