OSI Model: A Complete Overview of Its Layers and Functions

What is the OSI Model?  What are the seven layers of this model?

OSI Reference Model is a standard approach to network design. It is developed by the International Standards Organization (ISO). The word “Open” signifies that the model deals with connecting open systems – that is, systems that are open for communication with other systems. In the OSI model, each layer performs a subset of the required communication functions. Each layer relies on the next lower layer to perform the required function. In this post we study about the OSI Model and have a Complete Overview of Its Layers and Functions

Layers of the OSI Model:

Data Link

Physical layer

  1. This layer is responsible for transmitting a bit stream over a physical medium such as a cable.
  2. It deals with the mechanical and electrical specifications of the interface (e.g., the RJ45 jack, ports, etc) and the transmission medium.
  3. It defines the procedures and functions that physical devices and interfaces have to perform for transmission to occur.

    Functions of Physical Layer:
    1. Physical characteristics of interfaces and media – It defines the transmission medium, and the interface between the transmitting devices and the medium. 
    2. Bit representation – The data in this layer is a stream of bits. These bits are encoded into electrical or optical signals. The physical layer defines the type of encoding, i.e., how bits 0 and 1 are changed into signals. 
    3. Data transmission rate – The number of bits sent each second, the duration of a bit and how long it lasts on the medium are defined by the medium. 
    4. Synchronizing the sender and receiver clocks: The sender and receiver must be synchronized at the bit level.
    5. Transmission mode – The physical layer defines the direction of transmission i.e., simplex, half-duplex, full duplex
    6. Physical Topology – how devices are connected – ring, star, mesh, bus topology
    7. Line configuration – The physical layer is concerned with connection of devices. Devices may be connected in a point-to-point configuration (through a dedicated link), or multipoint configuration (link shared between many devices).

Data Link Layer

  1. The physical layer is just transmitting the bits. The data link layer is responsible for delivery of data between two systems on the same network.
  2. It does this by breaking up the input data into data frames, each of 100 or 1000 bytes, and transmits the frames sequentially.
  3. This layer is responsible for moving frames from one node to another.

    Main functions of this layer are:
  1. Framing – divide the stream of bits received into data units called frames.
  2. Physical Addressing – Add a header to the frame to define the physical address of the source and the destination machines.
  3. Flow control – Impose a flow control – control rate at which data is transmitted  so as not to flood the receiver 
  4. Error Control – Adds mechanisms to detect and retransmit damaged or lost frames; and prevent duplication of frames. This is achieved by adding a trailer to the end of a frame.
  5. Access control – When two or more devices are connected to the same link, this layer determines which device has control over the link at any given time.
OSI layers

Network Layer

  1. This layer is responsible for the delivery of an individual packet from source to destination. This delivery of packets may be across several networks or links. 

    Main functions of this layer are:
  1. Responsible for delivery of packets across multiple networks 
  2. This layer does not recognize any relationship between these packets.
  3. If two systems are connected to the same link, there is no need for the network layer.
  4. But if the two systems are connected to different networks the network layer is needed for delivery of packets.
  5. Logical addressing – The data link layer handles the addresses at a local level by using a physical address. But since the data must pass across networks, the addressing mechanism is different. The network layer adds a header to the packet coming from the upper layer and this packet includes the logical addresses of the sender and the receiver.
  6. Routing – Provide mechanisms to transmit data over independent networks (internetworks) that are linked together through routers and switches. The network layer at source A sends a packet to the network layer at router B. When the packet arrives at B, the router makes a decision based on the destination F. The router uses its router table to decide that the next hop should be at router E. The network layer at E sends the packet to destination address F.
  7. Network layer is responsible only for delivery of individual packets and it does not recognize any relationship between those packets

Transport Layer

  1. This layer is responsible for the process-to-process delivery of the entire message. A process is just an application program running on a host computer. 
  2. The network layer is responsible for source to destination delivery of the packets. It treats each packet individually, even if they all belong to the same message. 
  3. The transport layer ensures that the whole message arrives intact and in order.

    Main functions of this layer are:
  1. Responsible for process-to-process delivery of the entire message
  2. Segmentation and reassembly – It divides the message into smaller segments, numbers them and transmits. It reassembles these messages at the receiving end using the sequence number.
  3. Connection control – The transport layer can be either connectionless or connection-oriented. A connectionless transport layer treats each segment as an independent packet and delivers it to the transport layer at the destination. A connection-oriented transport layer first establishes a connection with the transport layer at the destination computer before delivering the segments. The connection is then terminated once all the data is transferred.
  4. Error control – make sure that the entire message arrives without errors – else retransmit. 
  5. Flow control – What if data arrives garbled or out of order or too fast? If a packet is missing or garbled, or arrives out-of-order, or too soon, the protocol at this layer will attempt to correct.
  6. Service-point addressing – Computers may be running many programs simultaneously. Hence source-to- destination means not only transmitting data from one computer to another but also from a specific process on one computer to a specific process on another computer. Therefore the transport layer header must include a service-point address (or port address). 
  7. Thus, the responsibility of the transport layer is to get an entire message to the correct process on the destination computer.

Session Layer

  1. The session layer is the dialog controller. It establishes, maintains and synchronizes the interaction between computers.
  2. Main functions of this layer are:
  1. Dialog control – allows two systems to enter into a dialog, keep a track of whose turn it is to transmit Transmission mode may be half-duplex or full-duplex.
  2. Synchronization – adds check points (synchronization points) into stream of data. These check points enable the system to know which unit has to be retransmitted in case there is a crash.
  3. The session layer answers the need for individual hosts to support more than one active connection at a time.

Presentation Layer:

  1. This layer is concerned with the syntax and semantics of the information exchanged between the two computers.
  2. The main tasks of this layer are: translation, compression, and encryption
  3. Translation 
  4. Different computers use different encoding systems (bit order translation)
  5. Convert data into a common format before transmitting. The data received at the destination is then converted from the common format into the receiver-dependent format.
  6. Syntax represents info such as character codes, data types, and file formats (how many bits to represent data – 8 or 7 bits
  7. Compression – reduce number of bits to be transmitted. This is more important for transmission of video and audio data.
  8. Encryption – Encryption of data is required to ensure privacy of data. This layer transforms data into an unintelligible format at the sending end. At the receiving end, decryption takes place.
OSI layers

Application Layer:

  1. This is the top layer of the OSI reference model.
  2. This layer enables the user to access the network.
  3. It provides user interfaces for services like: email, browser, file transfer, shared database management.
  4. It deals with issues such as: How can two applications communicate in a meaningful way?
  5. It contains protocols that  allow users to access the network (FTP, HTTP, SMTP), etc
  6. Services provided by the Application layer are:
    1. Network virtual terminal – This allows a user to log on to a remote host. The application creates a software emulation of a terminal at the remote host. The user’s computer communicates with the software terminal which in turn talks to the host. 
    2. File transfer, access and management: This application allows a user to access files on a remote host, retrieve files from the remote host, and also to manage files on a remote host.
    3. Mail – this application provides basic services for email forwarding and storing.

What is the difference between network layer delivery and transport layer delivery?

The transport layer is responsible for source-to-destination delivery of the entire message, whereas the network layer oversees delivery of individual packets of data irrespective of their relationship to each other and to the entire message.

Group the OSI layers by function.

The OSI layers can be grouped into:

a. network support layers:   physical, data link, network

b. user support layers:  session, presentation, application

c. transport layer:    functions as a agent (liaison) between the two groups of layers

What is the difference between a port address, a logical address and a physical address?

Physical Address:

  1. The physical address (or link address) is the local address of a node. 
  2. It is used by the data link layer and physical layer to deliver data from one node to another within the same network. 
  3. It is included in the frame used by the data link layer. 
  4. It is the lowest-level address. 
  5. The size and format of the physical address depends on the network. E.g., the Ethernet uses a 48 bit address which is included in every network interface card (NIC).

Logical Address

  1. The logical address defines the sender and receiver at the network layer and is used to deliver messages across multiple networks. 
  2. This address is used by the network layer. 
  3. This address is independent of the underlying physical networks. 
  4. Since different networks have different addressing formats, the physical addresses cannot be used when networks are interconnected. 
  5. A universal addressing system is used in which the computers can be identified uniquely.  
  6. The logical address used on the Internet is a 32-bit address which can uniquely define a computer on the Internet.  

Port Address:

  1. The end objective of Internet communication is a process communication with another process. 
  2. It is not sufficient to just transfer data from one computer to another.
  3. E.g., computer A can communicate with computer B using the TELNET protocol At the same time, A may be communicating with another computer C using the File Transfer Protocol (FTP).
  4. For these two processes to receive data simultaneously, we  need a method by which the processes can be given different labels. These labels are the addresses. A label assigned to a process is called a port address.

What is the Network Model?

  1. A model is a hypothetical description of a complex entity or process. The process of data communication along a network is very complex involving hardware and software.
  2. The Network model is a method of describing and analyzing data communications networks by breaking the entire set of communications process into a number of layers.

What is a Protocol?

It is a formal description of message formats and the rules that two computers must follow in order to exchange messages. This set of rules describes how data is transmitted over a network. OSI is not a protocol.  Protocols are needed for the following reasons:

  1. In what format will the messages be transmitted?
  2. At what speed should messages be transmitted?
  3. What to do if errors take place?
  4. What to do if parts of a message are lost?

What is meant by Layered Approach To Networking?

  1. Divide the complex task into a number of simpler sub-tasks. A layer performs that simple sub-task.
  2. Each layer builds upon the layer below it, adding new functionality.
  3. The entities comprising the corresponding layers on different machines are called peers.
  4. It is the peers that communicate by using the protocols.
  5. Actually, data is not transferred from layer n on one machine to layer n on another machine.
  6. Each layer passes data and control information to the layer immediately below it, until the lowest layer is reached.
  7. Actual data communication takes place through the lowest layer – the physical layer.

Explain the concept of Services and Protocols

  1. A service is a set of operations that a layer provides to the layer above it.
    1. Service defines what operations the layer is prepared to perform. 
    2. A service relates to the interface between two layers – the lower layer is  service provider and the upper layer is service user.
  2. A protocol is a set of rules governing the format and meaning of the packets.
    1. Protocols relate to packets sent between peer entities on different machines.
    2. Entities use protocols.
    3. Protocols can be changed provided the services visible to the user do not change. Thus services and protocols are not joined or dependent.
    4. Protocol relates to the implementation of the service – how it is done
  3. Analogy with programming languages:
    1. A service is like an object in an object-oriented language
    2. What operations can be performed on this object is defined
    3. How these operations are to be performed is not defined

Explain the features of connectionless service and connection-oriented services.

Layers can offer two types of services to the layers above them: connection-oriented and connectionless. 

  • Connection-oriented service is modelled after the telephone system. To talk to someone, we pick up a phone, dial the number, talk and disconnect. Similarly, in a network, the service user will
  1. Establish a connection
  2. Use the connection
  3. Release the connection
  4. The sender, receiver and the network may conduct a negotiation about data transfer speed, maximum message size, etc.

When a connection is established, the sender and receiver may conduct a negotiation about parameters to be used such as maximum message size, data transfer speed, etc.

Connection-oriented service is used when reliability is important. Only a single path is established for the call, and all the data follows that path. 

  • Connectionless service is modelled after the post office system. Each message (letter) carries the full address of the destination system. Each message is routed through the network system independent of the other messages. If two messages are sent to the same destination, normally the first one to be sent should arrive first. But it is possible that the second message arrives first. Since each message (packet) is routed independently, the network cannot guarantee that all the messages will arrive at the destination in the transmitting order. Different parts of a message may travel along different routes.

What is the difference between flow control and error control?

  Flow control: adjust and confirm data flow rate for successful transmission.

  Error Control: a way to recover corrupted data


YouTube video on this topic: https://youtu.be/b-JU9aWdoP8

(C) Mukesh N Tekwani, 2021

Categories: Blog, Computer Science, Data Communications & Networking

Tags: , , , , , , , , , ,

1 reply


  1. The TCP/IP Protocol – SciTechGen.Com

Leave a Reply

%d bloggers like this: