[Solved] Where can I set MTU premanently ?

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
kamyar

[Solved] Where can I set MTU premanently ?

Post by kamyar »

Hi Team,

>HARDWARE
I have a Realttek 8111E and as the owners know, by default it loads the bad driver r8169.

>DRIVER
Old driver: r8169 ver: 2.3LK-NAPI port: d000 bus-ID: 03:00.0
So I installed the proprietary driver instead :
New driver: r8168 ver: 8.038.00-NAPI port: d000 bus-ID: 03:00.0
It works fine.

>MTU
My optimzed MTU is 1492.
Work fine loaded manualy throught :
sudo ifconfig eth0 mtu 1492;

>PROBLEM
I am desperately trying to set my MTU to 1492 (instead of 1500)
1./ /etc/rc.local :
ifconfig eth0 mtu 1492
# before the exit 0
=>Fails the whole ETH0

2./ /etc/dhcp/dhclient.conf
default interface-mtu 1492;
supercede interface-mtu 1492;
# just before the request line
=>Fails the whole ETH0

3./ /etc/network/interfaces
post-up /sbin/ifconfig eth0 mtu 1492
and also
mtu 1492
=>Remains at 1500

Thanks for your advice.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
PatH57

Re: Where can I set MTU premanently ?

Post by PatH57 »

Hi last posts I've seen on this card were already 2 years old and bug reports never got anykind of action.
At least you got it to work with the correct driver.
I woul try this and:

Code: Select all

sudo apt-get install ethtool
sudo ethtool eth0
ifconfig -a
the check on goolgle if someone got lucky using ethtool so set this setting, most post were about jumbo frames 7000 and 7200

good luck
eanfrid

Re: Where can I set MTU premanently ?

Post by eanfrid »

Hello,

Try in /etc/network/interfaces

Code: Select all

post-up ip link set mtu 1492 dev eth0
kamyar

Re: Where can I set MTU premanently ?

Post by kamyar »

Hi both,
Thanks for your replies :

post-up ip link set mtu 1492 dev eth0
=> MTU remained at 1500 after reboot

Ethtool does not have any options for MTU. I know Pat I already googled a lot for this issue ;-)

Anyway that does not matter that much as my ethernet works ...
Last edited by kamyar on Tue Jul 15, 2014 5:06 am, edited 1 time in total.
eanfrid

Re: Where can I set MTU premanently ?

Post by eanfrid »

OK try to add instead in /etc/rc.local

Code: Select all

ip link set mtu 1492 dev eth0
This should work. If not then you have some other network config overriding the initial system settings. My crystal ball is currently under repair :)
PatH57

Re: Where can I set MTU premanently ?

Post by PatH57 »

Hi,

I did try to change my MTU ona broadcom b43 and it just stays at 1500 whathever I try.
Under windows I can change it (at least that's what the gui says)
eanfrid

Re: Where can I set MTU premanently ?

Post by eanfrid »

So it looks like an OEM firmware problem, not a Linux one ;) The system commands I gave do work.
I have a Realttek 8111E and as the owners know, by default it loads the bad driver r8169.
BTW, I have the same chipset on 2 of my computers, using the so-called default "bad driver" and mtu can be set to whatever I want (i.e. setting up 6000+ sized jumbo frames in my case).
PatH57

Re: Where can I set MTU premanently ?

Post by PatH57 »

agree it's either the driver or the oem firmware :mrgreen:

that said on Dell it's the stock card and stock oem firmware (for the b43)
kamyar

Re: Where can I set MTU premanently ?

Post by kamyar »

Hi,
Setting :
ip link set mtu 1492 dev eth0
in rc.local
made eth0 down ...
eanfrid

Re: Where can I set MTU premanently ?

Post by eanfrid »

:shock: Then this driver seems to actually not handle alternative mtu settings.
Which problem did you actually meet when using the native kernel module for this interface ?
kamyar

Re: Where can I set MTU premanently ?

Post by kamyar »

Hi Eanfrid,
I changed it bc it did not correspond to my network hardware.

So both configuration do work without dropped packet and similar performance :
(initial configuration) wrong driver, good MTU
(current configuration) good driver, wrong MTU
eanfrid

Re: Where can I set MTU premanently ?

Post by eanfrid »

kamyar wrote:Hi Eanfrid,
I changed it bc it did not correspond to my network hardware.

So both configuration do work without dropped packet and similar performance :
(initial configuration) wrong driver, good MTU
(current configuration) good driver, wrong MTU
because r8111 is not r8169 ?
So you had problem trying to solve an initial non-existent problem :) => Use the native kernel driver.
kamyar

Re: Where can I set MTU premanently ?

Post by kamyar »

Hi Eanfrid,

Yes you are probably right ... but I read many bad things on r8169 over r81xx so I tried the proper driver but seems there is an issue with its integration. The only way to set it is manually.

Pls do you have any idea on how to revert easily to the native one ? There is no documentation at Realtek or Google about its uninstall. Otherwise my objective is to read the install script line by line when I have the courage ... or reinstall /root only.
eanfrid

Re: Where can I set MTU premanently ?

Post by eanfrid »

According to Realtek, this driver is only necessary or recommended for devices not yet supported by the native r8169 driver. Otherwise, kittens will die :)

Besides, the install instructions you read and followed should also give a hand to how to uninstall. Perhaps will you also have to "un-blacklist" the r8169 driver (remove the corresponding line) in some "blacklist-whatever.conf" file located in the /etc/modprobe.d/ folder.
but I read many bad things on r8169 over r81xx
Do not try to fix something that is not broken :)
kamyar

Re: Where can I set MTU premanently ?

Post by kamyar »

Hi Eanfrid,
Nothing about uninstall in the readme that I have read carefully.
I will go threw manual uninstall :)
kamyar

Re: [Solved] Where can I set MTU premanently ?

Post by kamyar »

Hi Eanfrid,
I have separed / and /home
so I reinstalled /
and took the opportuntity to get back no only to open source LAN driver but also the video card.
PatH57

Re: [Solved] Where can I set MTU premanently ?

Post by PatH57 »

as you are on stock driver (included in the kernel)
you may want to try an updated kernel also from experience I've seen many issues and features being changed in the kernel over time, it's just a matter of being patient. You can always switch back to the old kernel if you experience any kind of problem that's Linux and it's magical voodoo. 8)
Locked

Return to “Networking”