The TCP/IP protocol suit divides the network communications into different layers.
As seen in figure (3.1), the layers are the network interface layer, the internetworking layer, the transport layer, and the application layer.
Figure 3.1: the TCP/IP protocol suit
Every layer of those layers has a determined role in the network communications.
the ‘network interface layer’ may be divided into two other layers, the ‘physical layer’, and the ‘data link layer’.
The TCP/IP protocol suit has another two names, the ‘internet protocol suit,’ and the ‘DoD protocol suit’.
The physical layer translates the data that it receives from the upper layers to a physical entity –an electrical signal or an optical pulse- to be able to transmit it through the communication medium.
The physical layer specifies the network devices electrical and physical specifications. As an example, it defines the electrical and physical specifications of the network port that exists in the ‘network interface card (NIC)’, and defines the electrical and physical specifications for the cable that is connected to this network port.
The data link layer is responsible for the data communications between any two devices inside the same network.
This layer uses the ‘physical address’ of the communicating devices to distinguish between those devices.
Physical address: it is a hard coded address on the ‘Network Interface Card (NIC)’ of any network device.
Figure 3.2: the data link layer is responsible for communicating between two devices inside the same network
This layer may be called the ‘Internet layer’.
The internetworking layer’s role is to route the data between networks using the logical addresses.
Logical address: It is an address assigned to every network and every network device by the network administrator.
Figure 3.3: the internetworking layer is responsible for the communication between networks.
The transport layer’s role is to make error correction, reliable delivery of data, segmentation of the data, and reassembling of the data, and it is responsible for the host-to-host communication.
The application layer provides functions for users or their programs, and it is responsible for the data encryption and decryption, and the data compression and decompression.
Suppose that we have two computers, a source, and a destination. The source computer sends some data to the destination computer.
In the source computer, every layer takes the data that is coming to it from the upper layer. Then, it adds a certain header to this data. Then, it delivers the data to the lower layer.
In the destination computer, every layer receives the data from the lower layer. Then, it removes the layer header. Then, it sends the data to the upper layer.
Every layer header contains important information that is used by this layer.
Figure 3.4: data encapsulation process
As seen in figure (3.4), the data in every layer is given a certain name,
In the transport layer, the data is called a segment.
In the internetworking layer, the data is called a packet.
In the data link layer, the data is called a frame.
The physical layer takes the data from the upper layer and sends it over the physical medium in the form of bits.
The OSI (Open System Interconnection) model divides the network communication into seven layers.
Those layers are the physical layer, the data link layer, the network layer, the transport layer, the session layer, the presentation layer, and the application layer.
Figure (3.5) illustrates the role of every layer of the seven layers.
Figure 3.5: the OSI model