Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can someone please explain in terms of the OSI (or TCP/IP) layers, what is the difference with what goes on when you tunnel IP or TCP, say over the ICMP protocol (although the latter doesnt really latter i dont think) ?

share|improve this question
up vote 2 down vote accepted

Tunneling is the process in which one layer is encapsulated in the payload of another layer. In the OSI model.

IP Tunneling: Suppose you tunnel an ip packet inside another ip packet. On the left you can see the packet to be encapsulated and on the right this packet is added as payload to another IP packet.

enter image description here

On the receiving end the process is reversed and the payload packet is sent to the higher layers of stack.

IP tunneling can be of many types ip over ip , ip6 over ip , ip over ip6.

In TCP tunneling the same process is done at TCP level.

TCP tunneling is generally used for port forwarding because traffic can be selectively forwarded based on destination port.

Here are some nice articles:

IP Tunneling.

TCP Port Forwarding:

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .