Open Systems Interconnection (OSI) Model
OSI stands for Open Systems Interconnection and it has seven layers architecture with each layer having specific functionality to perform; these layers work collaboratively to transmit data packets from one networking device to another networking device across the network.
It is a referential model that set a standard to let us understand; how a communication takes place between devices in a network and the process is divided into various layers to framework its function in each layer.
This framework helps us to design and troubleshoot a network; if problem arise.
There are seven layers in OSI model and when two devices take part in a communication then it start from top layer and comes down to the bottom layer and again it moves the journey from the bottom layer and reaches to the top layer to complete the single communication between the sender and receiver.
Therefore when the sender sends data packet then that will travel from the top application layer, presentation layer, session layer, transport layer, network layer and data link layer and at last to the physical layer. The data packet will now travels through the physical layer and reaches the receiver end and then from the physical layer it will moves to data link layer, network layer, transport layer, session layer, presentation layer and finally it will reach to the application layer of the receiver end; where the receiver will get the information in the form of an application.
Seven Layers Architecture of OSI Model
Application Layer (Layer 7):
This is the top most layer of the OSI model; the network applications implement the application layer. These applications produce the data which are there for being transferred across the network. This layer often serves as a window interface for the application services to access the network and as well as to display the received information to the end user.
Applications that work in application layer are browser, messenger interface; so all applications appear on the desktop screen; therefore application layer is also called as desktop layer.
Protocols work in application layer are HTTP, FTP, SMTP and there are many more.
The functions of the Application layer are:
OSI model acts as a reference model but it is not implemented on the Internet because the new invention has taken over; so the current model that is being implemented on the internet is the TCP/IP model.
Presentation Layer (Layer 6):
The presentation layer is also known as the translation layer because when the sender sends information then the data is extracted here from the application layer and then it is manipulated to the required format for transmitting over the network but if we discuss about the receiver end then it just reverse the process and pass the data to the application layer.
The functions of the Presentation Layer are:
Translation: Let us say from ASCII to EBCDIC.
Encryption and Decryption: Data are translated to a secure form or code which is known as encryption of the data and encrypted data is known as the ciphertext and the encrypted date is further needed to be decrypted as when requirement arises at the receiver end that is converting encrypted data into plain text. The most vital thing to remember is that for the encryption and decryption process a key value is used.
Compression: To minimize the size of any data compression is used by the presentation layer to reduce the number of bits that need to be transmitted across the network but again the compressed data is further decompressed at the receiver end.
Session Layer (Layer 5):
Session layer by the name itself is responsible for the establishment of connection and maintenance the sessions through authentication along with ensuring the security.
Therefore it establishes connection between the sender and the receiver before sending the actual date packet and ensure authentication to ensure security between the intended communicators.
The functions of the Session Layer are:-
We should remember one thing that all three layers bellow including the Session Layer are integrated as a single layer in the TCP/IP model as Application Layer. Therefore implementation of these three layers is done by the network application itself.
Let us consider a situation where a user wants to send a message through any given message application running in the system browser and that messenger application will act here as the application layer which provides an interface to the user for creating the data. This message or data is compressed or encrypted in case of any secure data and then it is converted into bits 0's and 1's; so that it can be transmitted.
Transport Layer (Layer 4):
The transport layer lies above the network layer and it takes services from the network layer and provides services to the application layer; it is also called the heart of the OSI model architecture because it separate the top three software layers and the bottom three hardware layers. Transport layer is responsible for the End to End Delivery of the complete message and the data in the transport layer is referred to as Segments. Therefore the transport layer provides the acknowledgement of the successful data transmission and also retransmission of same data in case if an error is identified.
It uses protocols such as TCP and UDP; we will go into discussion of these topics in other lectures.
This layer will convert the pure data from the sender and add the transport header to it; that is the port number for identification purpose and convert the same into the protocol data to transmit the same over the network.
If we discuss about the receiver side then it just perform the reserve operation.
At sender's side:
Transport layer receives the formatted data from the upper layers that is session layer and then it performs Segmentation as well as implements Flow & Error control to ensure proper data transmission. After that it adds the source and destination port numbers in its header and then forwards the segmented data to the lower layer that is network Layer of OSI model.
One most important thing to note that the sender needs to know the specific port number associated with the receiver end application.
Generally this destination port numbers are configured by default because all applications are having their default port numbers. Let us assume that a web application makes a request to a web server then it uses port number 80 because this is the default port assigned to web applications.
At receiver's side:
If we discuss about the receiving side then after receiving data the transport layer reads the port number from its header and forwards the data to the respective application. At the receiving end it also performs sequencing of the segmented data and reassembling of the same data.
The functions of the Transport Layer are:
Segmentation and Reassembly: The transport layer accepts the message from the session layer and breaks the long message into smaller units; so that it can be easily transmit over the network. Now each of the segments is provided with a header associated with it and containing information of sequential order of the full message. The transport layer at the receiving end; reassembles the complete message through proper sequencing of those broken smaller units.
Service Point Addressing: The message has to be delivered in correct process to the intended receiver that is why the header of the transport layer includes a type of address called port address or service point address. Therefore through this address; the transport layer makes sure that the message is delivered in the correct process and to the exact receiver.
The services provided by the Transport Layer:
Connection Oriented Service: Let us discuss about connection oriented service; it has three phases to process that includes the following:-
In connection oriented transmission; the source device receives an acknowledgement from the receiving device that the packet or the packets have been received successfully by the destination receiving end; that is why this type of transmission is reliable and secure.
Connectionless Service is much faster way of communication compare to connection oriented service because it is a one phase process and includes single way transfer without receiving acknowledge of received packet or packets from the receiver; that is why it is less secure and reliable.
Network Layer (Layer 3):
The network layer lies just above data link layer and it works for the transmission of data from one host to the another host located in different networks along with taking care of packet routing. The network layer selects the shortest path to transmit data packet through the routes covering short distance in the way of destination. Therefore the sender & receiver's IP addresses are placed in the header of the packets by the network layer.
The functions of the Network Layer are:
Routing: Let us understand Routing. It is the most important function that is performed by the network layer of the OSI model and that is to determine the best suitable route from the source device to the destination device.
Logical Addressing: The network layer defines an addressing technique in order to identify each device on the internet uniquely. The sender & receiver's IP addresses are placed in the header of the packets by the network layer because an address distinguishes each device uniquely and universally over the global network.
The protocol used is IP that is internet protocol to convert the segment into the packet by adding logical IP address of the destination device to that packet before sending it to the data link layer.
If we discuss about the receiver side then it will just perform the reverse operation.
Router is one type of hardware device that works at this layer and it understands the logical division of IP addresses and it communicates among different networking setup.
Data Link Layer (DLL) (Layer 2):
The data link layer is the second last layer of OSI model architecture; it further divides the packet into frames and it is responsible for the node to node delivery of the message. This layer makes sure that the data transfer is error free from one node to another node over the physical layer. Therefore when a packet arrives in a network; it is the responsibility of data link layer to transmit that packet to the host using its MAC address.
MAC address is the physical address which is unique identity of devices and MAC address of two or more devices can never be same; that is why MAC identity is added to the frame and that frame is received by the physical layer but if we discuss about the receiving end then the operation just takes reversal process from bottom to top.
Data Link Layer is divided into two sub layers:
Logical Link Control (LLC):
LLC controls the synchronization, flow control and error checking functions of the data link layer.
Media Access Control (MAC):
MAC is responsible for moving data packets from one network interface card to another network interface card in a network across a shared transmission medium.
The functions of the Data Link Layer are:
Framing: Framing is a mechanism where a sender transmits a set of meaningful bits to the receiver and that can be accomplished by attaching special bit patterns to the beginning and end of the frame.
Physical Addressing: The data link layer adds physical address that is the MAC address of the sender and the receiver in the header of each frame just after completing the frame creation process.
Error Control: The data link layer detects and retransmits damaged and lost frames; those are changed during transmission across the network and in this way the data link layer provides the mechanism of error control.
Flow Control: It is responsible for maintaining consistency of data between both sending and receiving ends otherwise the data may found to be corrupted thus; before receiving the acknowledgement flow control coordinates the amount of data that can be sent.
Access Control: When multiple devices use a single communication channel then the MAC sub layer of the data link layer determines the devices controlling schedule over the channel at a given time; that is when one device has control over the channel and other devices have to wait till their turns come.
That is why access control is one of the vital operations which are processed by the data link layer.
Some of the networking devices which work on the data link layer of OSI model are switch, NIC and bridge.
Physical Layer (Layer 1):
The lower most layer of the OSI model is known as the physical layer and this layer plays vital role to connect all networking devices physically across the network because physical layer is responsible for the actual physical connection between the devices. This layer contains information in the form of bits; therefore it is responsible for transmitting individual bits from one node to another node and so on.
At the time of receiving signal over the network; physical layer first gets the signal and then it converts the signal into 0s and 1s; that is digital information for understanding of computers and send those to the Data Link layer.
The functions of the Physical Layer are:
Bit Synchronization: By providing a clock the physical layer provides the synchronization of the bits and by providing synchronization at bit level; clock controls both sender and receiver.
Bit Rate Control: The number of bits sent per second is known as the transmission rate and that is defined by the physical layer.
Physical Topologies: Physical layer manages the network topology in which all devices and networking elements are arranged in a network; as we know bus topology, star topology or mesh topology.
Transmission Mode: Physical layer is also responsible for the way in which the data flows between the two connected devices; this layer manages various transmission modes as possible in the network like simplex, half-duplex and full-duplex.
Some of the networking devices which work on the physical layer of OSI model are hub, repeater, modem, RJ45 and cables.
OSI Model and its Layers Transport Layer in OSI Model Session Layer in OSI Model Presentation Layer in OSI Model Physical Layer in OSI Model OSI Model Layers with Examples OSI Model Layers Tutorial OSI Model Layers in Computer Network OSI Model Layers Functions OSI Model Layers Explanation OSI Model Layers and their Functions OSI Model Layers and Protocols Network Layer in OSI Model Data Link Layer in OSI Model Application Layer in OSI Model 7 Layers of OSI Model Transport Layer in OSI Model Session Layer in OSI Model Presentation Layer in OSI Model Physical Layer in OSI Model OSI Model Layers with Examples OSI Model Layers Tutorial OSI Model Layers in Computer Network OSI Model Layers Functions OSI Model Layers Explanation OSI Model Layers and their Functions OSI Model Layers and Protocols Network Layer in OSI Model Data Link Layer in OSI Model Application Layer in OSI Model 7 Layers of OSI Model Transport Layer in OSI Model Session Layer in OSI Model Presentation Layer in OSI Model Physical Layer in OSI Model OSI Model Layers with Examples OSI Model Layers Tutorial OSI Model Layers in Computer Network OSI Model Layers Functions OSI Model Layers Explanation OSI Model Layers and their Functions OSI Model Layers and Protocols Network Layer in OSI Model Data Link Layer in OSI Model Application Layer in OSI Model 7 Layers of OSI Model OSI Model and its Layers