Unable to change MTU settings

Status
Not open for further replies.

BlueDalek

Cadet
Joined
Aug 1, 2012
Messages
3
Hi All

First time using FreeNAS.. long time Linux user, so I am familiar with Unix related OS's.

I am having a hard time changing the MTU on my FreeNAS 8.2. I believe I have followed the various directions found on this site, as well as through Google searches, but am unable to change the MTU from the default value of 1500 to anything else.

One of my system's ethernet adapters won't go higher than 7200, so I am trying to set all my systems to this.

I have gone to 'Networking' and selected 'Interfaces'.. added a manual entry for 're0' with the correct IP address, gateway, ect..

After restarting, I connected via SSH and ran ifconfig...

re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=3899<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
ether 50:e5:49:52:40:1a
inet 192.168.1.122 netmask 0xffffff00 broadcast 192.168.1.255
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 5a:fa:2c:1a:d6:b7
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
member: re0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 1 priority 128 path cost 20000
member: epair0a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
ifmaxaddr 0 port 4 priority 128 path cost 2000
epair0a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 02:69:e3:00:04:0a
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active

Since that did not work, I tried to change it through the shell...

[root@freenas] ~# sudo ifconfig re0 mtu 9000
Sorry, user root is not allowed to execute '/sbin/ifconfig re0 mtu 9000' as root on freenas.local.

Can anyone shed some light onto what I have not done correctly?

Many thanks in advance!
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
If you are logged in as root you shouldn't be running sudo.

I just ran "ifconfig em0 mtu 9000" on my test box and it changed fine.

I will add that changing your MTU generally doesn't result in a significant performance increase, but alot of NICs just don't play very well with high MTUs. In particular, some will include the frame header and other will not. If all of your network cards are the same model then the same settings will work. If they are not you should figure out which do and don't and adjust the MTU manually.

Also, the performance increase I have seen from changing the MTU to anything above 5000 is minimal. Tests I ran found that the difference in performance is 5%, but if you have the MTUs wrong the retransmits can actually slow you down.
 

BlueDalek

Cadet
Joined
Aug 1, 2012
Messages
3
Thanks for your reply

I have tested what is a valid MTU for each of my devices and have set them all to match the lowest value.

I was able to change it through the shell.. but how do I make sure that it stays like that upon reboot?

Thanks
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
You know if you download the manual for FreeNAS and search for "mtu" the first result will give you an example of setting an mtu of 9000?
 

BlueDalek

Cadet
Joined
Aug 1, 2012
Messages
3
Yup.. did that... and even though the GUI shows my specified MTU... when doing an ifconfig, it still shows 1500
 

survive

Behold the Wumpus
Moderator
Joined
May 28, 2011
Messages
875

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
That's what the manual says to do survive. :)
 
J

James

Guest
That message indicates that the driver itself does not support that MTU. See re(4) for details.
 
Status
Not open for further replies.
Top