Every explanation about the OSI Model (or other Models) always gives me the impression that the data (PDU) from the top layer (Application Layer, L7) always go through all of the layers until the bottom layer (Physical Layer, L1).

Does the PDU always go through all the 7 layers in the OSI Model? Or we can choose until which layer we want to apply our communication protocol?

These examples might explain more about my confusion.

Let's say I have an IPSec (Network Layer, L3) hardware on an FPGA. IPSec provides many Security Services already. Does it mean I bypass the Datalink Layer?

Another example is when we are communicating via SSL. Does it mean I bypass all the layers after it except the Physical Layer?

  • 8
    The OSI model is a way of conceptualizing networking. It is not a specification to which code has been written or the Internet has actually been designed. Don't take it too literally. – Michael Hampton Jul 13 '18 at 17:10
  • 1
    As @MichaelHampton points out, get the ideas of abstraction and encapsulation from the OSI or IP models, but don't believe that is exactly what happens in the real world. OSes do not implement separate layers 5 to 7. Some applications may implement separate layers 5 to 7, e.g. web browsers, but most do not. The IP model is closer to reality, but there are many exceptions to it. – Ron Maupin Jul 14 '18 at 16:20

No layer gets bypassed. Here is a good visualization from https://www.webopedia.com/quick_ref/OSI_Layers.asp:

OSI Layers

  • So, let's say I have two FPGAs communicating via IPSec. Do I bypass the Datalink Layer and go directly to Physical Layer? Ofcourse we always use Physical Layer. – Codelearner777 Jul 14 '18 at 11:13
  • It is a conceptual model. Nothing is bypassed. In reality everything is physical, right? – Mark Wagner Jul 17 '18 at 17:14

Capture some actual packets on a physical interface with some VPN traffic. Dissect the capture with Wireshark. You will see encapsulation, the data contents of the lower layer containing the necessary upper layers.

So, you might have Ethernet, containing IP UDP, containing an encapsulation header, containing IP TCP, containing data.

  • The Ethernet frame is still required to traverse the physical link.
  • IP UDP at layer 3 routes to the VPN end point. This might go through routers of the underlay network.
  • IP TCP at layer 3 contains the tunnel network. The unwrapped packet is routed to its destination.

That's just enough layers to get the job done. Note how the VPN routes without caring about the higher layers of the application. It does not matter that the data happens to be HTTPS protocol, with its own added features like TLS encryption. It could just as easily be the archaic Daytime Protocol, very simple and probably just one packet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.