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?

3
  • I have seen, as a proof-of-concept, IP encapsulated in MIME, attached to emails, delivered over SMTP.
    – Vatine
    Commented May 11, 2020 at 18:23
  • Thanks for the question that allowed me to reach the 15K milestone ;)
    – JFL
    Commented May 12, 2020 at 13:06
  • 2
    SSL VPNs are a well known example of this.
    – Barmar
    Commented May 12, 2020 at 17:03

2 Answers 2

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).

5
  • 3
    Some other examples: IP over DNS; or IP over PPP over SSH; or Ethernet over HTTPS.
    – david
    Commented May 11, 2020 at 20:28
  • 5
    You may also hear this concept called tunnelling. Commented May 11, 2020 at 23:51
  • 3
    It sucks that you can't encapsulate PoE over TCP/IP though...
    – Dai
    Commented May 12, 2020 at 17:09
  • @Dai yeah 802.3at over IP over 802.11...
    – JFL
    Commented May 12, 2020 at 19:10
  • You can, but the frame size limitations are killer in that particular application.
    – William
    Commented May 12, 2020 at 20:22
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.

5
  • 1
    So one could, for example, ship a toy UPS truck via DHL. Commented May 11, 2020 at 18:06
  • 1
    @JonathonReinhart The VPN example would be UPS truck delivering a (real, perhaps smaller) UPS truck with packages inside.
    – JoL
    Commented May 11, 2020 at 18:28
  • 1
    @JoL Perhaps more realistic analogy would be like how Airbus might uses Airbus Beluga to carry another Airbus aircraft fuselage or whole wing section so they can be reassembled elsewhere.
    – Lie Ryan
    Commented May 12, 2020 at 2:54
  • 2
    @JoL It's not a big truck. It's a series of tubes.
    – J...
    Commented May 12, 2020 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 Commented May 12, 2020 at 22:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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