The ISO/OSI reference model

The ISO/OSI model defines 7 layers, the 5 mentioned above plus 2 more between application and transport:

  • presentation: allowing applications to interpret meaning of data, such as: encryption, compression, machine-specific conventions, etc.
  • session: synchronization, checkpointing, recovery of data exchange
  • The Internet stack, as a practical approach, does not implement these layers!
    • These services, if needed, must be implemented in the application layer
    • The question is: are they really needed?
Picture showing the ISO/OSI reference model and some devices or applications related to it. For example, routers functionality is focused of layer 3 or Network layer, while the email or web searching in Google is layer 7 or Application layer.
The ISO/OSI reference model defines 7 layers, from top to bottom: Application, Presentation, Session, Transport, Network, Data Link and Physical layer. Hosts usually implement all of them, while forwarding devices usually implement just the last three ones. The data unit (or protocol message) used in each of the layers is called typically “Data” for Application, Presentation and Session layers; “Segment” for the Transport layer, “Packets” for the Network layer; “Frame” for the Data Link layer and “Bits” for the Physical layer.

Let us now examine how a message “M” would be sent from a source to a destination computer. The original message “M” is sent from the application to the transport layer. The transport layer includes its own transport header “Ht” to distinguish different messages arriving from the application layer. For example, this header could contain a sequence number or some identification number. Afterwards, it sends both the header and message to the network layer.

The network layer receives “Ht+M”, although it will not be aware of what part is the original message. It then adds its own network header “Hn” and sends it down to the link layer, which finally receives “Hn+Ht+M” and adds its link layer header “Hl”. The link layer sends it to the physical layer, which will not add any additional information. The physical layer is in charge of transmitting every bit of the chunk of bytes represented by “Hl+Hn+Ht+M”.

This operation of adding headers to a message in each protocol layer is called packet encapsulation.

The receiver of these bits, will apply the opposite operation, decapsulation, taking out the headers for each protocol until it obtains the original message “M”.

When a user sends some data to some other user, this data is sent at layer 7 or Application layer, layer 6, 5, etc. will include its own information to the data, increasing it in size. This is called “encapsulation”. Finally, the data is sent bit by bit via the physical link. Once received, the process is reversed, taking out the added information in each layer, until the receiver gets the original data sent, which is called “decapsulation”.
Picture showing an example of encapsulation of “Data” with UDP as Transport protocol and IP as Network protocol.

Notice that not all devices in the network need to implement all the protocol layers. For example, a router just implements 3 layers, as it does not need transport or application, and a switch does not even need the network layer, as it does not route packets among different networks.

Question

If an email “M” from source contains 123 bytes, the transport header “Ht” size is 10 bytes, the network header “Hn” size is 20 bytes and the link header “Hl” size is 16 bytes.

  1. What is the actual number of bits sent in the communication line towards destination? (Remember 1 byte = 8 bits)
    1. 123
    2. 169
    3. 1352
    4. 984
  2. Check answer
  3. How many bytes does the destination receive at application layer level?
    1. 123
    2. 169
    3. 1352
    4. 984
  4. Check answer
Project

  • University of Boras logo
  • UHI logo
  • Alcala University logo
  • Digital connextions logo

This resource was developed as part of an Erasmus+ project, funded with support from the European Commission under grant agreement 2016-1-SE01-KA203-22064.

The project was a collaboration between:

  Creative Commons License

This resource has been released under Creative Commons license CC-BY-SA 4.0.

Contact

  • University of Boras logo
  • UHI logo
  • Alcala University logo
  • Digital connextions logo

If you would like more information on this resource please contact:

  • Academic content – The University of Alcalá (https://www.uah.es/en/)
  • Technical resource development – The University of the Highlands and Islands Educational Development Unit - EDU (edu@uhi.ac.uk)
Disclaimer

  • University of Boras logo
  • UHI logo
  • Alcala University logo
  • Digital connextions logo

Except where otherwise noted, this website is licensed under Creative Commons license CC-BY-SA 4.0. All images used under permission remain the copyright of the license holder.

PDF

  • University of Boras logo
  • UHI logo
  • Alcala University logo
  • Digital connextions logo

Download a copy of this resource in PDF format.

You can also print individual pages by printing directly from the browser.

×