My understanding of the OSI model
Top-down
| # | Layer | Notes |
|---|---|---|
| 1 | Application | - Something like HTTP(s) |
| 2 | Presentation | - The S in HTTPS |
| 3 | Session | - It adds a session tag to the data - It cannot read data - It keeps track of state of the session |
| 4 | Transport | - Breaks data into segments - Each segment has: - port number (src & dst) - sequence number |
| 5 | Network | - Breaks segments into packets - Attaches IP addresses to the packet (src & dst) |
| 6 | Data | - Breaks packets into frames - Add the MAC address of the target machine |
| 7 | Physical | 010100010100010010001001 |
Bottom-up
- Data in the network goes to the all the connected devices.
-
- The Data layers knows the first frame by a special sequence of bits.
- Based on the MAC addresses other devices reject frames
- Data layer removes the MAC address from the frame
- Network layer check if the destination IP matches the current device or not
- Transport layer check the ports
- Session layer detects which session the data belongs to.
- Presentation layers decrypts the data (if applicable)
- YOUR APPLICATION