Bug #339

Cannot set jumbo MTU for aggregated vlans

Added by montjoy1 - almost 3 years ago. Updated over 2 years ago.

Status:ClosedStart date:
Priority:HighDue date:
Assignee:Josh Paetzel% Done:

0%

Category:Backend
Target version:8.0-RELEASE
Seen in:

Description

There currently isn't a way to set the MTU size for lagg interfaces via the GUI or, as far as I can tell, the command-line. Documentation suggests setting the MTU for members of the lagg, but this doesn't seem to make a difference. I have tried the following:

1. Manually bring down & unplumb vlan & lagg interfaces. Set MTU to 9000 on em nics. Bring up lagg & vlan interfaces. Works.
2. Add interfaces em0 and em1 to the GUI, setting nothing but "MTU 9000". I am able to create the lagg and vlan interfaces after, but the MTU stays at 1500.
3. Do it the nanobsd way(i think). Edit /etc/rc.conf, add 'ifconfig_em0="mtu 9000"
ifconfig_em1="mtu 9000"' , mount /sys, copy rc.conf to sys, umount /sys, reboot. The settings for em0 & em1 seem to disappear
4. Create a backup config file, edit with sqlite, & upload changes - can't figure out where to edit. Modifying the network_interfaces table seems to be identical to (2) above.

So, am I doing something wrong (don't think so?). I'm not super-familiar with FreeBSD so I could be missing something obvious- but it seems like I've covered the regular bases. I've looked around for others with the issue but haven't found anything for the 8.0 release. The 7.2 documentation seems not to apply since the config is saved differently. Thanks!

Config file attached

History

#1 Updated by montjoy1 - almost 3 years ago

I found a workaround - After I deleted all of the interfaces in the GUI & rebooted I noticed that the mtu was now set to 9000 for my em0 and em1 nics. So it WAS grabbing the config from /cfg/rc.conf! I added the config stuff for lagg also - and it worked. After that I was able to add the vlan normally in the GUI. I'm a happy camper now.

Stuff added to /etc/rc.conf:
ifconfig_em0="mtu 9000"
ifconfig_em1="mtu 9000"
cloned_interfaces="lagg0"
ifconfig_lagg0="laggproto failover laggport em0 laggport em1"

Then do stuff like number 3 up above

#2 Updated by montjoy1 - almost 3 years ago

Replying to montjoy1:

3. Do it the nanobsd way(i think). Edit /etc/rc.conf, add 'ifconfig_em0="mtu 9000"
ifconfig_em1="mtu 9000"' , mount /sys, copy rc.conf to sys, umount /sys, reboot. The settings for em0 & em1 seem to disappear

Above should be mounting & unmounting to /cfg, not /sys

#3 Updated by Josh Paetzel almost 3 years ago

You should be able to add mtu 9000 to the options of the lagg member interfaces to modify their MTUs

#4 Updated by Josh Paetzel almost 3 years ago

  • Resolution set to fixed

#5 Updated by Josh Paetzel almost 3 years ago

ok, here's a fix. With this you can set the mtu of the underlying devices in the GUI.

Before you create the lagg, create interfaces for the members. Do not give them any network configuration or select DHCP. In the interface options set the mtu with mtu 9000 (or whatever mtu you need)

Then create the lagg as usual.

When the system boots before it runs ifconfig lagg0 create $child_if.... it will run ifconfig_$child_if="up $options"

To try the fix do:

# mount -uw /
# cd /tmp
# fetch "http://download.freenas.org/rc.conf.local" 
# mv rc.conf.local /conf/base/etc/
# reboot

#6 Updated by montjoy1 - almost 3 years ago

  • Resolution deleted (fixed)
  • Status changed from Closed to Investigation

Adding MTU 9000 to the lagg interface does NOT work. According to FreeBSD documentation the MTU must be set at the interface first. LAGG and then VLANs will inherit the MTU.

"The MTU of the first interface to be added is used as the lagg MTU. All additional interfaces are required to have exactly the same value."

[http://www.freebsd.org/cgi/man.cgi?query=lagg&apropos=0&sektion=0&manpath=FreeBSD+8.2-RELEASE&format=html]

#7 Updated by Josh Paetzel almost 3 years ago

Yes, you're right. And while you can set the device options in the GUI that isn't handled quite right either when the devices are lagg members. Working on a patch for the generation script that does the right thing. Would you be willing to test it in 15-20 minutes?

#8 Updated by montjoy1 - almost 3 years ago

Sorry I haven't gotten back - I AM trying to find time to test this but it may be a couple weeks.

#9 Updated by montjoy1 - over 2 years ago

OK - I just installed 8.0.1 RC4 and it seems to work. One note - when editing the interfaces for the lagg members in the lagg config, I had to have the option order as "mtu 9000 up" rather than "up mtu 9000". I'm pointing this out because people will probably tend to append to the end of the line rather than insert before it. Appending at the end didn't seem to work- but I'm not 100% sure on this.

Thanks for the great work!

#10 Updated by Josh Paetzel over 2 years ago

  • Resolution set to fixed

Also available in: Atom PDF