MTU is not set on vlan interface

Bug #1904549 reported by Benjamin Allot
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Netplan
New
Undecided
Unassigned
netplan.io (Ubuntu)
Confirmed
Undecided
Unassigned
systemd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Hello,

Upon changing the following configuration, adding the MTU lines, I ended up with the VLAN interfaces still in MTU 1500 after a `netplan generate && netplan apply`

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal

# uname -a
Linux il3-fw2 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

# dpkg -l netplan.io
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-======================-============-===========================================================
ii netplan.io 0.100-0ubuntu4~20.04.2 amd64 YAML network configuration abstraction for various backends

==========

# This is the network config written by 'subiquity'
network:
  ethernets:
    ens10f0: {}
    ens10f1: {}
    ens10f2: {}
    ens10f3: {}
    ens1f0: {}
    ens1f1: {}
  bonds:
    bond-oam:
      interfaces: [ens10f0, ens10f1]
      parameters:
        mode: 802.3ad
        transmit-hash-policy: layer3+4
        mii-monitor-interval: 100
        lacp-rate: fast
      mtu: 9000

    bond-manlan:
      interfaces: [ens10f2, ens10f3]
      parameters:
        mode: 802.3ad
        transmit-hash-policy: layer3+4
        mii-monitor-interval: 100
        lacp-rate: fast

    bond-core:
      interfaces: [ens1f0, ens1f1]
      parameters:
        mode: 802.3ad
        transmit-hash-policy: layer3+4
        mii-monitor-interval: 100
        lacp-rate: fast
      mtu: 9000

  vlans:
    vlan3001:
      id: 3001
      link: bond-manlan
      addresses: [ "10.130.1.3/24" ]
    vlan3002:
      id: 3002
      link: bond-manlan
      addresses: [ "10.130.2.3/24" ]
    vlan3003:
      id: 3003
      link: bond-manlan
      addresses: [ "10.130.3.3/24" ]

    vlan3054:
      id: 3054
      link: bond-core
      addresses: [ "10.130.56.3/24" ]
      mtu: 9000

    vlan3065:
      id: 3065
      link: bond-oam
      addresses: [ "10.130.63.3/24" ]
      mtu: 9000

  version: 2
==========

And here is the result after the `netplan apply`

===============
# netstat -in
Kernel Interface table
Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
bond-cor 9000 19448696 0 0 0 6858767 0 1 0 BMmRU
bond-man 1500 7981199 0 1 0 1755800 0 2 0 BMmRU
bond-oam 9000 6236232 0 0 0 4488877 0 1 0 BMmU
ens10f0 9000 3961100 0 0 0 2271891 0 0 0 BMsU
ens10f1 9000 2288169 0 0 0 2218120 0 0 0 BMsU
ens10f2 1500 2506083 0 0 0 1226075 0 0 0 BMsRU
ens10f3 1500 5475116 0 0 0 529725 0 0 0 BMsRU
ens1f0 9000 9513761 0 0 0 3970465 0 0 0 BMsRU
ens1f1 9000 9934935 0 0 0 2888302 0 0 0 BMsRU
lo 65536 21336 0 0 0 21336 0 0 0 LRU
vlan3001 1500 1952436 0 0 0 1455753 0 0 0 BMRU
vlan3002 1500 251466 0 0 0 2617 0 0 0 BMRU
vlan3003 1500 299241 0 0 0 2432 0 0 0 BMRU
vlan3051 1500 5026690 0 0 0 17535 0 0 0 BMRU
vlan3054 1500 90889 0 0 0 1812 0 0 0 BMRU
vlan3060 1500 9759629 0 0 0 1646313 0 0 0 BMRU
vlan3065 1500 913398 0 0 0 229350 0 0 0 BMUthe netplan apply
===============

However, we can see that the `netplan generate` worked:
=============
# cat /run/systemd/network/10-netplan-vlan30{54,65}.net{dev,work} | grep -i MTU
MTUBytes=9000
MTUBytes=9000
MTUBytes=9000
MTUBytes=9000
==============

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I wonder if you need more mtu settings on:
* ens10f2
* ens10f3
* bond-manlan

I don't think that MTU is allowed to be higher on a vlan, than on bond-man, than on physical interfaces. Why did you not set mtu: 9000 on bond-manlan?

however that does not explain how come the vlans on top of bond-core / bond-oam are not 9000.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

this could be udevd/networkd bug which both fiddle with mtu.

Revision history for this message
Benjamin Allot (ballot) wrote :

Hello,

I don't need it on bond-manlan for sure (MTU 1500 on this one and its VLANs), but I read in several place that setting MTU on the bond would also set it on interface members.
And that indeed worked correctly.

As I said, I think the issue is definitely more in the udevd/networkd part (remind me of the azure issue seen in https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1902960) because the /run/systemd/network files were correct after the netplan apply.

Revision history for this message
Dan Streetman (ddstreet) wrote :

I can't reproduce it, on a VM with similar config the vlan does get the right mtu. can you provide your systemd-networkd journal log? Is there a specific environment (e.g. specific cloud) this fails in?

Changed in systemd (Ubuntu):
status: New → Incomplete
Revision history for this message
Lukas Märdian (slyon) wrote :

This looks kind of similar to LP: #1888726

Revision history for this message
Benjamin Allot (ballot) wrote :

Sadly, the journalctl logs don't go back that far now.

It failed on a baremetal server, not a cloud.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in netplan.io (Ubuntu):
status: New → Confirmed
Revision history for this message
Dan Streetman (ddstreet) wrote :

please reopen if this is still an issue

Changed in systemd (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.