Networking
What is OSI ?
It is a Open Systems Interconnection . It is a conceptual framework that standardizes how network communication works. It has 7 layers, each responsible for specific part of data transmission.
These layer are not interconnected with each other ; data transmission occurs from one layer to another .
OSI model
The OSI model consists of seven layers . Each of these layers has its specific functions , within these layers , various protocols like HTTPs/HTTP , Data Encryption and many other work. These all protocols are used to securely send and receive data from one system to another within a network .
Physical layer
Physical layer is responsible for physical connection between the devices .
It is also responsible for converting digital signal into electrical signal and transforming data into binary form like 0 &1 .
This layer also known as Bit Unit layer .
This layer communication between two devices will be wired or wireless .
Some components such as power plugs , connectors , receivers , cable type etc .
📌Example : When you connect your computer to a router using an Ethernet cable, the physical layer is responsible for the transmission of raw bits over the cable.
Functions :-
Physical Connection: The actual physical components used to transmit data, such as cables, connectors. These components are used for transmitting raw data between devices, for example, copper wires, fiber-optic cables, and wireless radio waves.
Data Rate: This determines the speed of data transmission over the network.
Transmission Mode: It specifies whether communication is simplex (one-way), half-duplex (both directions but not simultaneously), or full-duplex (both directions simultaneously).
Error Detection and Correction: Some error detection and correction mechanisms may be implemented at the Physical Layer. These mechanisms help ensure the integrity of the transmitted data.
Data Link layer
This layer is responsible for node to node data transfer and error detection and correction
They also ensure that data packets are sent to correct device on a local network .
It is also ensure there are no error in the data packets .
📌Example : When your computer communicates with a printer on the same network, the data link layer manages the data frames and ensures they reach the printer without errors.
OSI data link layer has two sublayer :
The Medium Access Control (MAC):- Media Access Control Layer controls how a computer on the network gains access to the data … and permission to transmit it.
The MAC sublayer is also responsible for the actual access to the network cable, or communication medium.The Logical Link Control (LLC) :- It is sublayer manages flow and error controls to ensure accurate data transmission between the network devices.
Network layer
Network Layer also known as the Packet Unit .
In layer switching and routing techniques are used .
This layer is to assign IP addresses to devices .
In the Network Layer , the data is in the form of data packets and the task of this layer is to facilitate the delivery of these data packets from one device to another device
📌 Example:
When you send a WhatsApp message:The Network Layer assigns an IP address to the message.
Routers find the best path to the recipient.
If one route is congested, it reroutes dynamically to ensure delivery.
💡 Analogy: Just like Google Maps finds the best road to your destination, the Network Layer finds the best path for data packets! 🚀
Functions :-
- Logical Addressing: Network layer is responsible for logical addressing. It assigns a unique ID to each device on Layer-3 network which we call IP Address.
Encapsulation: Network layer encapsulates Transport layer segments into Layer-3 Packets & forwards to Data Link Layer for further processing.
Transport Layer
The Transport layer operates at the heart of the OSI layer model, providing end-to-end communication services that guarantee data reliability and integrity.
The transport layer in osi model primary role involves segmenting larger messages into smaller packets, thus ensuring efficient transmission. Upon reaching the destination, the Transport layer reassembles these packets, reconstructing the original message.
Functions :-
Encapsulating application data for use by the Network layer
Enables multiple applications to communicate over the network at the same time on a single device
Ensures that, if required, all the data is received reliably and in order by the correct application .
Functions :-
Segmentation and Reassembling: A message is divided into segments . Each segment contains a sequence number, which enables this layer in reassembling the message. The message is reassembled correctly upon arrival at the destination and replaces packets that were lost in transmission.
Flow Control: In this layer, flow control is performed end to end rather than across a single link.
Error Control: Error Control is performed end to end in this layer to ensure that the complete message arrives at the receiving transport layer without any error.
Session Layer
Session Layer helps establish an active communication session between the users on different machines. Its main goal is to establish, maintain, and synchronize the interaction between both systems. The session layer is responsible for explaining the process of starting, controlling, and ending the conversations between the devices .
It defines standards for three modes of communication: full duplex, half-duplex, and simplex.
In the full duplex mode, both devices can send and receive data simultaneously. The internet connection is an example of the full duplex mode.
In the half duplex mode, only one device can send data at a time. A telephone conversation is an example of the half-duplex mode.
In the simplex mode, only one device can send data. A radio broadcast is an example of the simplex mode.
Functions :-
Session establishment and termination: The session layer establishes, manages, and terminates sessions between devices. When two devices wish to communicate, this layer initiates a session, ensuring that both parties are ready to exchange data. Once communication is complete, the session layer ensures the proper termination of the session.
Dialog control: In scenarios where multiple devices are engaged in communication, the session layer manages the orderliness of data exchange. It enables full-duplex or half-duplex communication, allowing devices to take turns and prevent data collision.
Synchronization: Interruptions in communication can lead to data corruption or misalignment. The session layer aids in reestablishing synchronization between devices. It ensures that data packets are delivered in the correct sequence, mitigating the impact of interruptions on the data exchange process.
Presentation Layer
The Presentation Layer, also known as the syntax layer, is responsible for encoding and decoding information so that it can be displayed in plaintext. The presentation layer is also responsible for compressing and decompressing data as it travels from one device to another.
Functions :-
Data Encryption/Decryption: Presentation Layer carries out encryption at the transmitter end and decryption at the receiver end to keep data secure during transmission.
Data Compression/De-compression: Presentation Layer compresses data to a small size to reduce resource usage such as data storage space or transmission capacity.
Data Translation: Converts data into a standardized format (e.g., EBCDIC to ASCII).
Application Layer
The application layer is the top layer of the Open Systems Interconnection (OSI) model, providing an interface between you and a web application.
This layer provides an access point for applications to communicate and access network services, facilitating user interactions. Applications such as email and web browsing must run.
Functions:-
Application Access: Provides an interface for applications to access network resources. Applications like email clients or browsers rely on this layer to send or receive data.
Error Handling and Recovery : Ensures reliable communication by detecting and correcting errors in transmitted data.
Service Advertisement : Enables applications to discover available services on the network, such as printers or file servers.
Protocol Management : Supports application protocols such as HTTP (for web browsing), SMTP (for email), and FTP (for file transfer).