View Issue Details

IDProjectCategoryView StatusLast Update
0000263AlmaLinux-8NetworkManagerpublic2022-06-09 09:55
ReporterOscarCS Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
OS Version8.6 
Summary0000263: /etc/resolv.conf not correctly updated after sleep
Description/etc/resolv.conf keeps older dns servers when ethernet is removed after a sleep
Steps To ReproduceIn a laptop, in a place "X" whit a USB-C ethernet adapter "A" close the laptop and put it to sleep
Go to place Y
open the laptop and recover from sleep
connect a USB-C ethernet adapter "B"
plug the LAN cable to the adapter "B"
now you have a new ethernet connected to internet with a new IP adress
your /etc/resolve.conf has NEW "nameserver" lines, but the old ones are still there in the first positions
as result, name resolution becomes extremely slow since, until timeouts for the old and unreachable dns servers are completed, the new dns servers are not use.

Example of /etc/resolve.conf in place A

; generated by /sbin/dhclient-script
search XXXXXX # Not sure about this line, I don't have access to it
nameserver 192.168.100.1

Example of /etc/resolve.conf in place B:

; generated by /sbin/dhclient-script
search uab.cat
nameserver 192.168.100.1
nameserver 158.109.0.1
nameserver 158.109.0.9



TagsNetworkManager;/etc/resolve.conf;Laptop;sleep
abrt_hash
URL

Activities

OscarCS

2022-06-09 09:55

reporter   ~0000594

More information in the topic.
A workaround is:
systemctl restart NetworkManager.service

Below I'm paste the "nmcli" output of the laptop before and after "systemctl restart NetworkManager.service"

The laptop arrived from "home" to the workplace.
The user plugged in the Network Cable
It received the IP address from the workplace dhcp (158.109.XX.XXX)
It received the DNSs from the workplace (158.109.0.1 158.109.0.9) but the old DNS was not removed (192.168.100.1) so every new connection takes ages.
the user restarted NetworkManager.service
then the old DNS was removed (192.168.100.1) and everything works fine.

I can see that hw address from the wifi changed from E6:92:53:5D:FA:B6 to A0:CE:C8:3B:2F:3E after the restart, but after a bit of googling I found that this is perfectly normal.

This was not happening 1 month ago

I hope this helps to understand the problem and fixing it


#################################################
* BEFORE restart NetworkManager.service :
]$ nmcli
enp0s13f0u3u3u1: connected to Wired connection 1
        "Realtek RTL8153"
        ethernet (r8152), A0:CE:C8:3B:2F:3E, hw, mtu 1500
        ip4 default
        inet4 158.109.XX.XXX/23
        route4 158.109.XX.0/23 metric 100
        route4 default via 158.109.XX.1 metric 100
        inet6 fe80::3f70:8c7d:70e8:a48d/64
        route6 fe80::/64 metric 1024

virbr0: connected (externally) to virbr0
        "virbr0"
        bridge, 52:54:00:56:BF:32, sw, mtu 1500
        inet4 192.168.122.1/24
        route4 192.168.122.0/24 metric 0

wlp0s20f3: disconnected
        "Intel Ice Lake-LP PCH CNVi"
        2 connections available
        wifi (iwlwifi), E6:92:53:5D:FA:B6, hw, mtu 1500

p2p-dev-wlp0s20f3: disconnected
        "p2p-dev-wlp0s20f3"
        wifi-p2p, hw

lo: unmanaged
        "lo"
        loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

DNS configuration:
        servers: 192.168.100.1

        servers: 158.109.0.1 158.109.0.9
        domains: uab.cat
        interface: enp0s13f0u3u3u1

* AFTER restart NetworkManager.service :
$ nmcli
enp0s13f0u3u3u1: connected to Wired connection 1
        "Realtek RTL8153"
        ethernet (r8152), A0:CE:C8:3B:2F:3E, hw, mtu 1500
        ip4 default
        inet4 158.109.XX.XXX/23
        route4 default via 158.109.XX.1 metric 100
        route4 158.109.XX.0/23 metric 100
        inet6 fe80::3f70:8c7d:70e8:a48d/64
        route6 fe80::/64 metric 1024

virbr0: connected (externally) to virbr0
        "virbr0"
        bridge, 52:54:00:56:BF:32, sw, mtu 1500
        inet4 192.168.122.1/24
        route4 192.168.122.0/24 metric 0

wlp0s20f3: disconnected
        "Intel Ice Lake-LP PCH CNVi"
        2 connections available
        wifi (iwlwifi), 3E:C9:F9:3E:FE:27, hw, mtu 1500

p2p-dev-wlp0s20f3: disconnected
        "p2p-dev-wlp0s20f3"
        wifi-p2p, hw

lo: unmanaged
        "lo"
        loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

DNS configuration:
        servers: 158.109.0.1 158.109.0.9
        domains: uab.cat
        interface: enp0s13f0u3u3u1

Issue History

Date Modified Username Field Change
2022-06-07 11:47 OscarCS New Issue
2022-06-07 11:47 OscarCS Tag Attached: NetworkManager;/etc/resolve.conf;Laptop;sleep
2022-06-09 09:55 OscarCS Note Added: 0000594