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.
Description of problem:
On a machine static ip configured machine (from kde plasma network manager applet). When switched back to DHCP, the ifcfg-XXX file is not updated correctly.
Version-Release number of selected component (if applicable):
NetworkManager 1.10.2-14.el7_5
How reproducible:
Steps to Reproduce:
1. Configure your network connection with a static IP in the Network Manager Applet and restart network services
# systemctl restart network.service
2. check your config file
# cat /etc/sysconfig/network-scripts/ifcfg-enp3s0
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME=enp3s0
UUID=e327ceec-9e06-4fe0-a550-78031c21f5cf
ONBOOT=yes
ZONE=public
IPADDR=10.0.0.100
PREFIX=24
GATEWAY=10.0.0.1
DNS1=10.0.0.254
DOMAIN=mydomain.com
3. edit your config to switch to DHCP in the network manager applet
4. restart network service and check your IP address
# systemctl restart network.service
# ifconfig enp3s0
enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.111.11 netmask 255.255.255.0 broadcast 192.168.111.255
inet6 fe80::210:18ff:fe31:7d95 prefixlen 64 scopeid 0x20<link>
ether 00:10:18:31:7d:95 txqueuelen 1000 (Ethernet)
RX packets 636030 bytes 868320403 (828.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 170755 bytes 13408339 (12.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 17
but network is not accessible.
Then when you check your config file
# cat /etc/sysconfig/network-scripts/ifcfg-enp3s0
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME=enp3s0
UUID=e327ceec-9e06-4fe0-a550-78031c21f5cf
ONBOOT=yes
ZONE=public
IPADDR=10.0.0.100
PREFIX=24
GATEWAY=10.0.0.1
Actual results:
The old IP is still there.
Expected results:
It should not be there...
Additional info:
Edit your ifcfg-xxxx file, restart network service to fix that.
Same issue when using nmcli to configure the network interface
Comment 2Beniamino Galvani
2018-07-05 12:37:47 UTC
(In reply to Thibault from comment #0)
>
> ...
> Same issue when using nmcli to configure the network interface
Can you paste the nmcli commands you used, the initial state (output of "nmcli c; nmcli d; ip a") and the final state (same command)? Please also note that when a connection is modified, changes are applied only after a reactivation of the connection. So, after the 'nmcli connection modify ...' command you need also to call 'nmcli connection up <con>'.
Here is what I did but I'm not a specialist of this tool.
nmcli con down enp3s0
nmcli con mod enp3s0 ipv4.method static ip4 10.0.0.10/24 gw4 10.0.0.1 ipv4.dns 10.0.0.254
nmcli con up enp3s0
nmcli con mod enp3s0 ipv4.method auto
nmcli con down enp3s0 && nmcli con up enp3s0
Comment 4Beniamino Galvani
2018-07-06 07:35:50 UTC
(In reply to Thibault from comment #3)
> Here is what I did but I'm not a specialist of this tool.
>
> nmcli con down enp3s0
> nmcli con mod enp3s0 ipv4.method static ip4 10.0.0.10/24 gw4 10.0.0.1
> ipv4.dns 10.0.0.254
> nmcli con up enp3s0
> nmcli con mod enp3s0 ipv4.method auto
Setting "ipv4.method auto" does not automatically clear the static addresses in the connection and so you end up with:
ipv4.method auto
ipv4.addresses 10.0.0.10/24
You can see this with "nmcli connection show enp3s0". Therefore, when the connection gets activated both the dynamic and static addresses are applied.
The command should be:
nmcli con mod enp3s0 ipv4.method auto ipv4.addresses ""
if you want only the DHCP address.
> nmcli con down enp3s0 && nmcli con up enp3s0
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 (fltk 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-2020:3872
Description of problem: On a machine static ip configured machine (from kde plasma network manager applet). When switched back to DHCP, the ifcfg-XXX file is not updated correctly. Version-Release number of selected component (if applicable): NetworkManager 1.10.2-14.el7_5 How reproducible: Steps to Reproduce: 1. Configure your network connection with a static IP in the Network Manager Applet and restart network services # systemctl restart network.service 2. check your config file # cat /etc/sysconfig/network-scripts/ifcfg-enp3s0 TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=none DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=no IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_FAILURE_FATAL="no" IPV6_ADDR_GEN_MODE="stable-privacy" NAME=enp3s0 UUID=e327ceec-9e06-4fe0-a550-78031c21f5cf ONBOOT=yes ZONE=public IPADDR=10.0.0.100 PREFIX=24 GATEWAY=10.0.0.1 DNS1=10.0.0.254 DOMAIN=mydomain.com 3. edit your config to switch to DHCP in the network manager applet 4. restart network service and check your IP address # systemctl restart network.service # ifconfig enp3s0 enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.111.11 netmask 255.255.255.0 broadcast 192.168.111.255 inet6 fe80::210:18ff:fe31:7d95 prefixlen 64 scopeid 0x20<link> ether 00:10:18:31:7d:95 txqueuelen 1000 (Ethernet) RX packets 636030 bytes 868320403 (828.0 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 170755 bytes 13408339 (12.7 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 17 but network is not accessible. Then when you check your config file # cat /etc/sysconfig/network-scripts/ifcfg-enp3s0 TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=dhcp DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=no IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_FAILURE_FATAL="no" IPV6_ADDR_GEN_MODE="stable-privacy" NAME=enp3s0 UUID=e327ceec-9e06-4fe0-a550-78031c21f5cf ONBOOT=yes ZONE=public IPADDR=10.0.0.100 PREFIX=24 GATEWAY=10.0.0.1 Actual results: The old IP is still there. Expected results: It should not be there... Additional info: Edit your ifcfg-xxxx file, restart network service to fix that. Same issue when using nmcli to configure the network interface