Hey Guys, This is DG. Today, we are going to learn about OSI Model or Open System Interconnection Model. So, Let's Start. OSI Model defines and is used to understand how data is transferred from one computer to another in a computer network.
In the most basic form, two computers connected to each other with LAN cable and connectors sharing data with the help of network interconnection. interface cards forms a network. But if one computer is based on Microsoft Windows and the other one has MacOS installed then how these two computers are going to communicate with each other?
In order to accomplish successful communication between computers or or networks of different architectures, 7-layered OSI model or Open System Interconnection model was introduced by International Organization for Standardization in 1984 containing Application Layer, Presentation Layer, Session Layer, Transport Layer, Network Layer, Data Link Layer and Physical Layer. Note that each layer is a package of protocols. If I say Application Layer, then it does not mean that it includes computer applications like Chrome, Firefox etc. etc. But it includes application layer protocols that are needed to make these applications work correctly in a network or internet. Let's start with the topmost layer, Application Layer.
Application Layer is used by network applications. Network application means computer applications that use internet like Google Chrome, Firefox, Outlook, Skype etc. Web browser is a network application running in your PC. It uses application layer.
application layer protocols to do web surfing. Not only web browser but all network applications including Outlook, Skype etc all are dependent on application layer protocols to function. There are dozens of application layer protocols that enable various functions at this layer.
All these protocols collectively form application layer. These protocols form the basis for various network services like file transfer, web surfing, emails, virtual terminals etc. File transfer is done with the help of FTP protocol. Web surfing is done with the help of HTTP or HTTPS protocol.
For emails SMTP protocol is used and for virtual terminals telnet is used. So application layer provides services for network applications with the help of protocols to perform user activities. Next to application layer is presentation layer. Application layer receives data from application layer.
This data is in the form of characters and numbers. Presentation layer convert these characters and numbers to machine understandable binary format. For example, conversion of ASCII to FCD code. This function of presentation layer is called translation. Before data is transmitted, presentation layer reduces the number of bits that are used to represent the original data.
This bit reduction process is called data compression and it can be lossy or lossless. Data compression reduces the amount of space used to store the original file. As the size of file is reduced, it can be received at destination in a very less time.
That is, data transmission can be done faster. Thus, data compression is very helpful in real-time video and audio streaming. To maintain the integrity of data, before transmission, data is encrypted.
Encryption enhances the security of sensitive data. At center side, data is encrypted. encrypted and at receiver side data is decrypted. SSL protocol or secure sockets layer protocol is used in presentation layer for encryption and decryption. So, presentation layer performs three basic functions translation, compression and encryption-decryption.
Now session layer. Suppose you have planned for a party. You have hired a few helpers ensuring that each activity runs smoothly. Helpers will help you in setting up SSL.
assisting, cleaning and then closing the party. Same is the case with Session Layer. Session Layer helps in setting up and managing connections, enabling sending and receiving of data, followed by termination of connections or sessions. Like you hired some helpers for your party, Session Layer too has its own helpers called APIs or Application Programming Interfaces.
NetBIOS or Network Basic Input Output System is an example of APIs which allows applications on different computers to communicate with each other. Just before a session or a connection is established with the server, server performs a function called authentication. Authentication is the process of verifying who you are.
For this, server uses a username and a password. Once entered username and password are matched, a session or a connection is established between your computer and the server. and the server.
After authenticating the user, authorization is checked. Authorization is the process used by server to determine if you have permission to access a file. If not, you will get a message saying you are not authorized to access a file. both of these functions authentication and authorization are performed by session layer Session layer keeps a track of the files that are being downloaded for example a web page contains text, images etc. These texts and images are stored as separate files on the web server.
When you request a website in your web browser, your web browser opens a separate session to the web server to download each of these text and image files separately. These files are received in the form of data packets. Session layer keeps a track of which data packet belongs to which file and tracks where the received data packet go. In this case, it goes to the web server. goes to web browser.
That is, session layer helps in session management. So, session layer helps in session management, authentication and authorization. Your web browser performs all functions of session, presentation and application layer. Layer below session layer is transport layer. Transport layer controls the reliability of communication through segmentation, flow control and error control.
In segmentation, data received from session layer is divided divided into small data units called segments. Each segment contains a source and destination port number and a sequence number. Port number helps to direct each segment to the correct application and sequence number helps to reassemble segments in the correct order to form correct message at the receiver. In Flow Control, transport layer controls the amount of data being transmitted. Consider, our mobile is connected to a server.
Suppose server can transmit data maximum at 100 Mbps and our mobile can process data maximum at 10 Mbps. Now, we are downloading a file from the server but server starts sending data at 50 Mbps which is greater than the rate our mobile can process. So, mobile phone with the help of transport layer can tell the server to slow down data transmission rate up to 10 Mbps so that no data gets lost.
Similarly, if server is sending data at 5 Mbps, Mbps, mobile phone tells the server to increase data transmission rate to 10 Mbps to maintain system performance. Transport layer also helps in error control. If some data does not arrive the destination, transport layer uses automatic repeat request schemes to retransmit the lost or corrupted data.
A group of bits called checksum is added to each segment by the transport layer to find out received corrupted segment. Protocols of transport layer are Transmission Control Protocol and User Datagram Protocol. Transport layer performs two types of services, Connection Oriented Transmission and Connectionless Transmission. Connection Oriented Transmission is done via TCP while Connectionless Transmission is done via UDP.
UDP is faster than TCP because it does not provide any feedback whether data was really delivered. Whereas TCP provides a feedback, therefore lost data can be delivered. can be retransmitted in TCP.
UDP is used where it does not matter whether we have received all data. For example, online streaming movies, songs, games, voice over IP, TFTP, DNS etc. On the other hand, TCP is used where full data delivery is must. For example, World Wide Web, Email, FTP etc.
So, Transport Layer is involved in segmentation, flow control, error control, connection orientation, etc. connected and connectionless transmission. Transport layer passes data segments through the network layer. Network layer works for the transmission of the received data segments from one computer to another located in different networks. Data units in the network layer are called packets.
It is the layer where routers reside. The functions of network layer are logical addressing, routing and path determination. IP addressing done in network layer is called logical addressing. Every Every computer in a network has a unique IP address. Network layer assigns sender and receiver's IP address to each segment to form an IP packet.
IP addresses are assigned to ensure that each data packet can reach the correct destination. Routing is a method of moving data packet from source to destination and it is based on the logical address format of IPv4 or IPv6. Suppose computer A is connected to network 1 and computer B is connected to network 2. connected to network 2. From Computer B, we have requested to access Facebook.com and now there is a reply from Facebook server for Computer B in the form of packet.
This packet needs to be delivered to Computer B only. Since in a network, each device has a unique IP address, so these both computers will be having a unique IP address as well. Network layer of the Facebook server has already been We added sender and receiver's IP address in the packet.
Suppose mask use is This mask tells that the first three combinations represent networks, while the last three combinations Last combination represents host or computer B. So, based on IP address format, received data packet will move first to network 2 and then to computer B. So, based on IP address and mask, routing decisions are made in a computer network.
Now Path Determination A computer can be connected to internet server or a computer in a number of ways. Choosing the best possible path for data delivery from source to destination is called path determination. Thank you.
Layer 3 devices use protocols such as Open Shortest Path First, Border Gateway Protocol, Intermediate System to Intermediate System to determine the best possible path for data delivery. Data Link Layer receives data packet from Network Layer. Data packets contain IP addresses of sender and receiver.
There are two kinds of addressing, logical addressing and physical addressing. Logical addressing is done at Network Layer where sender and receiver's IP addresses are assigned to each server. segment to form a data packet. Physical addressing is done at data link layer where MAC addresses of sender and receiver are assigned to each data packet to form a frame.
MAC address is a 12 digit alphanumeric number embedded in network interface card of your computer by your computer manufacturer. Data unit in data link layer is called frame. Data link layer is embedded as software in network interface card of your computer and provide means to transfer data.
data from one computer to another via a local media. Local media includes copper wire, optical fiber, or air for radio signals. Please note, here media does not correspond to audio, video, or animation.
It refers to the physical links between two or more computers or networks. Data Link Layer performs two basic functions. It allows upper layers of OSI model to access media using techniques such as framing.
It controls how data is placed and received from media using techniques such as media access control. Control and Error Detection. Consider two distant hosts, a laptop and a desktop, communicating with each other. As laptop and desktop are connected to different networks, so they will be using network layer protocols to communicate with each other.
In this example, desktop is connected to router R1 via an ethernet cable. Router R1 and R2 are connected via a satellite link, and laptop is connected to router R2 via a wireless link. Now desktop wants to send some data to laptop.
Based on the medium used to connect desktop and router R1, data link layer adds some data in the head and tail of IP packet and converts it to a frame. Ethernet Frame in this case. Router R1 receives this Ethernet Frame, Decapsulate it to an IP Packet and then Encapsulate it again to a Frame so that it can cross Satellite Link to reach Router R2. Router R2 will again Decapsulate the received Frame and Encapsulate it again to form a Wireless Data Link Frame. Laptop receives this Wireless Data Link Frame, Decapsulate it and then Forward IP Packet to Network Layer.
Finally, Data arrives application layer. Application layer protocols then make the received data visible on computer screen. So, network layer or higher level layers are able to transfer data over media with the help of data link layer.
That is, data link layer provides access to media for higher layers of OSI model. Data link layer also controls how data is placed and received from the media. The technique used to get the frame on and off the media is called media access control.
There may be a number of devices connected to a common media. If two or more devices connected to same media send data at the same time, then there may be a possibility of collision of the two messages, resulting in a useless message that neither recipient can understand. To avoid these situations, Data Link Layer keeps an eye on when the shared media is free, so that device can transmit data for the receiver.
This is called carrier sense multiple access. So, Data Link Layer with its Media Access Control Methods controls data transmission. Tail of each frame contains bits which are used to detect errors in the received frame. Errors occur due to certain limitations of the media used for transmission.
The last layer is physical layer. Till now, data from application layer has been segmented by transport layer, placed into packets by network layer and framed by data link layer, which is a sequence of binary zeros and ones. Physical layer convert these binary sequence into signal and transmit over local media. It can be an electrical signal in case of copper cable or LAN cable, light signal in case of optical fiber and radio signal in case of air. So, signal generated by physical layer depends on the type of media used to connect two devices.
At the receiver, physical layer receives signals, convert it to bits and pass it to data link layer as a frame. Frame is further decapsulated as data moves through higher layers. Finally, data is moved to application layer. Application layer protocol makes the sender's message visible in the application in the receiver's computer screen.
In this way, OSI model is helping to transfer data between distant hosts. So these 7 layers of OSI model are lying behind the smooth functioning of internet. If you have learnt something from this video then please like this video. Share this video with your friends. this video so that more people can learn.
Subscribe to TechTerms if you want to learn more and turn the notification icon on. Thanks for watching.