OSI Model

Layer Nr | Layer Name |
---|---|
7 | Application |
6 | Presentation |
5 | Session |
4 | Transport |
3 | Network |
2 | Data Link |
1 | Physical |
Mnemonic

How does Data Flows the OSI Model Layers?
Client makes request to server

Server response

The round trip of how data flows through all these seven layers on both sides is a physical path, on which data actually and physically flows.
The OSI model also addresses another aspect how data flows on a logical path, layer to layer commnunication.
Layers | Sender | Receiver |
---|---|---|
Application | generate data | read data |
Presentation | encrypt and compress data | decrypt and decompress data |
Session | ||
Transport | choke up data into segments | put segments together |
Network | make packets | open packets |
Data Link | make frames | open frames |
Physical |
OSI Model Layer by Layer
Application Layer
Non-technical: user’s application (E.g. Chrome, Firefox )
Technical: refers to application protocols
- E.g. HTTP, SMTP, POP3, IMAP4, …
- Facilitate communications between application and operation system
Application data is generated here
Presentation Layer
Provides a variety of coding and conversion functions on application data
Ensure that information sent from the application layer of the client could be understood by the application layer of the server
$\rightarrow$ Try to translate application data into a certain format that every different system could understand
Main functions
- Data conversion
- Data encryption
- Data compression
Protocols
- Images: JPEG, GIF, TIF, PNG, …
- Videos: MP4, AVI, …
Session Layer
Establish, manage, and terminate connections between the sender and the receiver
An intuitive example
Telephone call is a good example to explain session layer: First establish the connection and start the conversation. Then terminate the session
Transport Layer
Accept data from Session layer
Choke up data into segments
Add header information
- E.g. destination port number, source port number, sequence number, …
Protocols: TCP and UDP

Network Layer
- Protocol: Internet Protocol (IP)
- Take segment from Transport layer and add extra header information
- E.g. sender’s and receiver’s IP address
- Create packet

Data Link Layer
When IP packet arrives at this layer, more header information will be added to the packet
- E.g. source and destination MAC address, FCS trailer
Ethernet frames are created
MAC address is physical address for your Network Interface Card (NIC). At this layer, NIC has crucial job of creating frames on the sender side, and reading or destroying frames on the receiver side.

Physical Layer
Accept frames from Data Linker layer and generate bits
These bits are made of electrical impulses or lights
Through the network media, the data travels to the receiver
$\rightarrow$ It completes the whole journey of seven layers on the sender side

Reference
OSI Model 👍