For standardizing networking of devices from different vendors the Open Systems Interconnection (OSI) reference model was defined by International Organization for Standardization (ISO) .Till this day the OSI model has not been implemented exactly as it is defined, but we can say that OSI reference model is mostly an architecture blueprint that networking and computer device manufacturers implement. The practical implementation that networking device manufacturers use is the TCP/IP protocol stack. The TCP/IP protocol stack is the closest implementation available today.
Layers Of OSI model:
OSI reference model is divided in seven functional layers. In these seven layers each layerhas it’s own function, and each layer works independently of all the layers(upper and lower layers).
The data flow from bottom to top in OSI layers, the internal functionality of each layer is not transparent to other layers.
At sending host data is encapsulated and sent to the upper layers(from layer 7 to layer 1 ) for further encapsulation of that specific layer data, and at receiving host data is de encapsulated at each layer and sent to other layer(from layer 1 to layer 7) for further processing.
Application Layer 7:
Application layer deals with the networking applications like E-mail reader, File Transfer Protocol (FileZilla), Hypertext Transfer Protocol(HTTP), Web Browsers(chrome, internet explorer, Firefox).
You can say that application layer provides a user interface and processes network data.
At sending host application layer produces the network data to be transmitted from the sender host.
At the receiving host application layer uses (present) the network data produced and transmitted by the sender host.
Presentation Layer 6:
Presentation layer performs the task of data format conversion to provide ease in the transportation of data.
You can say that this layer is mainly concerned with data format conversion. The format conversion process ensures that both the sender and receiver can use heterogeneous data.
At sending device the presentation layer receives data from the application layer(Layer 7 of OSI Model).
At sending device the presentation layer converts the data into a format that is easily transportable over the network.
At receiving device data is converted back to it’s native format from the network format that can be easily consumed, used, and displayed by the application layer above.
Session Layer 5:
The main functionality of session layer(Layer 5 of OSI Reference Model) is to create and maintain sessions between network application running on sending device and the network application running on receiving device.
Session is a logical communication channel which maintain data about the communications between sending and receiving device’s network applications.
Session layer also handles authentication for those network applications which uses authentication process prior to opening a logical communication channel(session).
Transport Layer 4:
The transportation of data intended for specific network applications between two hosts over a network is the responsibility of transport layer (Layer 4 of OSI Model).
At sending device the data is divided into small chunks called data segments for the ease of transmission over the network medium, and passed over to the network layer for further processing.
As data segments are not bound to use the same route hence they may arrive in different order following different routes.
At receiving device transport layer reassemble the data and ensures that the data is in the order as it was at the sending device and handed over to the session layer.
Network Layer 3:
The delivery of data packets across the network is the responsibility of Network Layer (Layer of 3 of OSI model).
Network layer assigns logical addresses (IP Addresses in the TCP/IP model) to all devices in a network for identification.
This layer adds source logical address (IP Address) and destination logical address (IP address) for accurate data transmission.
Logical addresses are assigned at the network protocol level.
At sending device Network layer wraps each data segment received from transport layer in a data packet along with the routing data. The packet is sent down to the data link layer to send it over the network physical
At receiving device the network layer dissect the data packet received to extract and examine the data segment, if it is intended for the receiving device, sends it up to the transport layer, otherwise discards the data packet.
Some of the protocols operating at the network layer are:
IP, IPX, AppleTalk, and SNA.
The Internet Protocol (IP) is the TCP/IP implementation of the network layer.
IP addresses are logical addresses provided by the IP in TCP/IP.
Data link Layer 2:
At Data Link Layer physical addresses are added to the data for transmission over the local network.
Physical addresses are the MAC addresses embedded within each networking device which uniquely identifies each device.
On the basis of these physical addresses data routes in the physical network from one physical device to another.
At sending device the each data packet from the network layer is received and wrapped in a data frame along with local routing data.
After the addition of local routing data the data frames are sent down to the physical layer for further processing and transmission over the physical media.
At the receiving device data frames are unwrapped by data link layer for processing and examined if this frame is intended for the receiving device.
Physical Layer 1:
The low level processing of data is performed at the physical layer of OSI Model for sending data over on the physical media.
Data is converted into bits and then transmitted in the form of electrical current or optical signals over the electrical or optical media.
The physical layer provides the electrical, optical, or over-the-air connection
between the sending host device and the receiving host device.
In short the physical layer defines mechanical, electrical, optical, radio,
procedural, and functional standards to enable the transmission of data-link
(Layer 2 of OSI Model) frames over a certain transmission medium.