Discussion:
Controlling IPv6 MTU
(too old to reply)
Roy Marples
2012-05-25 08:23:08 UTC
Permalink
Hi List

Currently, userland can only set the interface MTU SIOCSIFMTU.
IPv6 has it's own idea of what the MTU should be according to Router
Adverts,
but there is no way of setting this outside of the RA itself.

I'm currently debugging dhcpcd with it's own RA implementation of
handling
addresses and routes and this is one wall I'm hitting as my local setup
requires a lower MTU than 1500 and forcing a lower MTU for IPv4 isn't
desirable.

Attached is a patch which adds SIOCSIFMTU_IN6 which I have not tested a
lot
as I only just got home to a workable IPv6 network from a nice holiday
but
I'd like eyes on it to spot anything wrong as I've never had to extend
a kernel
struct or add a new ioctl before.

Thanks

Roy
Matt Thomas
2012-05-25 12:03:06 UTC
Permalink
Post by Roy Marples
Hi List
Currently, userland can only set the interface MTU SIOCSIFMTU.
IPv6 has it's own idea of what the MTU should be according to Router Adverts,
but there is no way of setting this outside of the RA itself.
I'm currently debugging dhcpcd with it's own RA implementation of handling
addresses and routes and this is one wall I'm hitting as my local setup
requires a lower MTU than 1500 and forcing a lower MTU for IPv4 isn't desirable.
Attached is a patch which adds SIOCSIFMTU_IN6 which I have not tested a lot
as I only just got home to a workable IPv6 network from a nice holiday but
I'd like eyes on it to spot anything wrong as I've never had to extend a kernel
struct or add a new ioctl before.
Thanks
Roy<ipv6-mtu.diff>
I'd prefer to see the mtu be unsigned in the ioctl.
You should also make sure the mtu for ipv6 is not greater than the interface's mtu.

I'd personally add a inline to get do if_to_in6_extra(ifp) instead of having that ugly cast everywhere.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
David Young
2012-05-30 15:34:40 UTC
Permalink
Post by Roy Marples
Hi List
Currently, userland can only set the interface MTU SIOCSIFMTU.
IPv6 has it's own idea of what the MTU should be according to Router
Adverts,
but there is no way of setting this outside of the RA itself.
I'm currently debugging dhcpcd with it's own RA implementation of
handling
addresses and routes and this is one wall I'm hitting as my local setup
requires a lower MTU than 1500 and forcing a lower MTU for IPv4
isn't desirable.
Attached is a patch which adds SIOCSIFMTU_IN6 which I have not
tested a lot
as I only just got home to a workable IPv6 network from a nice
holiday but
I'd like eyes on it to spot anything wrong as I've never had to
extend a kernel
struct or add a new ioctl before.
It sounds to me like you may intend to set an MTU on a per-interface
basis that is actually applicable (or not) on a per-destination basis.

Why don't you use the MTU in the RA to set the initial MTU on the routes
that dhcpcd installs?

Dave
--
David Young
***@pobox.com Urbana, IL (217) 721-9981

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Ignatios Souvatzis
2012-05-31 04:59:49 UTC
Permalink
...
Post by David Young
Post by Roy Marples
I'm currently debugging dhcpcd with it's own RA implementation of
handling
addresses and routes and this is one wall I'm hitting as my local setup
requires a lower MTU than 1500 and forcing a lower MTU for IPv4
isn't desirable.
...
Post by David Young
It sounds to me like you may intend to set an MTU on a per-interface
basis that is actually applicable (or not) on a per-destination basis.
Why don't you use the MTU in the RA to set the initial MTU on the routes
that dhcpcd installs?
Seconded. If you want to have it v6-specific, the route is the place
to do it...

-is
--
seal your e-mail: http://www.gnupg.org/

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Roy Marples
2012-06-01 09:52:50 UTC
Permalink
Post by David Young
It sounds to me like you may intend to set an MTU on a per-interface
basis that is actually applicable (or not) on a per-destination basis.
Why don't you use the MTU in the RA to set the initial MTU on the routes
that dhcpcd installs?
Now that's a good idea! I didn't even know you could set MTU on a per
route basis.

Thanks

Roy

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...