From: oskar@cetex.se
To: <netdev@vger.kernel.org>
Subject: sysctl to clamp mtu on all application-initiated sockets?
Date: Sun, 16 Nov 2014 01:28:43 +0100 [thread overview]
Message-ID: <c630392f593e5a8891d09339cc4becf0@cetex.se> (raw)
Hi!
I'm trying to setup routers that should be able to forward
jumbo-packets, but applications should not get jumbo-capable sockets.
The major brands of routers support something like this. You set mtu
for forwarding to something big (8192, 9000) but don't touch the system
mtu of 1500.
Management-traffic, routing protocols and such communicate with
<=1500byte packets, but the router can forward frames up to <big> mtu
size if other machines feel like using them.
The only ways I've found to do this is either through mss-clamping in
iptables (+ some iptables rule that drop other packets and return ICMP
Packet too big), or update each route on the router with an MTU
argument, but it feels clunky and i believe this will cause quite some
overhead which would impact forwarding-performance of the router
negatively, It's also not nice to change tcp packet values on the fly.
(The MTU on routes-path is quite a lot of work when running IPv4 DHCP
client + IPv6 RA-learned routes + full BGP table on multiple boxes, it's
easy to miss something)
So, is it possible to create something like
/proc/sys/net/ipv*/max_socket_mtu that would clamp the MTU of all
created sockets to some nice value?
It should also be possible to override this clamping on a per-socket
basis (and use up to link-layer MTU size) by setting a flag or such on
the socket, for example tunnels.
I need to solve this some how for forwarding + VXLAN, but I believe
this would also apply to and simplify management of other tunnel
techniques. The tunnel interface should be able to transmit encapsulated
packets using up to link-layer MTU size inside my datacenter/network,
but applications on the same machine shouldn't when sending data
somewhere since it would cause extra roundtrips / broken sessions when
oversize packets are being dropped somewhere else in the network / on
the Internet.
Best regards
Oskar Stenman
reply other threads:[~2014-11-16 0:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c630392f593e5a8891d09339cc4becf0@cetex.se \
--to=oskar@cetex.se \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox