Tunneling vs Regular Encapsulation – Key Differences

protocol-theorytunnel

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.

Best Answer

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.

Related Topic