Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Could someone please explain the difference between tunnelling IP data using ICMP packets and tunnelling TCP data via ICMP?

Obviously I know this is going to be something relevant to the different OSI layers, but what actually is it which is done at a different layer?

I slightly understand the general concept of tunnelling, but not "tunnelling IP or TCP over ICMP", what is actually happening?

share|improve this question
Not answering the question, but tunneling TCP will result in that only CONNECTIONS in the TCP sense are tunneled, not DATAGRAMS like other ICMP traffic and UDP. – sinni800 Jan 8 '12 at 17:39

Tunneling IP data using ICMP packets

ICMP packets are used to encapsulate IP datagrams. This IP datagram may be: a UDP packet, part of a TCP segment, part of an SCTP/GRE/MPLS protocol data unit,or any other protocol higher than layer 2.

Tunneling TCP data via ICMP

ICMP packets are used to encapsulate TCP segments, or IP datagrams that consist only of TCP segments.

An ICMP echo request allows the sender to specify a payload. A "hack" of ICMP could, for example, exploit this fact and put a TCP packet in the payload. Something on the receiving end would have to know this and play the game as well. If you get creative with the other ICMP request types you probably could do a lot.

A great example of twisting a protocol towards a use it wasn't intended is iodine ( which tunnels IP over DNS requests.

(Side note: note that there is a "protocol field" in the IP header that identifies what upper layer protocol is being transported. TCP is protocol #6, GRE is protocol #47, etc. (

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.