OSI Model

截屏2021-03-14 15.16.23
Layer NrLayer Name
7Application
6Presentation
5Session
4Transport
3Network
2Data Link
1Physical

Mnemonic

截屏2021-03-14 15.18.03

How does Data Flows the OSI Model Layers?

Client makes request to server

OSI_client2server

Server response

OSI_server2client

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.

截屏2021-03-14 15.39.23

LayersSenderReceiver
Applicationgenerate dataread data
Presentationencrypt and compress datadecrypt and decompress data
Session
Transportchoke up data into segmentsput segments together
Networkmake packetsopen packets
Data Linkmake framesopen 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

    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

OSI_transport

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
OSI_Network
  • 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

    OSI_DataLink

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.

MAC_address

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

OSI_physical

Reference

  • OSI Model 👍