The OSI Model (Open Systems Interconnection Model) is a conceptual framework used to describe the functions of a networking system. The OSI model characterizes computing functions into a universal set of rules and requirements in order to support interoperability between different products and software. In the OSI reference model, the communications between a computing system are split into seven different abstraction layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application.
Created at a time when network computing was in its infancy, the OSI was published in 1984 by the International Organization for Standardization (ISO). Though it does not always map directly to specific systems, the OSI Model is still used today as a means to describe Network Architecture.
Why do we need the OSI Model?
- To address the problem of networks increase in size and in number, the International Organization for Standardization (ISO) researched many network schemes and recognized that there was a need to create a network model
- This would help network builders implement networks that could communicate and work together
- ISO, therefore, released the OSI reference model in 1984.
Don’t Get Confused between:
ISO: International Organization for Standardization
OSI: Open Systems InterConnection
ISO: InterNetwork Operating System
The OSI Reference Model:
It is a 7 layer architecture with each layer having specific functionality to perform. All these 7 layers work collaboratively to transmit the data from one person to another across the globe:
- 7. Application Layer
- 6. Presentation Layer
- 5. Session Layer
- 4. Transport Layer
- 3. Network Layer
- 2. Data Link Layer
- 1. Physical Layer
PDU: A protocol data unit (PDU) is an open system interconnection (OSI) term used in telecommunications that refers to a group of information added or removed by a layer of the OSI model. Each layer in the model uses the PDU to communicate and exchange information, which can only be read by the peer layer on the receiving device and is then handed over to the next upper layer after stripping.
1. Physical Layer:
This layer includes the physical equipment involved in the data transfer, such as the cables and switches. This is also the layer where the data gets converted into a bit stream, which is a string of 1s and 0s. The physical layer of both devices must also agree on a signal convention so that the 1s can be distinguished from the 0s on both devices. This deals with all aspects of physically moving data from one computer to the next. It also defines how data is encoded into the media used to transmit the data.
Functions: The Physical layer deals with the physical transmission of bits over the network using media(Wired or wireless).
Key Activities: It encodes data into signals, transmits and receives signals through physical media, handles voltage levels and signaling techniques, and establishes and terminates physical connections.
- It converts signals from Analog to Digital and vice versa.
Example: Hub, Repeater, Modem, and Cables are Physical Layer devices
Protocols: Bluetooth, Wi-Fi, 10BASET.
PDU: Physical layer PDU is the bit or, more generally, symbol.
2. Data Link Layer:
The data link layer is very similar to the network layer, except the data link layer facilitates data transfer between two devices on the SAME network. The data link layer takes packets from the network layer and breaks them into smaller pieces called frames. Like the network layer, the data link layer is also responsible for flow control and error control in intra-network communication (The transport layer only does flow control and error control for inter-network communications).
Data Link Layer is divided into two sublayers:
- Logical Link Control (LLC)
- Media Access Control (MAC)
The packet received from the Network layer is further divided into frames depending on the frame size of the NIC(Network Interface Card). DLL also encapsulates Sender and Receiver’s MAC address in the header.
The Receiver’s MAC address is obtained by placing an ARP(Address Resolution Protocol) request onto the wire asking “Who has that IP address?” and the destination host will reply with its MAC address.
Functions: The Data Link layer provides reliable and error-free communication between directly connected devices on the same network.
Key Activities: It frames data into frames, handles flow control to manage the rate of data transmission, detects and corrects errors, and controls access to the network media.
- Frame Creation
- Transportation of the Frame and also protection of it
- Address Resolution Protocol.
- Manage Collision Domain (CACD, CSMA, CSMACD)
Example: Switches.
Protocols: NIC, Bridge, ARP, and CDP.
PDU: Data link layer PDU is the frame.
3. Network Layer:
The network layer is responsible for facilitating data transfer between two different networks. If the two devices communicating are on the same network, then the network layer is unnecessary. The network layer breaks up segments from the transport layer into smaller units, called packets, on the sender’s device, and reassembles these packets on the receiving device. The network layer also finds the best physical path for the data to reach its destination; this is known as routing.
The functions of the Network layer are :
- Routing: The network layer protocols determine which route is suitable from source to destination. This function of the network layer is known as routing.
- Logical Addressing: In order to identify each device on Internetwork uniquely, the network layer defines an addressing scheme. The sender & receiver’s IP addresses are placed in the header by the network layer. Such an address distinguishes each device uniquely and universally.
Functions: The Network layer enables communication between devices on different networks.
Key Activities: It assigns logical addresses (IP addresses) to devices, routes and forwards data packets across multiple networks, manages network congestion, and determines the best path for data transmission.
- Path Management
- Multiplexing(combine multiple signals or data streams into a single transmission medium for efficient utilization of resources.)
- Data transfer
Example: Routers,
Protocols: RIP, IP. ICMP.
PDU: Network layer PDU is the packet.
4. Transport Layer:
Layer 4 is responsible for end-to-end communication between the two devices. This includes taking data from the session layer and breaking it up into chunks called segments before sending it to layer 3. The transport layer on the receiving device is responsible for reassembling the segments into data the session layer can consume.
The transport layer is also responsible for flow control and error control. Flow control determines an optimal speed of transmission to ensure that a sender with a fast connection doesn’t overwhelm a receiver with a slow connection. The transport layer performs error control on the receiving end by ensuring that the data received is complete and requesting retransmission if it isn’t.
Functions: The Transport layer ensures reliable end-to-end communication between devices.
Key Activities: It segments data from the upper layers into smaller units, provides error detection and recovery mechanisms, and ensures proper sequencing and reassembly of data at the destination.
- It is responsible for the Delivery of Data.
- It does Segmentation(Chopping)(Segmentation refers to the process of breaking down a large data unit, such as a message or a packet, into smaller segments for more efficient transmission across a network.)
- Transport the segments to Layer-3
- Re-assamble
- Error Control(Used to detect and correct errors that can occur during data transmission across a network)
- Flow Control(Control the amount of Data)(Used to manage the rate of data transmission between a sender and receiver to ensure that the sender does not overwhelm the receiver with data.)
Example: Internet Protocol (IP)
Protocols: IPv4, IPv6, IPX, TCP, and UDP.
PDU: Transport layer PDU is the segment or the datagram.
Difference between TCP and UDP?
Basis | Transmission control protocol (TCP) | User datagram protocol (UDP) |
---|---|---|
Type of Service | TCP is a connection-oriented protocol. Connection-orientation means that the communicating devices should establish a connection before transmitting data and should close the connection after transmitting the data. | UDP is the Datagram-oriented protocol. This is because there is no overhead for opening a connection, maintaining a connection, and terminating a connection. UDP is efficient for broadcast and multicast types of network transmission. |
Reliability | TCP is reliable as it guarantees the delivery of data to the destination router. | The delivery of data to the destination cannot be guaranteed in UDP. |
Error checking mechanism | TCP provides extensive error-checking mechanisms. It is because it provides flow control and acknowledgment of data. | UDP has only the basic error checking mechanism using checksums. |
Acknowledgment | An acknowledgment segment is present. | No acknowledgment segment. |
Sequence | Sequencing of data is a feature of the Transmission Control Protocol (TCP). this means that packets arrive in order at the receiver. | There is no sequencing of data in UDP. If the order is required, it has to be managed by the application layer. |
Speed | TCP is comparatively slower than UDP. | UDP is faster, simpler, and more efficient than TCP. |
Retransmission | Retransmission of lost packets is possible in TCP, but not in UDP. | There is no retransmission of lost packets in the User Datagram Protocol (UDP). |
Header Length | TCP has a (20-60) bytes variable length header. | UDP has an 8 bytes fixed-length header. |
Weight | TCP is heavy-weight. | UDP is lightweight. |
Handshaking Techniques | Uses handshakes such as SYN, ACK, SYN-ACK | It’s a connectionless protocol i.e. No handshake |
Broadcasting | TCP doesn’t support Broadcasting. | UDP supports Broadcasting. |
Protocols | TCP is used by HTTP, HTTPs, FTP, SMTP and Telnet. | UDP is used by DNS, DHCP, TFTP, SNMP, RIP, and VoIP. |
Stream Type | The TCP connection is a byte stream. | UDP connection is a message stream. |
Overhead | Low but higher than UDP. | Very low. |
5. Session Layer:
This is the layer responsible for opening and closing communication between the two devices. The time between when the communication is opened and closed is known as the session. The session layer ensures that the session stays open long enough to transfer all the data being exchanged, and then promptly closes the session in order to avoid wasting resources.
The session layer also synchronizes data transfer with checkpoints. For example, if a 100-megabyte file is being transferred, the session layer could set a checkpoint every 5 megabytes. In the case of a disconnect or a crash after 52 megabytes have been transferred, the session could be resumed from the last checkpoint, meaning only 50 more megabytes of data need to be transferred. Without the checkpoints, the entire transfer would have to begin again from scratch.
Functions: The Session layer establishes, manages, and terminates communication sessions between applications.
Key Activities: It establishes and synchronizes communication between devices, allows sessions to be set up, maintained, and terminated, and supports checkpointing and recovery.
- Manage the Sessions
- Establish(Authentication, Authorization)
- Management(Page management)
- Termination(Logout)
- Sync data transfer with checkpoints
Example: Client Software.
Protocols: Network core Protocol(NCP), Password Authentication Protocol(PAP), PPTP, NetBIOS, AppleTalk and Zone Information Protocol (ZIP).
PDU: Transport layer PDU is the segment or the datagram.
6. Presentation Layer:
This layer is primarily responsible for preparing data so that it can be used by the application layer; in other words, layer 6 makes the data presentable for applications to consume. The presentation layer is responsible for the translation, encryption, and compression of data.
Two communicating devices communicating may be using different encoding methods, so layer 6 is responsible for translating incoming data into a syntax that the application layer of the receiving device can understand.
If the devices are communicating over an encrypted connection, layer 6 is responsible for adding the encryption on the sender’s end as well as decoding the encryption on the receiver’s end so that it can present the application layer with unencrypted, readable data.
Finally, the presentation layer is also responsible for compressing data it receives from the application layer before delivering it to layer 5. This helps improve the speed and efficiency of communication by minimizing the amount of data that will be transferred.
Functions: The Presentation layer ensures the compatibility of data formats between different systems.
Key Activities: It handles data representation and formatting, data encryption and decryption, compression and decompression, and data syntax conversion.
- Ensure how data will be presented
- Encryption/Decryption
- Compression of data
- Lossless
- Lossly
- Translation from ASCII to EBCDIC
Example: TLS.
Protocols: SSL, HTTP/ HTML (agent), FTP (server), AppleTalk Filing Protocol,Telnet.
PDU: Presentation layer PDU is the Formatted Data.
7. Application Layer:
This is the only layer that directly interacts with data from the user. Software applications like web browsers and email clients rely on the application layer to initiate communications. But it should be made clear that client software applications are not part of the application layer; rather the application layer is responsible for the protocols and data manipulation that the software relies on to present meaningful data to the user. Application layer protocols include HTTP as well as SMTP (Simple Mail Transfer Protocol is one of the protocols that enables email communications).
Functions: The Application layer provides services directly to the user or application.
Key Activities: It supports network-enabled applications, such as file transfer, email, web browsing, and remote login. It defines protocols and data formats for application-level communication.
- Handle Request and Response
Examples: Any Application.
Protocols: Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), Post Office Protocol (POP), Simple Mail Transfer Protocol (SMTP), and Domain Name System (DNS), Telnet, and Web servers.
PDU: Application Layer PDU is the User Data.
Advantages of OSI Model
The OSI model helps users and operators of computer networks:
- Determine the required hardware and software to build their network.
- Understand and communicate the process followed by components communicating across a network.
- Perform troubleshooting, by identifying which network layer is causing an issue and focusing efforts on that layer.
The OSI model helps network device manufacturers and networking software, vendors:
- Create devices and software that can communicate with products from any other vendor, allowing open interoperability
- Define which parts of the network their products should work with.
- Communicate to users at which network layers their product operates – for example, only at the application layer, or across the stack.
Pingback: OSI Model Analogy - Youngster Company
Pingback: Everything about TCP IP Model - Youngster Company