The physical layer is at the bottom of this model. It deals with crude data that is in the form of electrical signals. The data bits are sent as 0s and 1s. 0s correspond to low voltage signals and 1s correspond to high voltage signals. The mechanical aspects of communication, such as wires or connectors come under this layer. The physical layer also deals with how these wires, connectors, and voltage electrical signals work. Also, the process that is required for these physical aspects are taken into account in this layer itself.
2)The Data Link Layer:
The transmission of the data over the communication medium is the responsibility of this layer. The 0s and 1s that are used in the communication are grouped into logical encapsulation. This encapsulation is called frames. The data is transported in frames. The responsibility of these frames is that of the data link layer.
3) Network Layer:
All over the world, there are many different types of Ethernet. These networks are connected to each other through various media. When a data packet wants to reach a particular destination, it has to traverse through these networks. Essentially, there are a lot of operations that are taking place between the connected networks. Also, the packet data which is traversing has to choose an optimum route, and the addressing of these packets has to be proper. The various operations between the networks, packet data issues, addressing and routing, are handled by this network layer.
The transport layer ensures quality and reliability of the communication. The data packet switching is entirely handled by the transport layer. There are basically two types of packet switching. They are connectionless packet switching and connection oriented packet switching. In connectionless packet switching, the packet data is allowed to choose the route in which it is going to reach the destination. Obviously, the packet in itself can't do this. Physical devices like routers are mainly responsible for the behavior of packets, but the packets formed from the same datum can reach their destination in different ways. Whereas, in connection oriented packet switching, once the route is decided, then all the packets have to follow the same route. An example of connectionless packet switching is text messages in mobile phones, and the example of connection oriented switching is a direct voice call.
5)The Sessions Layer:
The session’s layer is mainly responsible for creating, maintaining and destroying the communication link. PDU (Protocol Data Unit), in which various protocols are defined that have to be followed during communication, are the responsibility of the sessions layer. The applications that use RPCs (remote procedure calls) are taken care of by the sessions layer.
There are various techniques of data compression which are used to send and receive the optimized data. For example, if certain data is repeating itself a number of times, then it is logical to send the data only once, and specify the number of times it is repeated. This bundling of the repeated data is one of the techniques of compressions. The compression and decompression of the data is handled by the presentation layer. Also, encryption and decryption techniques used to thwart malicious attacks on data are handled by the presentation layer.
This layer comes into picture when there is a process to process communication. Whenever a user invokes any application, all the associated processes are run. Many times, when an application wants to communicate with another application, then there has to be communication between these associated processes. The application layer is responsible for this inter-process communication.