Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

gretap Ethernet tunnels not fragment packets + other issues

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
3 posts • Page 1 of 1
Author
Message
alex6z
Tux's lil' helper
Tux's lil' helper
Posts: 119
Joined: Wed Jul 20, 2005 3:13 pm

gretap Ethernet tunnels not fragment packets + other issues

  • Quote

Post by alex6z » Mon Dec 29, 2014 3:28 am

There is an obscure feature in Linux and iproute2 called gretap that lets you create a virtual Ethernet tunnel, over at least IPv4. Unlike GRE which encapsulates packets and sends them through a point-to-point link, but cannot be bridged in an Ethernet bridge, gretap encapsulates the entire Ethernet frame which is 18 bytes (or 22 with VLANs) on top of the packet that it contains. This type of tunnel can be bridged and added to a Linux Ethernet bridge. It's a really easy way to connect Ethernet networks through the Internet, or at least it should be easy.

There are a lot of problems.

The way I see it, an Ethernet tunnel should not inspect the contents of the packets other than the Ethernet frame, it should allow a 1500 byte MTU size in order to be compatible with standard Ethernet networks, it should fragment packets or allow fragmentation as necessary to maintain that 1500 byte MTU, and it should have nothing to do with ICMP or any other layer 3 protocols. Ethernet networks don't support fragmentation or error reporting or making decisions based on the contents of Ethernet frame payloads, and neither should the tunnel.

1) My 1st issue is that the default gretap interface MTU is 1462. But I have to lower the MTU to 1424 or more or there are major problems with TCP connections not working. Sending packets that are larger than 1386 bytes with ping -s 1358 results in the packets being dropped. This value was 1424 earlier today.

2) The gretap interface appears to set the TTL of generated packets to the TTL of encapsulated Ethernet+IPv4 frames. It should not do this! traceroute now shows 14 empty hops from arriving at my tunnel provider to the other end of the tunnel. Basically, packets must have 14 TTL hops left when they reach my tunnel server or they won't make it through. This is an Ethernet tunnel! There are no routers, or hops, or TTL values at all!

3) It will not fragment packets on its own, and as the links below explain, even though there is a do not fragment nopmtudisc option set, it wall turn it back on again and so the IP layer won't fragment it either! The gretap device should just generate packets that are larger than 1500 bytes and the IP layer (which allows 65535 byte packets) would just generate fragmented IP packets. I know TCP/IP has path MTU discovery and the don't fragment bit exists for a reason, but is it good to relay on that and there should be a way to force fragmentation anyway.

This article talks a lot about the Don't Fragment flag, and how the packets generated by the tunnel are having the DF flag set based on inspecting the contents of the packet, which it shouldn't be doing right?
http://backreference.org/2013/07/23/gre ... d-nfqueue/

This describes a bug about gretap not fragmenting packets. Apparently it hasn't been fixed.
https://bugzilla.kernel.org/show_bug.cgi?id=14837


It looks like it may be possible to get it working after going to a whole lot of trouble, but is this the best way? It seems like the gretap driver needs to be overhauled. A kernel patch would be really nice! Has anyone else had experience with these issues?

Thanks
Top
AngelKnight
Tux's lil' helper
Tux's lil' helper
Posts: 127
Joined: Tue Jan 14, 2003 3:21 am

  • Quote

Post by AngelKnight » Tue Jan 06, 2015 9:39 am

If you're still doing this, save yourself some trouble and use OpenVPN to bridge two segments together. By default it will emulate a 1500MTU-clean link by conducting fragmentation-and-reassembly on its own.
Top
alex6z
Tux's lil' helper
Tux's lil' helper
Posts: 119
Joined: Wed Jul 20, 2005 3:13 pm

  • Quote

Post by alex6z » Thu Feb 26, 2015 5:16 am

I've read about another program called vtun. Do you know if it can is also a good choice?
Top
Post Reply

3 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic