2

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?

Thanks.

5

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 - if you visualize the layers lying cleanly on top of each other, each layer interfacing with and using the layer below for service, tunneling connects layers out of that order.

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.

Back when IPX was popular, running it across IPsec VPN required nested tunneling. IPsec doesn't support IPX payloads, so inside the IPsec tunnel you had to create an additional PPTP tunnel that could carry IPX traffic. So, the complete chain was IPX-over-PPTP-over-IPsec.

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

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.