DhavalKapil / icmptunnel

Transparently tunnel your IP traffic through ICMP echo and reply packets.
https://dhavalkapil.com/icmptunnel/
3.06k stars 342 forks source link

Change the MTU size of tunnel #23

Closed LiYaoYu closed 7 years ago

LiYaoYu commented 7 years ago

Since the ethernet MTU is up to 1500, if we add the ip and icmp header to the origin packet (read from tunnel), the packet size will up to 1528, and thus it cannot pass the ethernet without jumbo frame.

What I did is to decrease the MTU size of the tunnel to 1472, so that after we add the ip and icmp header to the packet, the maximum size of the packet won't be larger than 1500, thus it can fit the general ethernet scenario.

DhavalKapil commented 7 years ago

Thank you 😄 I thought about it initially. But when it worked fine with 1500 MTU, I just got a little lazy :)