mtu not always set properly on bond/vlan interface
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
vlan (Debian) |
New
|
Unknown
|
|||
vlan (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Precise |
Fix Released
|
Medium
|
Unassigned | ||
Trusty |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
Fix Released
|
Medium
|
Unassigned |
Bug Description
* Description
When configuring a network with bonding+vlan and setting the MTU,
occasionally the MTU doesn't get set properly on the vlan interface.
In addition if one checks /var/log/
SIOCSIFMTU: Numerical result out of range
I've tested the latest ifupdown package (0.7.44) and the problem still exists.
Multi/single CPU settings both exhibit the issue.
* Versions
This affects latest ifupdown and ubuntu p/q/r/s.
* Test Case
# Create a p/q/r/s server vm with two network interfaces
# This is reproducible on real hardware as well
# Install the following
sudo apt-get install vlan ifenslave-2.6 bridge-utils
sudo modprobe bonding 8021q
# Edit the interfaces file
/etc/networking
auto bond0
iface bond0 inet manual
bond-mode 802.3ad
bond-miimon 100
bond-lacp-rate 1
bond-slaves eth0 eth1
post-up ifconfig bond0 mtu 9000
auto eth0
iface eth0 inet manual
bond-master bond0
post-up ifconfig eth0 mtu 9000
auto eth1
iface eth1 inet manual
bond-master bond0
post-up ifconfig eth1 mtu 9000
auto bond0.123
iface bond0.123 inet static
address 192.168.122.68
netmask 255.255.255.0
gateway 192.168.122.1
post-up ifconfig bond0.123 mtu 9000
# edit rc.local (or another startup script) so we reboot until we hit the error
/etc/rc.local:
DEVS="eth0 eth1 bond0 bond0.123"
for d in $DEVS; do
mtu=$(cat /sys/class/
if [ $mtu != 9000 ]; then
fi
done
reboot
exit 0
# Now reboot the machine, within 10m or so you should be at the login prompt
# if you ifconfig | grep MTU you will see some of our interfaces did not get
# the MTU properly set and the test failed.
# Essentially we want to ensure that all MTU's (except lo) were set to 9000
* Regression Potential
- The biggest regression potential would be around an unknown other corner case between MTU and VLANs which could cause that interface to fail to come up (by this fix trying to start it in a different order).
- It might also be possible that some users really don't want the raw MTU increased while the vlan should be.
* Workaround
Change the bond0.123 post-up command to:
post-up sleep 2 && ifconfig bond0.123 mtu 9000
Now when rebooting the interfaces will all be brought up with the proper MTU.
Changed in ifupdown (Debian): | |
status: | Unknown → New |
Changed in ifupdown (Debian): | |
status: | New → Fix Released |
Changed in ifupdown (Debian): | |
status: | Fix Released → New |
tags: | added: rls-y-incoming |
affects: | ifupdown (Debian) → vlan (Debian) |
no longer affects: | ifupdown (Ubuntu) |
Changed in vlan (Ubuntu): | |
importance: | Undecided → Medium |
Changed in vlan (Ubuntu): | |
status: | Confirmed → Triaged |
Changed in vlan (Ubuntu Precise): | |
status: | New → Triaged |
Changed in vlan (Ubuntu Trusty): | |
status: | New → Triaged |
Changed in vlan (Ubuntu Xenial): | |
status: | New → Triaged |
Changed in vlan (Ubuntu Precise): | |
importance: | Undecided → Medium |
Changed in vlan (Ubuntu Trusty): | |
importance: | Undecided → Medium |
Changed in vlan (Ubuntu Xenial): | |
importance: | Undecided → Medium |
tags: | removed: sts-sru |
In addition I've been able to set the MTU on the tagged bond using the following:
auto bond0.123
iface bond0.123 inet static
address 192.168.122.68
netmask 255.255.255.0
gateway 192.168.122.1
mtu 9000
As the documentation mentions (for both ipv4/ipv6):
MTU size
The static Method
Options
mtu size
I think this would be the preferred way of setting this, however if I use this method I get:
"Waiting on network configuration" messages, which delay the boot by almost 2 minutes.