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.
DescriptionFernando F. Mancera
2022-06-07 13:11:02 UTC
This bug is a clone of https://bugzilla.redhat.com/show_bug.cgi?id=2090431 for RHEL 9.1
Description of problem:
After NetworkManager update to 8.6, IP assigned through DHCP became secondary IP address
Version-Release number of selected component (if applicable):
NetworkManager-1.36.0-4.el8
How reproducible:
Create interface with static and dynamic IP as below:
# cat /etc/sysconfig/network-scripts/ifcfg-enp8s0
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp8s0
UUID=ca4b54a7-8bae-4876-9031-095400dc6919
DEVICE=enp8s0
ONBOOT=yes
IPADDR=192.168.122.231
NETMASK=255.255.255.0
before NM update : primary IP: 192.168.122.230 secondary IP: 192.168.122.231
after NM update : primary IP: 192.168.122.231 secondary IP: 192.168.122.230
With 1.32.10-4 of NM DHCP IP selected as primary, after updating to the latest NM i.e. 1.36.0-4 we can see DHCP IP considered as secondary:
NetworkManager-1.32.10-4.el8:
=============================
[root@localhost ~]# ip a s enp8s0
4: enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:eb:40:a5 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.230/24 brd 192.168.122.255 scope global dynamic noprefixroute enp8s0 <<--- dhcp IP as primary
valid_lft 3452sec preferred_lft 3452sec
inet 192.168.122.231/24 brd 192.168.122.255 scope global secondary noprefixroute enp8s0
valid_lft forever preferred_lft forever
inet6 fe80::fd58:b9d:d593:74e2/64 scope link noprefixroute
valid_lft forever preferred_lft forever
NetworkManager-1.36.0-4.el8
============================
[root@localhost ~]# ip a s enp8s0
4: enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:eb:40:a5 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.231/24 brd 192.168.122.255 scope global noprefixroute enp8s0
valid_lft forever preferred_lft forever
inet 192.168.122.230/24 brd 192.168.122.255 scope global secondary dynamic noprefixroute enp8s0 <<--- dhcp IP as secondary
valid_lft 3283sec preferred_lft 3283sec
inet6 fe80::fd58:b9d:d593:74e2/64 scope link noprefixroute
valid_lft forever preferred_lft forever
Then I selected development NM packages and can see this behavior visible from NetworkManager-1.36.0-0.2:
NetworkManager-1.36.0-0.1.el8:
==============================
[root@localhost ~]# ip a s enp8s0
4: enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:eb:40:a5 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.230/24 brd 192.168.122.255 scope global dynamic noprefixroute enp8s0
valid_lft 3579sec preferred_lft 3579sec
inet 192.168.122.231/24 brd 192.168.122.255 scope global secondary noprefixroute enp8s0
valid_lft forever preferred_lft forever
inet6 fe80::fd58:b9d:d593:74e2/64 scope link noprefixroute
valid_lft forever preferred_lft forever
NetworkManager-1.36.0-0.2.el8:
==============================
[root@localhost ~]# ip a s enp8s0
4: enp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 52:54:00:eb:40:a5 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.231/24 brd 192.168.122.255 scope global noprefixroute enp8s0
valid_lft forever preferred_lft forever
inet 192.168.122.230/24 brd 192.168.122.255 scope global secondary dynamic noprefixroute enp8s0
valid_lft 3532sec preferred_lft 3532sec
inet6 fe80::fd58:b9d:d593:74e2/64 scope link noprefixroute
valid_lft forever preferred_lft forever
Question:
=========
- Is this behavior intentional?
- Can we know, why the behavior is changed from NetworkManager-1.36.0-0.1.el8 to NetworkManager-1.36.0-0.2.el8? Also, if there is any commit for this change, can we get that details as well?
(In reply to Fernando F. Mancera from comment #0)
> Question:
> =========
> - Is this behavior intentional?
Yes
> - Can we know, why the behavior is changed from
> NetworkManager-1.36.0-0.1.el8 to NetworkManager-1.36.0-0.2.el8? Also, if
> there is any commit for this change, can we get that details as well?
there is not one commit, because over the time there were many issues and the code got reworked heavily over time.
https://bugzilla.redhat.com/show_bug.cgi?id=1995372#c5 is a lengthy summary.
It was always the goal, is that manual configuration is to be preferred over DHCP (or other "auto" settings). If that didn't happen, it was a bug that got fixed now.
Note that NetworkManager 1.36 still has some subtle issues, that only will be fixed in 1.38+.
People in particular care about the primary/secondary flag of addresses, to affect source address selection. In some cases, you want that the DHCP address is used for an outgoing connection. This change (of prefering manual over DHCP) seems to contradict that.
However, what's also new in 1.36+ is that routes from DHCP get the source attribute set. So while the manual address may now be the primary, if a destination is to be reached via DHCP, then the DHCP address will be used for source address selection. Btw, if you want to override that yet again, add a manual route along the manual address, that uses the desired "src".
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (NetworkManager bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2022:8265