Basics of networking
6. Communication Process
Let's now look at the communication process using the TCP/IP model. As mentioned earlier, this model describes a set of operational protocols that form what is called a protocol, sometimes referred to as a protocol stack. Where did the name come from? When we want to display a web page, first the application layer uses the HTTP protocol, then at the transport layer we use a protocol from this layer, such as TCP or UDP, and then at the Internet layer an IP protocol. Communication is based on a set of protocols, one on top of the other. Correctness can only be guaranteed if the entire protocol stack is used for communication.
First,
the network user creates data at the application layer, this may be a query to
a web server or they may be writing messages in a messenger. The data is then
sent down the stack, first to the transport layer, where it is split into
smaller pieces,
and then to the Internet layer, where they are given an address that allows the
data to be sent over the WAN. They then go to the network access layer and are
again assigned addresses, this time to the addresses of devices on the local
network. Finally, the data is inserted into the transmission medium and sent
via an intermediary to the end device, where it passes through the stack,
reassembles and is passed to the application layer.
Remember
The process of transferring data from source to destination carries the data flowing through the layers on the source device, which is then encoded and transmitted over the transmission medium to the destination device, where the data goes onto the stack instead. In order to ensure that the data reaches the right hosts and applications and remains as unchanged as possible by communicating the right information to them, the control information is used.
This information is added in three layers. The transport layer adds the application port numbers (the application port on the source host and the application port on the destination host), the internet or network layer, the IP address (including source and destination host), the network or data link layer, the MAC address (source host) and the local network router). The whole process of going through the layers in the stack, dividing them into smaller parts and adding control information (i.e. additional data) is called encapsulation. Of course, there is a reverse process of removing this additional information from the target device, called decapsulation.
Remember
Data flows through layers on the source device, surrounding it with information to identify the application and the target device, while the reverse process, where data flows up layers and removes this additional information on the target host, is decapsulation.
Adding this control information to each layer individually would slightly change the structure of the layers, which is logical because we are adding some information to the data that was not there before. Therefore, the naming of the data sets also changes. Normally, the data sent over the network is called protocol data units (PDUs), but as we move between layers their names change, so: at the application layer, we simply refer to PDUs as data. Later at the transport layer, we will refer to PDUs as segments or datagrams depending on the protocol used at that layer. A PDU at the Internet layer is already a packet, and at the network access layer we will have a frame. We will use the same nomenclature when analysing communication using the ISO/OSI model.