What are the difference between tunneling (https://en.wikipedia.org/wiki/Tunneling_protocol) and regular encapsulation (e.g. TCP/UDP over IP, HTTP/SSH over TCP)?

Is TCP/UDP over IP considered tunneling?

Is HTTP/SSH over TCP considered tunneling?



Encapsulation is the normal method of using a lower layer mechanism for moving your data. E.g. HTTP is encapsulated by TCP, TCP is encapsulated by IPv4, IPv4 is encapsulated by an Ethernet frame.

Encapsulating backwards or at the same layer - IP in GRE, IP in IPsec, IP in UDP, Ethernet in L2TP, ... is called tunneling. It somewhat ties a knot in your layering model.

The most common use for tunneling is to allow you to pass packets/frames across a network that doesn't support the protocol or addressing scheme. You can tunnel private IP address packets across a public IP network, IPv4 over an IPv6 network or vice versa, Ethernet frames across a layer-3 connection, and so on.

  • Thanks. What does "It somewhat ties a knot in your layering model" mean? – Tim Mar 18 at 22:38
  • 1
    He means that tunneling does not fit into the OSI or TCPIP model very well. – Ron Trunk Mar 19 at 0:54

For me tunnelling is when you have another level of routing and once you reach one destination of one of the layers the datagram progress to another destination, for example when you have two IP layers on the same datagram, and encapsulation is just put information over TCP/UDP, that basically is put information to be read on the destination. Probably other users have better responses and with more detail

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.