OSI stands for Open System Interconnection. It was developed and standardized by ISO in 1984. It is a 7-layer architecture with each layer having specific functionality. All these layers work together to transmit data from one node to another.
The 7th layer, i.e., the Application layer, runs software at the source node and creates the data to be transmitted to the next destination node. It hands this data over to the Presentation layer at the source node. As the data moves through the remaining layers down to the Physical layer, each layer adds its own header to the packet. At the Physical layer, the data is transmitted as voltage pulses across communication mediums, such as cables.
#1. Physical Layer:
In this layer, data is sent in binary format. It deals with the electrical and mechanical specifications of cables, connectors, etc., such as RS 232-C. The Physical layer accounts for the following factors:
-
Signal Encoding: How are bits 0 and 1 represented?
-
Medium: What medium is used, and what are its properties?
-
Bit Synchronization: Is the transmission synchronous or asynchronous?
-
Transmission Type: Is the transmission serial or parallel?
-
Topology: Which topology is used (mesh, star, ring, bus, etc.)?
-
Transmission Mode: Is the transmission simplex, half-duplex, or full-duplex?
-
Multiplexing: Is multiplexing used? If so, what type (FDM, TDM)?
-
Bandwidth: Is broadband communication used?
-
Signal Type: Are analog or digital signals used?
#2. Data Link Layer:
The Data Link layer transmits a group of bits, called a frame, between adjacent nodes. At this stage, header and trailer information is added to the packet. Let's assume node A wants to send data to node D, using a datagram approach where the path is decided dynamically. The addresses of node A (ADDR(A)) and node D (ADDR(D)) are used as source and destination addresses. The Data Link layer performs the following functions:
-
Addressing: Adds headers and trailers to packets.
-
Flow Control: Regulates the amount of data to prevent overwriting the receiver's buffer.
-
Media Access Control (MAC): In LANs, it controls who sends data, when, and how much.
-
Synchronization: Headers include bits to tell the receiver when the frame is arriving and synchronize its timing. Trailers mark the end of a frame and contain error control bits.
-
Error Control: Uses CRC to verify data correctness.
-
Node-to-Node Delivery: Ensures error-free delivery to the next node.
#3. Network Layer:
This layer ensures the successful delivery of packets to the destination node. At the Network layer, packets are referred to as datagrams. The main task is to deliver packets from source to destination across multiple links. If two computers are on the same link, the Network layer isn’t needed. The following functions are performed by the Network layer:
-
Routing
-
Congestion Control
-
Logical Addressing: Manages source and destination logical addresses (e.g., IP addresses).
-
Address Translation: Converts logical addresses to their physical equivalents.
-
Accounting and Billing
-
Error-free Packet Delivery: Ensures error-free delivery from source to destination.
#4. Transport Layer:
This layer ensures that the entire message is delivered in the correct order and is passed to the appropriate application. Suppose computer A sends one file to computer B, and at the same time, another file to computer B. The Transport layer establishes a communication channel not just between the two computers but also between the respective applications. It performs the following:
-
Host-to-Host Delivery: Ensures all message segments are received by the destination.
-
Application Communication: Enables communication between two applications on different computers.
-
Segmentation and Reassembly: Breaks messages into segments and reassembles them using sequence numbers.
-
Connection: May create a logical connection between the source and destination for the entire message transfer.
#5. Session Layer:
This layer manages sessions between two computers. If computer A sends 1,000 pages to computer B, and the connection breaks after 105 pages, the Session layer ensures the data doesn’t have to be retransmitted from the start. It creates checkpoints after each subsession. In this case, if a checkpoint was taken at page 100, the transmission can resume from page 101. The Session layer performs the following:
-
Sessions and Subsessions: Divides sessions into subsessions and includes checkpointing.
-
Synchronization: Orders the data before passing it to the Transport layer.
-
Dialog Control: Determines who sends data and when, and whether communication is simplex, half-duplex, or full-duplex.
-
Session Closure: Ensures the session is closed gracefully.
#6. Presentation Layer:
The Presentation layer manages data translation, encryption, and compression. If computer A uses ASCII encoding and computer B uses EBCDIC, the Presentation layer handles these differences. It performs the following:
-
Translation: Converts data formats between sender and receiver.
-
Encryption: Encrypts and decrypts data for security purposes.
-
Compression: Compresses data for more efficient transmission and decompresses it at the destination.
#7. Application Layer:
The Application layer is the closest layer to the end user and allows direct interaction with software. Responsibilities of this layer include:
-
Network Abstraction: Provides a network abstraction to the user and applications.
-
File Access and Transfer: Allows users to upload or download files from a remote host.
-
Mail Services: Enables the use of mail services.
-
Remote Login: Allows remote login to a host.
-
World Wide Web (WWW): Accesses web pages.
This structure provides a clearer, more concise explanation of each layer in the OSI model.
