What is OSI Layer? Explaination of OSI Seven Layers.
The standard form of OSI is Open System Interconnection Model. This model is a conceptual and logical architecture that defines network communication used by systems open to interconnection and communication with other systems.
If the data is moving from layer 7 to layer 1 that happened receiving end.
If the data is moving from layer 1 to layer 7 that happened sending end.
1. Physical Layer
The main functionality of the physical layer is to transmit the individual bits from one node to another node.- It establishes, maintains and deactivates the physical connection.
- It defines the data transmission mode whether it is simplex, half-duplex or full-duplex mode between the two devices on the network.
- It defines the way how network devices are arranged( Topology ).
- In this layer, the modulation process occurs with analog to digital or digital to analog conversion.
- Devices like, Hubs, Repeaters, coaxial cable, twisted pair cable, optical fiber, wifi work here.
2. Data Link Layer.
- In this layer, data converted into frames
- Source MAC( Media Access Control) Address+ Destination MAC (Media Access Control) Address header is added/removed with frame.
- It performs Error Detection & not correction and ensures the error-free transfer of data frames. If any error seems to occur, then the receiver sends the acknowledgment for the retransmission of the corrupted frames.
- It also provides data flow control. Control constant of data flow rate different types of devices like a supercomputer to a personal computer data flow like a water tap.
- Device Switch used this layer.
3. Network Layer
- In this layer, converted into Packets
- Source + Destination IP address header added/removed with the packet.
- Router work on this layer, and select the best available path for the packet to travel. It uses Logical Addressing(IP Addressing) to identify the device on the internet and establish a connection between different devices.
4. Transport Layer
- In this layer, data converted into segments
- TCP OR UDP header added with the segment.
- TCP Protocol uses for reliable data transmission because of the 3-way handshake, flow control. SMS sending use this protocol because all data packet should be sent perfectly.
3 Way Handshake
PC ------------ Sync-------------------- > Server
(Synchronization:- I want to establish communication with you)
PC<--------------------Sync-Ack---------------------Server
(I also start a sync with you)
PC-------------Ack------->Server
( Acknowledgment:- I got it now start the communication )
It will be in every single time when communication happens.
- UDP Protocol for use unreliable & connectionless, used in LIVE SCENARIOS. voice calling by skype use this protocol because if some data packet is missing nothing happens in communication.
- Different types of port use this layer like SMTP port 25 and HTTP port 80. Total port 65535 where reserved port 0-1023
5. Session Layer
Session Layer: This layer establishes, manages, and terminates sessions between Peer to Peer. For example, if you loge in two different ids in the same browser it creates two different sessions.6. Presentation Layer
- It represents converting data into a standard format which may include. JPEG, MPEG, BMP, MIDI, WAV, MP3
- Encryption process work in this layer.
- The data compression process is used for compressing data and transmitting data
7. Application Layer
This layer is concerned with user interaction with the computer and the network. It acts as an interface between the actual application program.HTTP, HTTPS, FTP
Summarization
First, you want to communicate with your neighbor system, you need a physical connection.i.e Cables, coax—-> Physical layer
Even though you are connected physically, you need a Physical address or your device address.
i.e MAC —-> Datalink Layer
Now you've got a MAC and Physical Address, all you need is a logical address
i.e IP —-> Network Layer
Now, you have a good setup of network with physical links and address but how do you communicate or transfer data to the destination address?
All you need is a protocol that transfers data from your address to the destination address.
i.e TCP, UDP —-> Transport Layer
There should be an intermediate node which manages the setting up and taking down of the association between two communicating endpoints that are called a connection.
i.e SIP, RTP —-> Session Layer
there should be a node that translates those 1’s and 0’s to plain text (human-readable format) and if necessary compression and decompression. This is done by the presentation layer
i.e Jpeg, Mpeg, Txt, Mp3 —-> Presentation Layer
Finally, What you see in your monitor is that the final application and therefore the results of the mix of all these protocols.
This can be done by some specific protocols…
HTTP, HTTPS,FTP —-> Application Layer