The 7 Layers of the OSI model explains how the data flow from one application to another application in a computer network? what are the different mechanisms the data has to go through in order to get transmitted?
According to Wikipedia-
The Open Systems Interconnection model is a conceptual model that characterizes and standardizes the communication functions of a telecommunication or computing system without regard to its underlying internal structure and technology
Let’s see what are the different seven layers of the OSI model.
1. Physical Layer
The physical layer is OSI layer 1 responsible for the movement of individual bits from one node to another. It actually focuses on physical devices and physical connection between them.
- physical characteristics of interfaces and medium.
- representation of bits 0 and 1.
- data rate– bits/second.
- synchronization of bits(clock synchronization).
- line configuration(point to point, point to multi point).
- physical layer OSI topology(star, bus, ring, mesh, hybrid).
- transmission mode(simplex,half-duplex,full-duplex).
2. Data Link Layer
The data link layer is OSI layer 2 responsible for moving frames from one node to another error-free.
- Creation of the frame.
- Bit oriented-101101.
- byte/character-oriented- FLAG ESCAPE.
- Physical addressing (mac address) 6 bytes or 48 bits.
- Flow control – Rate at which data is absorbed in the receiver. Example: stop and wait protocol, go back N ARQ, selective repeat ARQ.
- Error control – A mechanism to make the data transmission reliable by detecting error due to noisy channel. If an error is detected then re-transmission of frames. Ex- ARQ-automatic repeat request.
Error control technique:-Hamming code, CRC(cyclic redundancy check), checksum.
- When two or more devices are connected to the same link then data link layer protocol are necessary to determine which device has control over the link at any given time.
3. Network Layer
The network layer is OSI layer 3 responsible for the delivery of individual packets from source host to the destination host. It determines the path or different routing protocols for the efficient transmission of data.
- Logical addressing. IP address- ipv4 is 32bits and ipv6 is 128bits.
- Routing– Determining the shortest path between the source node to the destination node. Algorithms-Dijkstra’s (link-state) and Bellman-Ford (Distance vector).
- Network layer protocols are the point to point, point to multi-point.
4. Transport Layer
The transport layer is OSI layer 4 responsible for delivery of segment from one process to another.
- Service point addressing– Computer runs several programs at the same time. Delivery means not from one computer to another computer rather from a specific process to another process in another computer. Example-web browser HTTP.
- Segmentation and reassembly– Message are divided into multiple segments.
- Connection control– UDP(Connection-less),TCP(Connection-oriented).
- While transferring segment transport layer security is also a bit concerned.
5. Session Layer
The session layer is OSI layer 5 responsible for dialogue control and synchronization.
- Dialogue control– Allow communication between two system to take place either half duplex or full duplex.
- Synchronization– Synchronize data from transmitter to receiver.
6. Presentation Layer
The presentation layer is OSI layer 6 responsible for translation, compression, and encryption. It is also known as Translation layer.
- Translation– Exchange of information from one data type to another data type.
- Encryption– privacy, security.
- Compression– Big to small. Example- .zip,.rar.
7. Application Layer
The application layer is the 7th OSI layer responsible for providing services to the user. The application layer gateway service helps in internet connection sharing and support for third party plugins. The application layer firewall may be implemented through software.
- File transfer- FTP.
- Mail service- SMTP.
- Remote login- TELNET, SSH.
- Web browser- HTTP.
- NETWORK VIRTUAL TERMINAL.