You are not logged in.

#1 2012-10-20 22:09:18

digitalone
Member
Registered: 2011-08-19
Posts: 310

[SOLVED] Can't change MTU permanently with systemd

Hi everyone!
I'm moving from initscript to systemd.

I'm in the 2.2 phase described here.
As you know, rc.local is not supported with a pure systemd installation.

I used wicd daemon with initscript and now use wicd.service with systemd.
My network connection has a Maximum Transfer Unit (MTU) size of 1492 bytes. I don't know why, but Arch doesn't remember the exact MTU value, so every restart I'd have to write one of the following commands under root.

ip link set wlan0 mtu 1492

or

ifconfig wlan0 mtu 1492

rc.local saved me! Because i added ifconfig wlan0 mtu 1492 inside and it set the right value every reboot.
But now I'm trying to moving to pure systemd installation without rc.local, so how can I set automatically the right MTU value at boot?

I can't do it! I tried also to set nooption interface_mtu in /etc/dhcpcd.conf but doesn't work the same...

Please, help me, don't let me go back to initscript because of a stupid MTU value!
How do you change your MTU value? Which value do you use and how you manage it?

Thanks...

Last edited by digitalone (2012-10-21 06:40:33)

Offline

#2 2012-10-20 23:55:03

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] Can't change MTU permanently with systemd

I have a mostly useless answer for you: use netcfg, and build your mtu thing into your profile.

In this context, "mostly" means "doesn't wicd have some customisation options like netcfg?"

If only I had used wicd... even once...

Offline

#3 2012-10-21 00:09:46

progandy
Member
Registered: 2012-05-17
Posts: 5,003

Re: [SOLVED] Can't change MTU permanently with systemd

If wicd does not support it, then you should add the command with a post connection script.
https://wiki.archlinux.org/index.php/Wicd#Scripts


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2012-10-21 06:36:57

digitalone
Member
Registered: 2011-08-19
Posts: 310

Re: [SOLVED] Can't change MTU permanently with systemd

tomk wrote:

I have a mostly useless answer for you: use netcfg, and build your mtu thing into your profile.

I haven't netcfg.

tomk wrote:

In this context, "mostly" means "doesn't wicd have some customisation options like netcfg?"

Yes, it has, but mtu is not in wicd options. You can set dns, IP, subnetmask, etc., but not mtu.

progandy wrote:

If wicd does not support it, then you should add the command with a post connection script.
https://wiki.archlinux.org/index.php/Wicd#Scripts

Thanks! It worked!
I created an executable mtuchange.sh in /etc/wicd/script/preconnect with the following two lines:

ifconfig wlan0 mtu 1492
ifconfig eth0 mtu 1492

MTU is set correctly now.

Offline

Board footer

Powered by FluxBB