Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1540901

Summary: MTU behaviour inconsistent / not persistent
Product: Red Hat Enterprise Linux 7 Reporter: Patrik Martinsson <martinsson.patrik>
Component: NetworkManagerAssignee: Beniamino Galvani <bgalvani>
Status: CLOSED CURRENTRELEASE QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.4CC: atragler, bgalvani, fgiudici, lrintel, martinsson.patrik, rkhan, sukulkar, thaller
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-08 09:13:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
NetworkManager TRACE-log from reboot none

Description Patrik Martinsson 2018-02-01 09:53:53 UTC
Description of problem:

Setting up the following devices, with mtu 9000 in kickstart wont be applied at boot. 

team0
team0-p6p1
team0-p6p2
br-vlan.50
vlan.50

# Commmands used in kickstart to configure networking,

$ >   nmcli con add type         team  \
                  con-name     team0   \
                  ifname       team0   \
                  ipv4.method  disable \
                  ipv6.method  ignore  \
                  mtu          9000    \
                  config '{ "runner": {"name":"lacp", "fast_rate":true }}'

$ >   nmcli con add type      team-slave \
                    con-name  team-p6p1  \
                    ifname    p6p1       \
                    master    team0      \
                    mtu       9000


$ >   nmcli con add type      team-slave \
                    con-name  team-p6p2  \
                    ifname    p6p2       \
                    master    team0      \
                    mtu       9000

$ >   nmcli con add type vlan                         \
                    con-name              vlan.50     \
                    ifname                vlan.50     \
                    dev                   team0       \
                    id                    50          \
                    ipv4.method           disable     \
                    ipv6.method           ignore      \
                    connection.master     br-vlan.50  \
                    mtu                   9000        \
                    connection.slave-type bridge

$ >   nmcli con add type bridge                           \
                         con-name            br-vlan.50   \
                         ifname              br-vlan.50   \
                         bridge.stp          no           \
                         ipv4.method         manual       \
                         ipv6.method         ignore       \
                         mtu                 9000         \
                         ipv4.addresses      "172.18.16.19/23"

$ >   nmcli con modify br-vlan.50 ipv4.gateway 172.18.16.1
      nmcli con modify br-vlan.50 ipv4.dns "xx"
      nmcli con modify br-vlan.50 ipv4.dns-search "xx"

# After reboot, this is how it comes up (em* and lo excluded), 

$ > ip li sh 
6: p6p1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq master team0 state UP mode DEFAULT qlen 1000
    link/ether 02:e6:45:a4:83:2d brd ff:ff:ff:ff:ff:ff
7: p6p2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq master team0 state UP mode DEFAULT qlen 1000
    link/ether 02:e6:45:a4:83:2d brd ff:ff:ff:ff:ff:ff
8: br-vlan.50: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT qlen 1000
    link/ether 02:e6:45:a4:83:2d brd ff:ff:ff:ff:ff:ff
9: team0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP mode DEFAULT qlen 1000
    link/ether 02:e6:45:a4:83:2d brd ff:ff:ff:ff:ff:ff
10: vlan.50@team0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-vlan.50 state UP mode DEFAULT qlen 1000
    link/ether 02:e6:45:a4:83:2d brd ff:ff:ff:ff:ff:ff

# As you see, nor vlan.50@team0 or br-vlan.50 has the set mtu of 9000.

$ > grep -i mtu /etc/sysconfig/network-scripts/ifcfg-*
/etc/sysconfig/network-scripts/ifcfg-team0:MTU=9000
/etc/sysconfig/network-scripts/ifcfg-team-p6p1:MTU=9000
/etc/sysconfig/network-scripts/ifcfg-team-p6p2:MTU=9000
/etc/sysconfig/network-scripts/ifcfg-vlan.50:MTU=9000

# However as you see, its defined in ifcfg-files for the interfaces.


# Running, 
$ > nmcli con up vlan.50 
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6)

6: p6p1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq master team0 state UP mode DEFAULT qlen 1000
    link/ether 02:e6:45:a4:83:2d brd ff:ff:ff:ff:ff:ff
7: p6p2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq master team0 state UP mode DEFAULT qlen 1000
    link/ether 02:e6:45:a4:83:2d brd ff:ff:ff:ff:ff:ff
8: br-vlan.50: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP mode DEFAULT qlen 1000
    link/ether 02:e6:45:a4:83:2d brd ff:ff:ff:ff:ff:ff
9: team0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP mode DEFAULT qlen 1000
    link/ether 02:e6:45:a4:83:2d brd ff:ff:ff:ff:ff:ff
10: vlan.50@team0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue master br-vlan.50 state UP mode DEFAULT qlen 1000
    link/ether 02:e6:45:a4:83:2d brd ff:ff:ff:ff:ff:ff

# Seems to set the mtu to the defined one. 


1 ) Why isn't this happening at boot (rebooting the machine resets the mtu to 1500) ? This seems like a bug to me.

2 ) I'm a bit confused about the whole mtu parameter, it seems to be different on type of connection (which maybe makes sence?). At some connections you specify '802-3-ethernet.mtu', and one others (for vlan's example) you speficy '802.mtu' (according to red hat docs). But it also seems like just 'mtu' seems to be valid for all connection-types, as an "alias" or something I guess ? 
    
3 ) Are you suppose to set mtu on both the bridge and the vlan connection ? Because even though the br-vlan.50 connection was set up with "mtu 9000", no parameter on that connection shows up when running 'nmcli connection show br-vlan.50 | grep mtu'. However as stated above, running "nmcli con up vlan.50" sets the mtu to 9000 on *both* the bridge and the vlan interface. 

Maybe I'm missing something obvious ? 


Version-Release number of selected component (if applicable):
$ > rpm -q NetworkManager
NetworkManager-1.8.0-11.el7_4.x86_64

$ > cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.4 (Maipo)


How reproducible:
Always 


Steps to Reproduce:
See above.

Actual results:
Defined mtu not set on  defined interfaces (connected to connections in nm).

Expected results:
Defined mtu should be set to defined value on defined interfaces (connected to connections in nm).

Additional info:
I'll be happy to debug it further with assistance.

Comment 2 Thomas Haller 2018-02-12 12:13:18 UTC
(In reply to Patrik Martinsson from comment #0)


> 1 ) Why isn't this happening at boot (rebooting the machine resets the mtu
> to 1500) ? This seems like a bug to me.

Yes, seems like a bug. Could you please provide a full logfile with level=TRACE of the reboot? See hints at https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/contrib/fedora/rpm/NetworkManager.conf

It looks like NM for some reasons fail to set the MTU for the vlan device, and consequently cannot set the MTU of the bridge either (because kernel doesn't allow setting the bridge's MTU to a value larger then it's slaves).

 
> 2 ) I'm a bit confused about the whole mtu parameter, it seems to be
> different on type of connection (which maybe makes sence?). At some
> connections you specify '802-3-ethernet.mtu', and one others (for vlan's
> example) you speficy '802.mtu' (according to red hat docs). But it also
> seems like just 'mtu' seems to be valid for all connection-types, as an
> "alias" or something I guess ? 

"mtu" is an alias in nmcli. See `man nmcli` for the list of aliases.
The properties that NetworkManager understands are documented in `man nm-settings`. Mostly they have a corresponding nmcli option.


> 3 ) Are you suppose to set mtu on both the bridge and the vlan connection ?
> Because even though the br-vlan.50 connection was set up with "mtu 9000", no
> parameter on that connection shows up when running 'nmcli connection show
> br-vlan.50 | grep mtu'. However as stated above, running "nmcli con up
> vlan.50" sets the mtu to 9000 on *both* the bridge and the vlan interface. 

What do you mean with "nmcli connection show br-vlan.50 | grep mtu"? This queries the setting of the connection profile, which is distinct from what is actually configured on the device (optimally, of course, the device is configured with the settings from the profile). But why would looking at the profile not give what you configured there?

Comment 3 Patrik Martinsson 2018-02-12 20:05:00 UTC
(In reply to Thomas Haller from comment #2)
> (In reply to Patrik Martinsson from comment #0)
> 
> 
> > 1 ) Why isn't this happening at boot (rebooting the machine resets the mtu
> > to 1500) ? This seems like a bug to me.
> 
> Yes, seems like a bug. Could you please provide a full logfile with
> level=TRACE of the reboot? See hints at
> https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/contrib/
> fedora/rpm/NetworkManager.conf
> 
> It looks like NM for some reasons fail to set the MTU for the vlan device,
> and consequently cannot set the MTU of the bridge either (because kernel
> doesn't allow setting the bridge's MTU to a value larger then it's slaves).

Ok, attached nm.log. 
Level is set to TRACE and server is rebooted, mtu is set to 1500 on both vlan interface and the bridge. After running 'nmcli con up vlan.50' mtu is correctly set.

  
> > 2 ) I'm a bit confused about the whole mtu parameter, it seems to be
> > different on type of connection (which maybe makes sence?). At some
> > connections you specify '802-3-ethernet.mtu', and one others (for vlan's
> > example) you speficy '802.mtu' (according to red hat docs). But it also
> > seems like just 'mtu' seems to be valid for all connection-types, as an
> > "alias" or something I guess ? 
> 
> "mtu" is an alias in nmcli. See `man nmcli` for the list of aliases.
> The properties that NetworkManager understands are documented in `man
> nm-settings`. Mostly they have a corresponding nmcli option.

Ok, I see. I guess I should have read the man pages, its pretty clear from the tables in there. 


> > 3 ) Are you suppose to set mtu on both the bridge and the vlan connection ?
> > Because even though the br-vlan.50 connection was set up with "mtu 9000", no
> > parameter on that connection shows up when running 'nmcli connection show
> > br-vlan.50 | grep mtu'. However as stated above, running "nmcli con up
> > vlan.50" sets the mtu to 9000 on *both* the bridge and the vlan interface. 
> 
> What do you mean with "nmcli connection show br-vlan.50 | grep mtu"? This
> queries the setting of the connection profile, which is distinct from what
> is actually configured on the device (optimally, of course, the device is
> configured with the settings from the profile). But why would looking at the
> profile not give what you configured there?

Hm, ok. Well I guess I'm a bit confused about "what is what". And I'm still a bit confused I guess.

When I look at the connection-profile with, 

$ > nmcli connection show br-vlan.50 | grep mtu
- nothing is returned. 

But I still have the possibility to set the mtu for the connection with, 

$ > nmcli connection modify br-vlan.50 802-3-ethernet.mtu 8000 

And now if I look at the connection again with, 

$ > nmcli connection show br-vlan.50 | grep -i mtu
802-3-ethernet.mtu:                     8000

The mtu is there. 

However, doing 

$ > grep -i mtu /etc/sysconfig/network-scripts/ifcfg-br-vlan.50 
- nothing is returned. 

So, most probably I'm just confused. But yes, I thought that the br-vlan50 connection-profile would have the mtu setting, and I also thought that the mtu-setting would be in /etc/sysconfig/network-scripts/ifcfg-br-vlan.50. But I guess I was wrong.

Comment 4 Patrik Martinsson 2018-02-12 20:05:43 UTC
Created attachment 1395087 [details]
NetworkManager TRACE-log from reboot

Comment 5 Beniamino Galvani 2018-06-08 09:13:31 UTC
(In reply to Patrik Martinsson from comment #3)
> When I look at the connection-profile with, 
> 
> $ > nmcli connection show br-vlan.50 | grep mtu
> - nothing is returned. 
> 
> But I still have the possibility to set the mtu for the connection with, 
> 
> $ > nmcli connection modify br-vlan.50 802-3-ethernet.mtu 8000 
> 
> And now if I look at the connection again with, 
> 
> $ > nmcli connection show br-vlan.50 | grep -i mtu
> 802-3-ethernet.mtu:                     8000
> 
> The mtu is there. 
> 
> However, doing 
> 
> $ > grep -i mtu /etc/sysconfig/network-scripts/ifcfg-br-vlan.50 
> - nothing is returned. 
> 
> So, most probably I'm just confused. But yes, I thought that the br-vlan50
> connection-profile would have the mtu setting, and I also thought that the
> mtu-setting would be in /etc/sysconfig/network-scripts/ifcfg-br-vlan.50. But
> I guess I was wrong.

Hi,

this is a bug that was fixed in NM 1.10 by commit:

https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=7ed57f2286f477919323c16af39cea2a2e4f5c51

Persisting the bridge MTU works in RHEL 7.5, and therefore I'm closing this bug as CURRENTRELEASE.

Regarding point:

 1 ) Why isn't this happening at boot (rebooting the machine resets the mtu to 1500) ? This seems like a bug to me.

let's track this in bug 1586191, which describes only that issue and so it is easier to follow.


> 2 ) I'm a bit confused about the whole mtu parameter, it seems to be different on type of connection (which maybe makes sence?). At some connections you specify '802-3-ethernet.mtu', and one others (for vlan's example) you speficy '802.mtu' (according to red hat docs). But it also seems like just 'mtu' seems to be valid for all connection-types, as an "alias" or something I guess ?

On Ethernet-like connections the mtu is specified in the 802-3-ethernet.mtu, a.k.a ethernet.mtu property. Which documentation specifies '802.mtu'? Note that nmcli accepts abbreviate forms of settings, and so '802' could be automatically interpreted as '802-3-ethernet' if there aren't any conflicts with other settings (for example '802-11-wireless').