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
  • 332
  • 1
  • 3
  • 12

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,884
  • 1
  • 36
  • 68
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
  • 68,291
  • 5
  • 66
  • 126