6

I've heard someone say that a protocol higher up the osi model can encapsulate a lower protocol.

As far as I know, personally, a protocol can only encapsulate a same-level protocol or one at a higher level, i.e. you couldn't have Ethernet carrying ip, which in turn has another Ethernet frame encapsulated (and then IP, and the whole stack).

Could some clear the air?

Daniel
  • 333
  • 3
  • 11

2 Answers2

12

Yes, encapsulation hide the details of what is encapsulated and doesn't really care about the payload nature.

VxLAN is a sensible example of this, with layer2 (VLAN) being encapsulated in layer 4 (UDP).

JFL
  • 19,405
  • 1
  • 32
  • 64
9

Consider a package delivery service, like UPS or DHL. They don't care what's inside the box - they just make sure it gets to its destination. Similarly, the protocol doesn't care what the payload is. It doesn't have to be a higher layer.

The idea of a layered protocol model is that the "payload" of a layer can be anything. @JFL gave one example. IPSec VPN, MPLS, GRE, L2TP, Geneve, are others.

Ron Trunk
  • 66,852
  • 5
  • 65
  • 126
  • 1
    So one could, for example, ship a toy UPS truck via DHL. – Jonathon Reinhart May 11 '20 at 18:06
  • 1
    @JonathonReinhart The VPN example would be UPS truck delivering a (real, perhaps smaller) UPS truck with packages inside. – JoL May 11 '20 at 18:28
  • 1
    @JoL Perhaps more realistic analogy would be like how Airbus might uses [Airbus Beluga](https://en.m.wikipedia.org/wiki/Airbus_Beluga) to carry another Airbus aircraft fuselage or whole wing section so they can be reassembled elsewhere. – Lie Ryan May 12 '20 at 02:54
  • 2
    @JoL It's not a big truck. It's a series of tubes. – J... May 12 '20 at 19:49
  • @J... But the bandwidth of a UPS truck full of hard disks slowly rolling across the country is way higher than even a decent amount of fibre lines – Hagen von Eitzen May 12 '20 at 22:21