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
    May 11 '20 at 18:23
  • Thanks for the question that allowed me to reach the 15K milestone ;)
    – JFL
    May 12 '20 at 13:06
  • 2
    SSL VPNs are a well known example of this.
    – Barmar
    May 12 '20 at 17:03
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
    May 11 '20 at 20:28
  • 5
    You may also hear this concept called tunnelling. May 11 '20 at 23:51
  • 3
    It sucks that you can't encapsulate PoE over TCP/IP though...
    – Dai
    May 12 '20 at 17:09
  • @Dai yeah 802.3at over IP over 802.11...
    – JFL
    May 12 '20 at 19:10
  • You can, but the frame size limitations are killer in that particular application.
    – William
    May 12 '20 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. 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 to carry another Airbus aircraft fuselage or whole wing section so they can be reassembled elsewhere.
    – Lie Ryan
    May 12 '20 at 2: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 May 12 '20 at 22:21

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.