an extra line "HWADDR=" is added to ifcfg file after run nmcli to modify mtu for team1

Issues related to configuring your network
Post Reply
robin
Posts: 2
Joined: 2023/12/20 01:18:39

an extra line "HWADDR=" is added to ifcfg file after run nmcli to modify mtu for team1

Post by robin » 2023/12/20 01:25:27

Hi,

I tried the following commands to modify MTU of a teaming NIC:
##modify MTU of logical NIC and sub-NICs:
nmcli c modify team1 802-3-ethernet.mtu 9000
nmcli c modify ens21f0 802-3-ethernet.mtu 9000
nmcli c modify ens5f1 802-3-ethernet.mtu 9000

#make it effective by down/up NIC
ifdown team1
ifup team1

It seems work fine. However, I found extra lines in the /etc/sysconfig/network-script/ifcfg-team1:

MTU=9000
HWADDR=

The two lines are added by nmcli commands executed above.
The line “HWADDR=” seems weird because no value is assigned to it.

So, will the line “HWADDR=” cause any unknown issues ?
Is it supported to modify MTU of teaming NIC via the commands mentioned above?

Thanks.

User avatar
TrevorH
Site Admin
Posts: 33223
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: an extra line "HWADDR=" is added to ifcfg file after run nmcli to modify mtu for team1

Post by TrevorH » 2023/12/20 09:03:28

I don't know but a) it looks like a bug and b) teamd is officially marked as deprecated in RHEL 9 so you might want to switch back to bonding which was always better in the first place.

From https://access.redhat.com/documentation ... s/overview
"The teamd service and the libteam library are deprecated. As a replacement, configure a bond instead of a network team. "
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

robin
Posts: 2
Joined: 2023/12/20 01:18:39

Re: an extra line "HWADDR=" is added to ifcfg file after run nmcli to modify mtu for team1

Post by robin » 2023/12/21 02:27:25

TrevorH;

The issue can be reproduced on other Linux flavors too. Someone else opened a case on Redhat support. Redhat said the extra line "HWADDR=" can be ignored.
Thank you very much for your information. So maybe it's better to switch from team back to bond since team will be deprecated in Redhat 9.

Regards
Robin

User avatar
jlehtone
Posts: 4532
Joined: 2007/12/11 08:17:33
Location: Finland

Re: an extra line "HWADDR=" is added to ifcfg file after run nmcli to modify mtu for team1

Post by jlehtone » 2023/12/21 09:49:12

(On boot) NetworkManager (NM) reads config from files and talks to kernel.
NM can read both its own file format and the legacy initscripts format.
Up to el8 NM does store most connections in legacy initscripts format.

When NM reads initscripts format, it logically will translate data into NM settings
(that you can read from man nm-settings).

We can look at what the NM sees:

Code: Select all

$ nmcli -f 802-3-ethernet c s wan
802-3-ethernet.port:                    --
802-3-ethernet.speed:                   0
802-3-ethernet.duplex:                  --
802-3-ethernet.auto-negotiate:          no
802-3-ethernet.mac-address:             --
802-3-ethernet.cloned-mac-address:      --
802-3-ethernet.generate-mac-address-mask:--
802-3-ethernet.mac-address-blacklist:   --
802-3-ethernet.mtu:                     auto
802-3-ethernet.s390-subchannels:        --
802-3-ethernet.s390-nettype:            --
802-3-ethernet.s390-options:            --
802-3-ethernet.wake-on-lan:             default
802-3-ethernet.wake-on-lan-password:    --
802-3-ethernet.accept-all-mac-addresses:-1 (default)
My ifcfg-wan does not have variables for those that I'd know of, so these are defaults?

You have the HWADDR= that defines var HWADDR, but with no value?
What does nmcli show for your 802-3-ethernet.mac-address?

Post Reply