Score:1

NetworkManager keeps reconnecting and chaning IP address, Ubuntu 22.04.2

fr flag

In certain wifi networks my laptop keeps reconnecting in seemingly random intervals, anytime between 1-60 minutes. In logs I am finding messages such as following:

wpa_supplicant[1179]: wlp1s0: CTRL-EVENT-SIGNAL-CHANGE above=0 signal=-76 noise=9999 txrate=26000
NetworkManager[1177]: <info>  [1681913817.0277] dhcp4 (wlp1s0): state changed new lease, address=10.13.2.61

Why is the system deciding to drop the wifi connection? Is it because of signal strength, as indicated above (signal=-76), or is that unrelated?

It is a problem because after reconnecting to the wifi, the system obtains a new IP address, which makes all existing ssh connections freeze.

In more detail, logs from the initial connection:

Apr 19 15:45:34 xlap NetworkManager[1177]: <info>  [1681911934.3419] device (wlp1s0): supplicant interface state: 4way_handshake -> completed
Apr 19 15:45:34 xlap NetworkManager[1177]: <info>  [1681911934.3420] device (wlp1s0): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Connected to wireless network "eduroam"
Apr 19 15:45:34 xlap NetworkManager[1177]: <info>  [1681911934.3420] device (p2p-dev-wlp1s0): supplicant management interface state: 4way_handshake -> completed
Apr 19 15:45:34 xlap NetworkManager[1177]: <info>  [1681911934.3422] device (wlp1s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Apr 19 15:45:34 xlap wpa_supplicant[1179]: wlp1s0: CTRL-EVENT-SIGNAL-CHANGE above=0 signal=-58 noise=9999 txrate=26000
Apr 19 15:45:34 xlap NetworkManager[1177]: <info>  [1681911934.3462] dhcp4 (wlp1s0): activation: beginning transaction (timeout in 45 seconds)
Apr 19 15:45:34 xlap avahi-daemon[1119]: Joining mDNS multicast group on interface wlp1s0.IPv6 with address fe80::33e0:44c4:f396:7975.
Apr 19 15:45:34 xlap avahi-daemon[1119]: New relevant interface wlp1s0.IPv6 for mDNS.
Apr 19 15:45:34 xlap avahi-daemon[1119]: Registering new address record for fe80::33e0:44c4:f396:7975 on wlp1s0.*.
Apr 19 15:45:35 xlap NetworkManager[1177]: <info>  [1681911935.4593] dhcp4 (wlp1s0): state changed new lease, address=10.13.0.162
Apr 19 15:45:35 xlap avahi-daemon[1119]: Joining mDNS multicast group on interface wlp1s0.IPv4 with address 10.13.0.162.
Apr 19 15:45:35 xlap avahi-daemon[1119]: New relevant interface wlp1s0.IPv4 for mDNS.
Apr 19 15:45:35 xlap avahi-daemon[1119]: Registering new address record for 10.13.0.162 on wlp1s0.IPv4.
Apr 19 15:45:35 xlap NetworkManager[1177]: <info>  [1681911935.4633] device (wlp1s0): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Apr 19 15:45:35 xlap NetworkManager[1177]: <info>  [1681911935.4651] device (wlp1s0): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Apr 19 15:45:35 xlap NetworkManager[1177]: <info>  [1681911935.4652] device (wlp1s0): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Apr 19 15:45:35 xlap NetworkManager[1177]: <info>  [1681911935.4656] manager: NetworkManager state is now CONNECTED_LOCAL
Apr 19 15:45:35 xlap NetworkManager[1177]: <info>  [1681911935.4666] manager: NetworkManager state is now CONNECTED_SITE
Apr 19 15:45:35 xlap NetworkManager[1177]: <info>  [1681911935.4667] policy: set 'eduroam' (wlp1s0) as default for IPv4 routing and DNS
Apr 19 15:45:35 xlap NetworkManager[1177]: <info>  [1681911935.4669] device (wlp1s0): Activation: successful, device activated.
Apr 19 15:45:35 xlap NetworkManager[1177]: <info>  [1681911935.4671] manager: NetworkManager state is now CONNECTED_GLOBAL
Apr 19 15:45:35 xlap NetworkManager[1177]: <info>  [1681911935.4673] manager: startup complete

And Wifi reconnecting here with a new IP address obtained:

Apr 19 16:15:03 xlap wpa_supplicant[1179]: wlp1s0: CTRL-EVENT-SIGNAL-CHANGE above=1 signal=-61 noise=9999 txrate=130000
Apr 19 16:15:39 xlap wpa_supplicant[1179]: wlp1s0: CTRL-EVENT-EAP-STARTED EAP authentication started
Apr 19 16:15:39 xlap wpa_supplicant[1179]: wlp1s0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=21 -> NAK
Apr 19 16:15:39 xlap wpa_supplicant[1179]: wlp1s0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=25
Apr 19 16:15:39 xlap wpa_supplicant[1179]: wlp1s0: CTRL-EVENT-EAP-METHOD EAP vendor 0 method 25 (PEAP) selected
Apr 19 16:15:40 xlap wpa_supplicant[1179]: EAP-TLV: TLV Result - Success - EAP-TLV/Phase2 Completed
Apr 19 16:15:40 xlap wpa_supplicant[1179]: wlp1s0: CTRL-EVENT-EAP-SUCCESS EAP authentication completed successfully
Apr 19 16:15:40 xlap wpa_supplicant[1179]: wlp1s0: PMKSA-CACHE-REMOVED 00:a7:42:b9:cf:cf 0
Apr 19 16:15:40 xlap wpa_supplicant[1179]: wlp1s0: PMKSA-CACHE-REMOVED 5c:83:8f:3c:8b:f0 0
Apr 19 16:15:40 xlap wpa_supplicant[1179]: wlp1s0: PMKSA-CACHE-REMOVED 00:a7:42:b9:cf:c0 0
Apr 19 16:15:40 xlap wpa_supplicant[1179]: wlp1s0: PMKSA-CACHE-ADDED 00:a7:42:b9:cf:c0 0
Apr 19 16:15:40 xlap NetworkManager[1177]: <info>  [1681913740.2369] device (wlp1s0): supplicant interface state: completed -> 4way_handshake
Apr 19 16:15:40 xlap NetworkManager[1177]: <info>  [1681913740.2370] device (p2p-dev-wlp1s0): supplicant management interface state: completed -> 4way_handshake
Apr 19 16:15:40 xlap wpa_supplicant[1179]: wlp1s0: WPA: Key negotiation completed with 00:a7:42:b9:cf:c0 [PTK=CCMP GTK=CCMP]
Apr 19 16:15:40 xlap NetworkManager[1177]: <info>  [1681913740.3235] device (wlp1s0): supplicant interface state: 4way_handshake -> completed
Apr 19 16:15:40 xlap NetworkManager[1177]: <info>  [1681913740.3257] device (p2p-dev-wlp1s0): supplicant management interface state: 4way_handshake -> completed
Apr 19 16:15:43 xlap kernel: Rekeying PTK for STA 00:a7:42:b9:cf:c0 but driver can't safely do that.
Apr 19 16:15:43 xlap kernel: wlp1s0: deauthenticated from 00:a7:42:b9:cf:c0 (Reason: 15=4WAY_HANDSHAKE_TIMEOUT)
Apr 19 16:15:43 xlap wpa_supplicant[1179]: wlp1s0: CTRL-EVENT-SIGNAL-CHANGE above=0 signal=-9999 noise=9999 txrate=0
Apr 19 16:15:43 xlap wpa_supplicant[1179]: wlp1s0: CTRL-EVENT-DISCONNECTED bssid=00:a7:42:b9:cf:c0 reason=15
Apr 19 16:15:43 xlap wpa_supplicant[1179]: BSSID 00:a7:42:b9:cf:c0 ignore list count incremented to 2, ignoring for 10 seconds
Apr 19 16:15:43 xlap NetworkManager[1177]: <info>  [1681913743.4085] device (wlp1s0): supplicant interface state: completed -> disconnected
Apr 19 16:15:43 xlap NetworkManager[1177]: <info>  [1681913743.4086] device (p2p-dev-wlp1s0): supplicant management interface state: completed -> disconnected
Apr 19 16:15:43 xlap NetworkManager[1177]: <info>  [1681913743.4849] device (wlp1s0): supplicant interface state: disconnected -> scanning
Apr 19 16:15:43 xlap NetworkManager[1177]: <info>  [1681913743.4850] device (p2p-dev-wlp1s0): supplicant management interface state: disconnected -> scanning
Apr 19 16:15:43 xlap wpa_supplicant[1179]: wlp1s0: PMKSA-CACHE-ADDED 00:a7:42:b9:cf:cf 0
Apr 19 16:15:43 xlap wpa_supplicant[1179]: wlp1s0: PMKSA-CACHE-ADDED 5c:83:8f:3c:8b:f0 0
Apr 19 16:15:43 xlap wpa_supplicant[1179]: wlp1s0: SME: Trying to authenticate with 00:a7:42:b9:cf:cf (SSID='eduroam' freq=5320 MHz)
Apr 19 16:15:43 xlap kernel: wlp1s0: authenticate with 00:a7:42:b9:cf:cf
Apr 19 16:15:43 xlap NetworkManager[1177]: <info>  [1681913743.6487] device (wlp1s0): supplicant interface state: scanning -> authenticating
Apr 19 16:15:43 xlap NetworkManager[1177]: <info>  [1681913743.6487] device (p2p-dev-wlp1s0): supplicant management interface state: scanning -> authenticating
Apr 19 16:15:43 xlap kernel: wlp1s0: send auth to 00:a7:42:b9:cf:cf (try 1/3)
Apr 19 16:15:43 xlap wpa_supplicant[1179]: wlp1s0: Trying to associate with 00:a7:42:b9:cf:cf (SSID='eduroam' freq=5320 MHz)
Apr 19 16:15:43 xlap kernel: wlp1s0: authenticated
Apr 19 16:15:43 xlap kernel: wlp1s0: associate with 00:a7:42:b9:cf:cf (try 1/3)
Apr 19 16:15:43 xlap NetworkManager[1177]: <info>  [1681913743.6812] device (wlp1s0): supplicant interface state: authenticating -> associating
Apr 19 16:15:43 xlap NetworkManager[1177]: <info>  [1681913743.6813] device (p2p-dev-wlp1s0): supplicant management interface state: authenticating -> associating
Apr 19 16:15:43 xlap kernel: wlp1s0: RX AssocResp from 00:a7:42:b9:cf:cf (capab=0x111 status=0 aid=2)
Apr 19 16:15:43 xlap wpa_supplicant[1179]: wlp1s0: Associated with 00:a7:42:b9:cf:cf
Apr 19 16:15:43 xlap wpa_supplicant[1179]: wlp1s0: CTRL-EVENT-EAP-STARTED EAP authentication started
Apr 19 16:15:43 xlap wpa_supplicant[1179]: wlp1s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Apr 19 16:15:43 xlap kernel: wlp1s0: associated
Apr 19 16:15:43 xlap NetworkManager[1177]: <info>  [1681913743.7255] device (wlp1s0): supplicant interface state: associating -> associated
Apr 19 16:15:43 xlap NetworkManager[1177]: <info>  [1681913743.7256] device (p2p-dev-wlp1s0): supplicant management interface state: associating -> associated
Apr 19 16:15:43 xlap NetworkManager[1177]: <info>  [1681913743.7256] device (wlp1s0): ip:dhcp4: restarting
Apr 19 16:15:43 xlap NetworkManager[1177]: <info>  [1681913743.7575] dhcp4 (wlp1s0): canceled DHCP transaction
Apr 19 16:15:43 xlap NetworkManager[1177]: <info>  [1681913743.7576] dhcp4 (wlp1s0): activation: beginning transaction (timeout in 45 seconds)
Apr 19 16:15:43 xlap NetworkManager[1177]: <info>  [1681913743.7576] dhcp4 (wlp1s0): state changed no lease
Apr 19 16:15:43 xlap NetworkManager[1177]: <info>  [1681913743.7577] dhcp4 (wlp1s0): activation: beginning transaction (timeout in 45 seconds)
Apr 19 16:15:43 xlap wpa_supplicant[1179]: wlp1s0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=21 -> NAK
Apr 19 16:15:43 xlap wpa_supplicant[1179]: wlp1s0: CTRL-EVENT-EAP-PROPOSED-METHOD vendor=0 method=25
Apr 19 16:15:43 xlap wpa_supplicant[1179]: wlp1s0: CTRL-EVENT-EAP-METHOD EAP vendor 0 method 25 (PEAP) selected
Apr 19 16:15:43 xlap kernel: wlp1s0: Limiting TX power to 17 dBm as advertised by 00:a7:42:b9:cf:cf
Apr 19 16:15:44 xlap wpa_supplicant[1179]: EAP-TLV: TLV Result - Success - EAP-TLV/Phase2 Completed
Apr 19 16:15:44 xlap wpa_supplicant[1179]: wlp1s0: CTRL-EVENT-EAP-SUCCESS EAP authentication completed successfully
Apr 19 16:15:44 xlap wpa_supplicant[1179]: wlp1s0: PMKSA-CACHE-REMOVED 00:a7:42:b9:cf:cf 0
Apr 19 16:15:44 xlap wpa_supplicant[1179]: wlp1s0: PMKSA-CACHE-ADDED 00:a7:42:b9:cf:cf 0
Apr 19 16:15:44 xlap wpa_supplicant[1179]: wlp1s0: WPA: Key negotiation completed with 00:a7:42:b9:cf:cf [PTK=CCMP GTK=CCMP]
Apr 19 16:15:44 xlap wpa_supplicant[1179]: wlp1s0: CTRL-EVENT-CONNECTED - Connection to 00:a7:42:b9:cf:cf completed [id=0 id_str=]
Apr 19 16:15:44 xlap NetworkManager[1177]: <info>  [1681913744.3398] device (wlp1s0): supplicant interface state: associated -> completed
Apr 19 16:15:44 xlap wpa_supplicant[1179]: wlp1s0: CTRL-EVENT-SIGNAL-CHANGE above=0 signal=-76 noise=9999 txrate=26000
Apr 19 16:15:44 xlap NetworkManager[1177]: <info>  [1681913744.3407] device (p2p-dev-wlp1s0): supplicant management interface state: associated -> completed
Apr 19 16:15:49 xlap NetworkManager[1177]: <info>  [1681913749.4690] dhcp4 (wlp1s0): state changed new lease, address=10.13.3.14
Apr 19 16:15:49 xlap avahi-daemon[1119]: Withdrawing address record for 10.13.0.162 on wlp1s0.
Apr 19 16:15:49 xlap avahi-daemon[1119]: Leaving mDNS multicast group on interface wlp1s0.IPv4 with address 10.13.0.162.
Apr 19 16:15:49 xlap avahi-daemon[1119]: Interface wlp1s0.IPv4 no longer relevant for mDNS.
Apr 19 16:15:49 xlap avahi-daemon[1119]: Joining mDNS multicast group on interface wlp1s0.IPv4 with address 10.13.3.14.
Apr 19 16:15:49 xlap avahi-daemon[1119]: New relevant interface wlp1s0.IPv4 for mDNS.
Apr 19 16:15:49 xlap avahi-daemon[1119]: Registering new address record for 10.13.3.14 on wlp1s0.IPv4.
waltinator avatar
it flag
First, that's the expected `ssh` response. Look at the network logs with the terminal command: `sudo journalctl -b 0 -u NetworkManager`. Read `man journalctl`.
petr avatar
fr flag
@waltinator Of course I understand that the ssh connection freezes when the laptop obtains a new IP address. My question is why the laptop loozes wifi connection, in logs there is nothing to indicate the reason other than the lines I showed above.
Vikas Tiwari avatar
dm flag
I also faced the same issue . Earlier i was using ubuntu 20.04 which was working fine and now upgraded to 22.04.02 LTS which keep reconnecting to WiFI and IP getting changed each time . It looks like Ubuntu 22 release the dhcp lease very frequently. @petr let me know if you found the any solution for this.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.