OSI Model - Overview
When the concept of Networking actually came into existence, computer devices of same manufacturer could only communicate with each other. There was no standard using which devices of multiple vendors/manufacturers could communicate. For example,companies ran either a complete DECnet solution or an IBM solution, not both together. There was a need to a standard mechanism using which devices of multiple vendors could communicate.
In 1970s, Open Systems Interconnection(OSI) model was developed by the International Organization for Standardization (ISO) to overcome this shortcoming. The OSI model was meant to help vendors create inter-operable network devices.
The OSI model is the primary reference/architectural model for networking.It describes how data and network information is transferred from applications on one computer, through the network media, to an application on another computer.
There are 7 layers in OSI Model that explains its approach. Although OSI model is not the practical model used for networking but it is one of the best reference models that explains the blueprint of how the network devices should communicate.
In 1970s, Open Systems Interconnection(OSI) model was developed by the International Organization for Standardization (ISO) to overcome this shortcoming. The OSI model was meant to help vendors create inter-operable network devices.
The OSI model is the primary reference/architectural model for networking.It describes how data and network information is transferred from applications on one computer, through the network media, to an application on another computer.
There are 7 layers in OSI Model that explains its approach. Although OSI model is not the practical model used for networking but it is one of the best reference models that explains the blueprint of how the network devices should communicate.
Why Layered approach?
The answer is simple. A single entity or a person cannot handle all the functions single-handedly.For example, A Company, an Organization, or a Government sub-divides its tasks to various departments or ministries (Sales, Marketing, Operations, HR etc.), each assigned with a specific role. Each department can be symbolized to a layer. Each department coordinates with other department through a defined procedure/process/protocol/interface for a particular task execution or completion.Similarly each layer in OSI model has a defined role and also has an interface using which they can communicate with each other or process the data.
Below is the table showing 7 layers of OSI Model, with Data Type at each layer, and Protocols associated at each layer:
Layer 7 (Application Layer)
Application layer gives the user an interface/software/set of protocols to interact with the machine/network. It is the only layer that directly interacts with the end user.
User can prepare/process/manipulate the data that has to be sent/transferred to another user/machine or a server.Examples of Application Layer Protocols are:Layer 6 (Presentation Layer)
The Presentation layer gets its name from its purpose: It presents data to the Application layer. The presentation layer basically allows an application to read (or understand) the message. Examples of presentation layer functionality include:
- Encryption and decryption of a message for security.
- Compression and expansion of a message so that it travels efficiently.
- Graphics formatting.
- Content translation.
- System-specific translation.
Explanation:
- Encoding and conversion of application layer data to ensure that data from the source device can be interpreted by the appropriate application on the destination device.
- Compression of the data in a manner that can be decompressed by the destination device.
- Encryption of the data for transmission and decryption of data upon receipt by the destination.
Layer 5 (Session Layer)
The main task of Session layer is dialog control. It is the layer intended to provide functions for establishing and managing sessions between software processes. Session layer technologies are often implemented as sets of software tools called application program interfaces (APIs), which provide a consistent set of services that allow programmers to develop networking applications without needing to worry about lower-level details of transport, addressing and delivery.
Layer 4 (Transport Layer)
Transport layer is responsible for end to end connectivity. Two main protocols are seen working under this layer TCP (Protocol No. 6 - Connection oriented & Reliable approach), UDP (Protocol No. 17 - Connection-less and Unreliable approach). A client/server model approach is used at this layer. Below are functions of Transport Layer:
- Process-Level Identification/Addressing:With help of Port numbers (TCP header), Transport layer identifies/addresses each application process.
- Multiplexing and De-multiplexing: Using the Port addresses/numbers, transport layer protocols on a sending device multiplex the data received from many application programs for transport, combining them into a single stream of data to be sent. The same protocols receive data and then demultiplex it from the incoming stream of segments/datagrams, and direct each package of data to the appropriate recipient application processes. Below diagram shows the process of Multiplexing and De-multiplexing.
- Connection-oriented communication using "TCP 3 way handshake mechanism".
- Same order delivery using "Sequence numbers".
- Reliability using "Acknowledge Numbers" or identifying errors/congestion in network using "Checksum".
- Flow Control by managing the rate of data transmission between two nodes to prevent a fast sender from transmitting more data than can be supported by the receiving data buffer, causing a buffer overrun. This is done by "Windowing" mechanism.
Layer 3 (Network Layer)
Network Layer handles the routing part. It is responsible for providing best path to route the packets towards the destination. A router routes the packet based the destination IP address in the Network layer header.If the packet is not destined for the router, then the router will look up the destination network address in the routing table. Once an exit interface is chosen, the packet will be sent to the interface to be framed and sent out on the local network. If the entry for the destination network is not found in the routing table, the router drops the packet. Functions of the network layer include:
Data transmitted over the physical media can be as electrical voltage signals (Copper media), in the form of Light ( Fiber Media) or in the form of Radio frequency signals (Wireless). The connectivity type can be for LAN or WAN.
If you understood the concept of OSI Model and like this article, kindly share it with your friends.
- Connection-less communication: IP is connection-less. A data packet can travel from a sender to a recipient without the recipient having to send an acknowledgement.
- Host addressing: Every host in the network is assigned a logical 32 bit address which is called an IP address.
- Routing: Routers/Gateways use routing tables to route the packets towards a destination.
- Fragmentation & Reassembly:Packets are fragmented into smaller chunks and then sent in the network towards the destination. At destination end, these chunks are again combined to form an actual packet. This is done using "Identification" and "Fragment offset" fields in the IP header.
- Error handling and Diagnostics:Using "IP header checksum", network layer can identify faulty packets.
Layer 2 (Data Link Layer)
This is the layer where most LAN, wireless LAN, and WAN technologies are defined. DLL is responsible for Logical Link Control(to interact with Network Layer), Media Access Control (to interact with Physical Layer), hardware addressing(Frames), Error detection and handling (using CRC check by adding a trailer, and defining physical layer standards. It is often divided into the Logical Link Lontrol (LLC) and Media Access Control (MAC) sub-layers, based on the IEEE 802 Project. This is layer that completely encapsulates the packet received from Network layer into a Frame by adding a header and trailer.
- Logical Link Control (LLC) 802.2: This sub-layer is responsible for identifying Network layer protocols and then encapsulating them. An LLC header tells the Data Link layer what to do with a packet once a frame is received. For example, a host will receive a frame and then look in the LLC header to understand that the packet is destined for the IP protocol at the Network layer. The LLC can also provide flow control and sequencing of control bits.
- Media Access Control (MAC) 802.3: This defines how packets are placed on the media. Contention media access is first come, first served access where everyone shares the same bandwidth. Physical addressing(48 bit MAC address) is defined here, as well as logical topologies. Logical topology is the signal path through a physical topology. Line discipline, error notification (not correction), ordered delivery of frames, and optional flow control can also be used at this sub-layer.
Layer 1 (Physical Layer)
The Physical layer is responsible for transmission of digital data bits from the Physical layer/interface of the sending (source) device over network media to the Physical layer of the receiving (destination) device. The network media can be copper(Ethernet Cables), Fiber, or Radio.
Data transmitted over the physical media can be as electrical voltage signals (Copper media), in the form of Light ( Fiber Media) or in the form of Radio frequency signals (Wireless). The connectivity type can be for LAN or WAN.
- The Physical Layer devices that comes under LAN: cable connectors like RJ45, Physical Cable like CAT5, CAT5e, CAT6, SFP Fiber connectors(SMF/MMF), Fiber cables, Hub, Repeaters, NIC ports on switch or a router or any network device.
- The Physical Layer devices that comes under WAN: WAN Cabling (Copper or Fiber), Repeaters, Modems(CSU/DSU), Provider Multiplexers, Radio Transmitters and Receivers, NIC ports on a router or any network device. To conclude, components of the Physical Layer include:
- Cabling system components.
- Adapters that connect media to physical interfaces.
- Connector design and pin assignments.
- Hub, repeater, and patch panel specifications.
- Wireless system components.
- Network Interface Card (NIC).
If you understood the concept of OSI Model and like this article, kindly share it with your friends.