You are not logged in.

#1 2018-02-26 13:13:58

M5Hc6UsQ
Member
Registered: 2018-02-26
Posts: 4

Wired connection always drops when the IP expires

Hi,

I have the problem that the wired connection always drops when the IP expires. I would expect that the IP gets renewed before it expires but it doesn't seem to be the case.  It would be great if someone can help me to solve this issue. Below the log of  the NetworkManager and some information about my network controller. Simply ask if I should provide more information. Thanks for your help smile

$ sudo journalctl --unit NetworkManager.service

Feb 26 13:56:32 archdesk NetworkManager[370]: <info>  [1519649792.7510] dhcp4 (enp4s0): state changed bound -> expire
Feb 26 13:56:32 archdesk NetworkManager[370]: <info>  [1519649792.7620] dhcp4 (enp4s0): canceled DHCP transaction
Feb 26 13:56:32 archdesk NetworkManager[370]: <info>  [1519649792.7621] dhcp4 (enp4s0): state changed expire -> done
Feb 26 13:56:32 archdesk NetworkManager[370]: <info>  [1519649792.7624] device (enp4s0): scheduling DHCPv4 restart in 120 seconds, 3 tries left (reason: lease expired)
Feb 26 13:56:35 archdesk NetworkManager[370]: <info>  [1519649795.1482] manager: NetworkManager state is now CONNECTED_SITE
Feb 26 13:58:32 archdesk NetworkManager[370]: <info>  [1519649912.9205] dhcp4 (enp4s0): activation: beginning transaction (timeout in 45 seconds)
Feb 26 13:58:33 archdesk NetworkManager[370]: <info>  [1519649913.0313] dhcp4 (enp4s0):   address 192.168.0.214
Feb 26 13:58:33 archdesk NetworkManager[370]: <info>  [1519649913.0314] dhcp4 (enp4s0):   plen 24
Feb 26 13:58:33 archdesk NetworkManager[370]: <info>  [1519649913.0314] dhcp4 (enp4s0):   expires in 3600 seconds
Feb 26 13:58:33 archdesk NetworkManager[370]: <info>  [1519649913.0314] dhcp4 (enp4s0):   nameserver '192.168.0.1'
Feb 26 13:58:33 archdesk NetworkManager[370]: <info>  [1519649913.0314] dhcp4 (enp4s0):   domain name 'home'
Feb 26 13:58:33 archdesk NetworkManager[370]: <info>  [1519649913.0314] dhcp4 (enp4s0):   hostname 'archdesk'
Feb 26 13:58:33 archdesk NetworkManager[370]: <info>  [1519649913.0315] dhcp4 (enp4s0):   gateway 192.168.0.1
Feb 26 13:58:33 archdesk NetworkManager[370]: <info>  [1519649913.0317] dhcp4 (enp4s0): state changed unknown -> bound
Feb 26 13:58:33 archdesk NetworkManager[370]: <info>  [1519649913.0323] policy: set 'Kabelgebundene Verbindung 1' (enp4s0) as default for IPv4 routing and DNS
Feb 26 13:58:34 archdesk NetworkManager[370]: <info>  [1519649914.0868] manager: NetworkManager state is now CONNECTED_GLOBAL
$ sudo lshw -C network

  *-network                 
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:04:00.0
       logical name: enp4s0
       version: 02
       serial: 00:1f:d0:28:03:86
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full ip=192.168.0.214 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
       resources: irq:25 ioport:c000(size=256) memory:e9010000-e9010fff memory:e9000000-e900ffff memory:e7000000-e700ffff

Offline

#2 2018-02-26 15:04:24

seth
Member
Registered: 2012-09-03
Posts: 7,235

Re: Wired connection always drops when the IP expires

Online

#3 2018-02-26 16:37:24

M5Hc6UsQ
Member
Registered: 2018-02-26
Posts: 4

Re: Wired connection always drops when the IP expires

No it's not static. Tried with dhclient, but it doesn't solved the issue.

Feb 26 17:10:39 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:10:53 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:11:04 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:11:19 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:11:37 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:11:44 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:11:56 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:12:03 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:12:11 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:12:26 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:12:41 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:12:52 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:13:11 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:13:19 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:13:32 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:13:43 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:13:55 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:14:11 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:14:25 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:14:41 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:14:58 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:15:06 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:15:14 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:15:25 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:15:34 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:15:45 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:15:53 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:16:07 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:16:19 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:16:38 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:16:51 archdesk dhclient[19654]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:16:56 archdesk NetworkManager[19642]: <info>  [1519661816.9082] manager: NetworkManager state is now CONNECTED_SITE
Feb 26 17:16:57 archdesk NetworkManager[19642]: <info>  [1519661817.4668] dhcp4 (enp4s0): state changed bound -> expire
Feb 26 17:16:57 archdesk NetworkManager[19642]: <info>  [1519661817.4749] dhcp4 (enp4s0): canceled DHCP transaction, DHCP client pid 19654
Feb 26 17:16:57 archdesk NetworkManager[19642]: <info>  [1519661817.4749] dhcp4 (enp4s0): state changed expire -> done
Feb 26 17:16:57 archdesk NetworkManager[19642]: <info>  [1519661817.4753] device (enp4s0): scheduling DHCPv4 restart in 120 seconds, 3 tries left (reason: lease expired)
Feb 26 17:17:25 archdesk NetworkManager[19642]: <info>  [1519661845.8796] connectivity: (enp4s0) timed out
Feb 26 17:18:57 archdesk NetworkManager[19642]: <info>  [1519661937.9184] dhcp4 (enp4s0): activation: beginning transaction (timeout in 45 seconds)
Feb 26 17:18:57 archdesk NetworkManager[19642]: <info>  [1519661937.9213] dhcp4 (enp4s0): dhclient started with pid 20855
Feb 26 17:18:57 archdesk dhclient[20855]: DHCPDISCOVER on enp4s0 to 255.255.255.255 port 67 interval 7
Feb 26 17:18:58 archdesk dhclient[20855]: DHCPOFFER of 192.168.0.214 from 192.168.0.1
Feb 26 17:18:58 archdesk dhclient[20855]: DHCPREQUEST for 192.168.0.214 on enp4s0 to 255.255.255.255 port 67
Feb 26 17:18:58 archdesk dhclient[20855]: DHCPACK of 192.168.0.214 from 192.168.0.1
Feb 26 17:18:58 archdesk NetworkManager[19642]: <info>  [1519661938.1268] dhcp4 (enp4s0):   address 192.168.0.214
Feb 26 17:18:58 archdesk NetworkManager[19642]: <info>  [1519661938.1268] dhcp4 (enp4s0):   plen 24 (255.255.255.0)
Feb 26 17:18:58 archdesk NetworkManager[19642]: <info>  [1519661938.1268] dhcp4 (enp4s0):   gateway 192.168.0.1
Feb 26 17:18:58 archdesk NetworkManager[19642]: <info>  [1519661938.1269] dhcp4 (enp4s0):   lease time 3600
Feb 26 17:18:58 archdesk NetworkManager[19642]: <info>  [1519661938.1269] dhcp4 (enp4s0):   hostname 'archdesk'
Feb 26 17:18:58 archdesk NetworkManager[19642]: <info>  [1519661938.1269] dhcp4 (enp4s0):   nameserver '192.168.0.1'
Feb 26 17:18:58 archdesk NetworkManager[19642]: <info>  [1519661938.1269] dhcp4 (enp4s0):   domain name 'home'
Feb 26 17:18:58 archdesk NetworkManager[19642]: <info>  [1519661938.1269] dhcp4 (enp4s0): state changed unknown -> bound
Feb 26 17:18:58 archdesk NetworkManager[19642]: <info>  [1519661938.1301] policy: set 'Kabelgebundene Verbindung 1' (enp4s0) as default for IPv4 routing and DNS
Feb 26 17:18:58 archdesk dhclient[20855]: bound to 192.168.0.214 -- renewal in 1601 seconds.
Feb 26 17:18:59 archdesk NetworkManager[19642]: <info>  [1519661939.2006] manager: NetworkManager state is now CONNECTED_GLOBAL

Offline

#4 2018-02-26 22:46:25

seth
Member
Registered: 2012-09-03
Posts: 7,235

Re: Wired connection always drops when the IP expires

This looks like you get "expired" immediately - do you have control over the dhcp server (typically your router)? Check it's settings for lease expiration - usually a "0" delay would mean "never" but maybe it (wrongly?) treats it like "immediately" - so try to set a more legit value (24h or so)

Online

#5 2018-02-27 09:55:51

M5Hc6UsQ
Member
Registered: 2018-02-26
Posts: 4

Re: Wired connection always drops when the IP expires

At the moment the lease expires after 3600s. The connection is stable for that hour. Could it be that the router simply ignores the dhcp request before the lease is expired? It looks like dhclient is constantly sending a request but not getting a response.

I just increased the lease time to 24h. Hopefully the connection is now reliable, but I consider this more a workaround that an actual solution. Yes I know that it doesn't make that much sense to set the lease time to 1h in a small home network (was the default on that router), but I'm a guy who wants to know the reason why something isn't working as expected even if I can get around the issue. Therefore if you have any further thoughts don't hold back smile

Offline

#6 2018-02-27 12:58:39

seth
Member
Registered: 2012-09-03
Posts: 7,235

Re: Wired connection always drops when the IP expires

I was referring to

Feb 26 17:16:56 archdesk NetworkManager[19642]: <info>  [1519661816.9082] manager: NetworkManager state is now CONNECTED_SITE
Feb 26 17:16:57 archdesk NetworkManager[19642]: <info>  [1519661817.4668] dhcp4 (enp4s0): state changed bound -> expire

It certainly looks like the connection expires immediately?

Online

#7 2018-02-27 13:10:55

M5Hc6UsQ
Member
Registered: 2018-02-26
Posts: 4

Re: Wired connection always drops when the IP expires

This happened exactly after 1h, which seams correct because the lease time was set to 3600s. After that time it should expire immediately, or am I wrong? What I don't understand is why the lease doesn't get renewed before it expires. Then the NetworkManager waits 2 minutes to request a new IP?

Offline

#8 2018-02-27 13:19:24

seth
Member
Registered: 2012-09-03
Posts: 7,235

Re: Wired connection always drops when the IP expires

So the massive amount of DHCPREQUEST's corresponds to the renewal?
This would imply the router simply ignores the renewal request, may relate to the clientid handling; try passing "-i" to dhclient and see "man dhclient (-D LL/LLT)"

Online

#9 2018-03-27 10:07:35

schmunk
Member
Registered: 2018-03-27
Posts: 9

Re: Wired connection always drops when the IP expires

I am seeing a similar issue since one or two days, but in my case it's a wireless connection.
There are some lines related to Docker inbetween, but my connection also drops from time to time.

Mär 27 09:54:00 xps-15 NetworkManager[490]: <info>  [1522137240.0016] device (enp0s20f0u2c4i2): state change: activated -> unmanaged (reason 'removed', sys-iface-state: 'removed')
Mär 27 09:54:00 xps-15 NetworkManager[490]: <info>  [1522137240.0018] dhcp4 (enp0s20f0u2c4i2): canceled DHCP transaction
Mär 27 09:54:00 xps-15 NetworkManager[490]: <info>  [1522137240.0018] dhcp4 (enp0s20f0u2c4i2): state changed bound -> done
Mär 27 09:54:00 xps-15 NetworkManager[490]: <info>  [1522137240.0023] dhcp6 (enp0s20f0u2c4i2): canceled DHCP transaction
Mär 27 09:54:00 xps-15 NetworkManager[490]: <info>  [1522137240.0023] dhcp6 (enp0s20f0u2c4i2): state changed bound -> done
Mär 27 10:39:47 xps-15 NetworkManager[490]: <info>  [1522139987.6869] dhcp4 (wlp2s0): state changed bound -> expire
Mär 27 10:39:47 xps-15 NetworkManager[490]: <info>  [1522139987.6939] dhcp4 (wlp2s0): canceled DHCP transaction
Mär 27 10:39:47 xps-15 NetworkManager[490]: <info>  [1522139987.6940] dhcp4 (wlp2s0): state changed expire -> done
Mär 27 10:39:47 xps-15 NetworkManager[490]: <info>  [1522139987.6943] device (wlp2s0): scheduling DHCPv4 restart in 120 seconds, 3 tries left (reason: lease expired)
Mär 27 10:39:49 xps-15 NetworkManager[490]: <info>  [1522139989.5769] manager: NetworkManager state is now CONNECTED_SITE
Mär 27 10:41:47 xps-15 NetworkManager[490]: <info>  [1522140107.8604] dhcp4 (wlp2s0): activation: beginning transaction (timeout in 45 seconds)
Mär 27 10:41:47 xps-15 NetworkManager[490]: <info>  [1522140107.9140] dhcp4 (wlp2s0):   address 192.168.23.127
Mär 27 10:41:47 xps-15 NetworkManager[490]: <info>  [1522140107.9141] dhcp4 (wlp2s0):   plen 24
Mär 27 10:41:47 xps-15 NetworkManager[490]: <info>  [1522140107.9142] dhcp4 (wlp2s0):   expires in 3600 seconds
Mär 27 10:41:47 xps-15 NetworkManager[490]: <info>  [1522140107.9142] dhcp4 (wlp2s0):   nameserver '192.168.23.17'
Mär 27 10:41:47 xps-15 NetworkManager[490]: <info>  [1522140107.9142] dhcp4 (wlp2s0):   nameserver '8.8.4.4'
Mär 27 10:41:47 xps-15 NetworkManager[490]: <info>  [1522140107.9143] dhcp4 (wlp2s0):   gateway 192.168.23.1
Mär 27 10:41:47 xps-15 NetworkManager[490]: <info>  [1522140107.9147] dhcp4 (wlp2s0): state changed unknown -> bound
Mär 27 10:41:47 xps-15 NetworkManager[490]: <info>  [1522140107.9167] policy: set 'hrzg_5G 1' (wlp2s0) as default for IPv4 routing and DNS
Mär 27 10:41:48 xps-15 NetworkManager[490]: <info>  [1522140108.9569] manager: NetworkManager state is now CONNECTED_GLOBAL
Mär 27 11:05:22 xps-15 NetworkManager[490]: <info>  [1522141522.3870] manager: (veth5525e88): new Veth device (/org/freedesktop/NetworkManager/Devices/271)
Mär 27 11:05:22 xps-15 NetworkManager[490]: <info>  [1522141522.3881] manager: (vethb54de98): new Veth device (/org/freedesktop/NetworkManager/Devices/272)
Mär 27 11:05:22 xps-15 NetworkManager[490]: <info>  [1522141522.5084] device (vethb54de98): carrier: link connected
Mär 27 11:05:22 xps-15 NetworkManager[490]: <info>  [1522141522.5086] device (docker0): carrier: link connected
Mär 27 11:05:31 xps-15 NetworkManager[490]: <info>  [1522141531.8595] manager: (veth5525e88): new Veth device (/org/freedesktop/NetworkManager/Devices/273)
Mär 27 11:05:31 xps-15 NetworkManager[490]: <info>  [1522141531.9026] device (vethb54de98): released from master device docker0
Mär 27 11:41:45 xps-15 NetworkManager[490]: <info>  [1522143705.1417] dhcp4 (wlp2s0): state changed bound -> expire
Mär 27 11:41:45 xps-15 NetworkManager[490]: <info>  [1522143705.1500] dhcp4 (wlp2s0): canceled DHCP transaction
Mär 27 11:41:45 xps-15 NetworkManager[490]: <info>  [1522143705.1501] dhcp4 (wlp2s0): state changed expire -> done
Mär 27 11:41:45 xps-15 NetworkManager[490]: <info>  [1522143705.1504] device (wlp2s0): scheduling DHCPv4 restart in 120 seconds, 3 tries left (reason: lease expired)
Mär 27 11:41:48 xps-15 NetworkManager[490]: <info>  [1522143708.7400] manager: NetworkManager state is now CONNECTED_SITE
Mär 27 11:43:45 xps-15 NetworkManager[490]: <info>  [1522143825.8610] dhcp4 (wlp2s0): activation: beginning transaction (timeout in 45 seconds)
Mär 27 11:44:30 xps-15 NetworkManager[490]: <warn>  [1522143870.8611] dhcp4 (wlp2s0): request timed out
Mär 27 11:44:30 xps-15 NetworkManager[490]: <info>  [1522143870.8612] dhcp4 (wlp2s0): state changed unknown -> timeout
Mär 27 11:44:30 xps-15 NetworkManager[490]: <info>  [1522143870.8686] dhcp4 (wlp2s0): canceled DHCP transaction
Mär 27 11:44:30 xps-15 NetworkManager[490]: <info>  [1522143870.8687] dhcp4 (wlp2s0): state changed timeout -> done
Mär 27 11:44:30 xps-15 NetworkManager[490]: <info>  [1522143870.8693] device (wlp2s0): scheduling DHCPv4 restart in 120 seconds, 2 tries left (reason: lease expired)
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.5866] manager: (veth84c3303): new Veth device (/org/freedesktop/NetworkManager/Devices/274)
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.5887] manager: (veth95b55d7): new Veth device (/org/freedesktop/NetworkManager/Devices/275)
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.5902] manager: (veth6bb52b3): new Veth device (/org/freedesktop/NetworkManager/Devices/276)
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.6092] device (veth4b951bc): released from master device br-10193edc1c22
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.6408] device (vethf1fc218): released from master device br-10193edc1c22
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.6748] device (veth8b2e0cc): released from master device br-769c5416fe2e
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.7014] manager: (veth679200b): new Veth device (/org/freedesktop/NetworkManager/Devices/277)
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.7225] device (veth7f5fb37): released from master device br-769c5416fe2e
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.8263] manager: (veth5efee4d): new Veth device (/org/freedesktop/NetworkManager/Devices/278)
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.8275] manager: (veth5ca03fa): new Veth device (/org/freedesktop/NetworkManager/Devices/279)
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.8622] dhcp4 (wlp2s0): activation: beginning transaction (timeout in 45 seconds)
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.8641] manager: (veth7dca8b6): new Veth device (/org/freedesktop/NetworkManager/Devices/280)
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.8696] device (veth54bddd3): released from master device br-10193edc1c22
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.8970] device (veth39cfd21): released from master device br-769c5416fe2e
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.9233] device (veth61a2292): released from master device br-829a2a33ab1e
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.9531] dhcp4 (wlp2s0):   address 192.168.23.127
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.9532] dhcp4 (wlp2s0):   plen 24
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.9532] dhcp4 (wlp2s0):   expires in 3600 seconds
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.9532] dhcp4 (wlp2s0):   nameserver '192.168.23.17'
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.9533] dhcp4 (wlp2s0):   nameserver '8.8.4.4'
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.9533] dhcp4 (wlp2s0):   gateway 192.168.23.1
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.9538] dhcp4 (wlp2s0): state changed unknown -> bound
Mär 27 11:46:30 xps-15 NetworkManager[490]: <info>  [1522143990.9578] policy: set 'hrzg_5G 1' (wlp2s0) as default for IPv4 routing and DNS
Mär 27 11:46:31 xps-15 NetworkManager[490]: <info>  [1522143991.9992] manager: NetworkManager state is now CONNECTED_GLOBAL
Mär 27 11:46:38 xps-15 NetworkManager[490]: <info>  [1522143998.1329] device (br-829a2a33ab1e): state change: activated -> unmanaged (reason 'unmanaged', sys-iface-state: 'removed')
Mär 27 11:46:38 xps-15 NetworkManager[490]: <info>  [1522143998.2471] device (br-9bc4e921fd08): state change: activated -> unmanaged (reason 'unmanaged', sys-iface-state: 'removed')
Mär 27 11:46:38 xps-15 NetworkManager[490]: <info>  [1522143998.4394] device (br-10193edc1c22): state change: activated -> unmanaged (reason 'unmanaged', sys-iface-state: 'removed')
Mär 27 11:46:38 xps-15 NetworkManager[490]: <info>  [1522143998.6289] device (br-769c5416fe2e): state change: activated -> unmanaged (reason 'unmanaged', sys-iface-state: 'removed')

Offline

#10 2018-03-27 13:23:59

seth
Member
Registered: 2012-09-03
Posts: 7,235

Re: Wired connection always drops when the IP expires

Do you have more than one network service enabled/running?

systemctl list-unit-files --state=enabled

Online

#11 2018-03-27 13:26:30

schmunk
Member
Registered: 2018-03-27
Posts: 9

Re: Wired connection always drops when the IP expires

I've also recently configured VPN, but it's not enabled.

UNIT FILE                                   STATE  
org.cups.cupsd.path                         enabled
autovt@.service                             enabled
avahi-daemon.service                        enabled
bluetooth.service                           enabled
dbus-org.bluez.service                      enabled
dbus-org.freedesktop.Avahi.service          enabled
dbus-org.freedesktop.ModemManager1.service  enabled
dbus-org.freedesktop.NetworkManager.service enabled
dbus-org.freedesktop.nm-dispatcher.service  enabled
display-manager.service                     enabled
docker.service                              enabled
gdm.service                                 enabled
getty@.service                              enabled
haveged.service                             enabled
ModemManager.service                        enabled
NetworkManager-dispatcher.service           enabled
NetworkManager.service                      enabled
nfs-server.service                          enabled
org.cups.cupsd.service                      enabled
rpcbind.service                             enabled
sshd.service                                enabled
systemd-timesyncd.service                   enabled
ufw.service                                 enabled
avahi-daemon.socket                         enabled
org.cups.cupsd.socket                       enabled
remote-fs.target                            enabled
pamac-cleancache.timer                      enabled

27 unit files listed.

Offline

#12 2018-03-27 14:17:26

EndUserOnly
Member
Registered: 2017-05-31
Posts: 12

Re: Wired connection always drops when the IP expires

Which dhcp client are you using, dhcpcd or dhclient? A broad range of wireless issues seem to be tied to a dhclient resolution.

Offline

#13 2018-03-27 14:19:27

seth
Member
Registered: 2012-09-03
Posts: 7,235

Re: Wired connection always drops when the IP expires

The integrated one (it seems), thus see https://wiki.archlinux.org/index.php/Ne … HCP_client

Online

#14 2018-03-27 14:22:15

schmunk
Member
Registered: 2018-03-27
Posts: 9

Re: Wired connection always drops when the IP expires

I only have dhcpcd installed, I'll give dhclient a try. Thank you for the feedback.

Offline

#15 2018-03-27 14:23:06

schmunk
Member
Registered: 2018-03-27
Posts: 9

Re: Wired connection always drops when the IP expires

Side question: Should I uninstall dhcpcd?

Offline

#16 2018-03-27 15:28:53

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 4,701

Re: Wired connection always drops when the IP expires

Not necessarily, you just have to ensure that its service is disabled, otherwise it will cause conflicts.

Offline

#17 2018-03-28 15:57:36

EndUserOnly
Member
Registered: 2017-05-31
Posts: 12

Re: Wired connection always drops when the IP expires

I agree with V1del. Always good to have a backup in case something stupid happens. Of course after you disable dhcpcd you will need to restart. Or systemctl stop; then systemctl disable.

Offline

#18 2018-03-28 16:41:59

schmunk
Member
Registered: 2018-03-27
Posts: 9

Re: Wired connection always drops when the IP expires

Hmm, I ran into some weird issues, since I tried to use dhclient. From what you've written I think I did the switch right. I installed dhclient, then stopped and disabled dhcpcd.

In the meantime I reverted the change, but I might give it another try.

But some more questions ...

Under the Link you gave me: https://wiki.archlinux.org/index.php/Ne … HCP_client it says that I should configure NetworkManager to use dhclient. But isn't that the default anyway, when it is installed, it's stated under "Configure NetworkManager" - can I just omit creating `/etc/NetworkManager/conf.d/dhcp-client.conf`?

The alternative dhcp=dhclient is used per default, if this option is not set.

And what I've might have missed is restarting the NetworkManager - this is the GNOME service, which uses either dhclient or dhcpcd, right?

Offline

#19 2018-03-28 16:56:21

seth
Member
Registered: 2012-09-03
Posts: 7,235

Re: Wired connection always drops when the IP expires

Why was dhcpcd running itfp? It's not enabled according to #11
I've no idea what NM does by default, but if the journal has lines like "NetworkManager[490]: <info>  [1522139987.6940] dhcp4 (wlp2s0)" but none for dhclient, you're using the internal client. I'll grant you that the wiki sections are contradicting - this should certainly be figured and the relevant section be fixed.

Online

#20 2018-03-28 17:16:20

schmunk
Member
Registered: 2018-03-27
Posts: 9

Re: Wired connection always drops when the IP expires

> Why was dhcpcd running itfp? It's not enabled according to #11

Ah, interesting ... I will watch out for that.
Maybe it's because I am on Antergos, mea culpa - or GNOME does that somehow.

Generally related issue: https://bbs.archlinux.org/viewtopic.php … 3#p1429603

Offline

#21 2018-03-28 17:59:09

progandy
Member
Registered: 2012-05-17
Posts: 2,884

Re: Wired connection always drops when the IP expires

Edit: Antergos is not Arch Linux, so don't ask for help from us.
schmunk wrote:

Under the Link you gave me: https://wiki.archlinux.org/index.php/Ne … HCP_client it says that I should configure NetworkManager to use dhclient. But isn't that the default anyway, when it is installed, it's stated under "Configure NetworkManager" - can I just omit creating `/etc/NetworkManager/conf.d/dhcp-client.conf`?

In this case the wiki was probably written for an older version and has not been updated.

https://manned.org/NetworkManager.conf/ae5e0dc2

       dhcp
           This key sets up what DHCP client NetworkManager will use. Allowed
           values are dhclient, dhcpcd, and internal. The dhclient and dhcpcd
           options require the indicated clients to be installed. The internal
           option uses a built-in DHCP client which is not currently as
           featureful as the external clients.

           If this key is missing, it defaults to internal. It the chosen plugin
           is not available, clients are looked for in this order: dhclient,
           dhcpcd, internal.

schmunk wrote:

And what I've might have missed is restarting the NetworkManager - this is the GNOME service, which uses either dhclient or dhcpcd, right?

That is correct, but it has an internal dhcp client as well.

Last edited by progandy (2018-03-28 18:07:30)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#22 2018-03-28 19:02:07

schmunk
Member
Registered: 2018-03-27
Posts: 9

Re: Wired connection always drops when the IP expires

@progandy I posted a question in the "Newbie Corner" about your first link, not to pollute this thread: https://bbs.archlinux.org/viewtopic.php?id=235758

Offline

#23 2018-03-30 11:40:35

EndUserOnly
Member
Registered: 2017-05-31
Posts: 12

Re: Wired connection always drops when the IP expires

Good idea.... You need to figure out how your network works to fix it.

Offline

#24 2018-04-02 18:17:30

schmunk
Member
Registered: 2018-03-27
Posts: 9

Re: Wired connection always drops when the IP expires

It does not look to me that the lease gets expired immediately.
You should check your logs if at least the massive amount of requests accours around 30 minutes after you get your release.

The DHCP ensures reliability in several ways: periodic renewal, rebinding,[7]:Section 4.4.5 and failover. DHCP clients are allocated leases that last for some period of time. Clients begin to attempt to renew their leases once half the lease interval has expired.


If rebinding fails, the lease will eventually expire. When the lease expires, the client must stop using the IP address granted to it in its lease.

https://en.wikipedia.org/wiki/Dynamic_H … eliability

According to the above your DHCP client drops the connection correctly after he did not get a new lease.
After it was dropped he can a acquire a new one.

Here's how it looks when it works correctly...

Mär 29 10:43:21 xps-15 NetworkManager[13755]: <info>  [1522313001.3933] dhcp4 (wlp2s0): canceled DHCP transaction
Mär 29 10:43:21 xps-15 NetworkManager[13755]: <info>  [1522313001.3933] dhcp4 (wlp2s0): state changed bound -> done
Mär 29 10:43:21 xps-15 NetworkManager[14382]: <info>  [1522313001.4614] Read config: /etc/NetworkManager/NetworkManager.conf (lib: 20-connectivity.conf) (etc: dhcp-client.conf)
Mär 29 10:43:21 xps-15 NetworkManager[14382]: <info>  [1522313001.7394] dhcp-init: Using DHCP client 'dhclient'
Mär 29 10:43:33 xps-15 NetworkManager[14382]: <info>  [1522313013.5559] dhcp4 (wlp2s0): activation: beginning transaction (timeout in 45 seconds)
Mär 29 10:43:33 xps-15 NetworkManager[14382]: <info>  [1522313013.5591] dhcp4 (wlp2s0): dhclient started with pid 14422
Mär 29 10:43:33 xps-15 dhclient[14422]: DHCPDISCOVER on wlp2s0 to 255.255.255.255 port 67 interval 6
Mär 29 10:43:33 xps-15 dhclient[14422]: DHCPOFFER of 192.168.23.127 from 192.168.23.1
Mär 29 10:43:33 xps-15 dhclient[14422]: DHCPREQUEST for 192.168.23.127 on wlp2s0 to 255.255.255.255 port 67
Mär 29 10:43:33 xps-15 dhclient[14422]: DHCPACK of 192.168.23.127 from 192.168.23.1
Mär 29 10:43:33 xps-15 NetworkManager[14382]: <info>  [1522313013.6140] dhcp4 (wlp2s0):   address 192.168.23.127
Mär 29 10:43:33 xps-15 NetworkManager[14382]: <info>  [1522313013.6140] dhcp4 (wlp2s0):   plen 24 (255.255.255.0)
Mär 29 10:43:33 xps-15 NetworkManager[14382]: <info>  [1522313013.6141] dhcp4 (wlp2s0):   gateway 192.168.23.1
Mär 29 10:43:33 xps-15 NetworkManager[14382]: <info>  [1522313013.6141] dhcp4 (wlp2s0):   lease time 3600
Mär 29 10:43:33 xps-15 NetworkManager[14382]: <info>  [1522313013.6142] dhcp4 (wlp2s0):   nameserver '192.168.23.17'
Mär 29 10:43:33 xps-15 NetworkManager[14382]: <info>  [1522313013.6142] dhcp4 (wlp2s0):   nameserver '8.8.4.4'
Mär 29 10:43:33 xps-15 NetworkManager[14382]: <info>  [1522313013.6143] dhcp4 (wlp2s0): state changed unknown -> bound
Mär 29 10:43:33 xps-15 dhclient[14422]: bound to 192.168.23.127 -- renewal in 1773 seconds.

...

Mär 29 11:13:06 xps-15 dhclient[14422]: DHCPREQUEST for 192.168.23.127 on wlp2s0 to 192.168.23.1 port 67
Mär 29 11:13:07 xps-15 dhclient[14422]: DHCPACK of 192.168.23.127 from 192.168.23.1
Mär 29 11:13:07 xps-15 NetworkManager[14382]: <info>  [1522314787.0471] dhcp4 (wlp2s0):   address 192.168.23.127
Mär 29 11:13:07 xps-15 NetworkManager[14382]: <info>  [1522314787.0472] dhcp4 (wlp2s0):   plen 24 (255.255.255.0)
Mär 29 11:13:07 xps-15 NetworkManager[14382]: <info>  [1522314787.0472] dhcp4 (wlp2s0):   gateway 192.168.23.1
Mär 29 11:13:07 xps-15 NetworkManager[14382]: <info>  [1522314787.0473] dhcp4 (wlp2s0):   lease time 3600
Mär 29 11:13:07 xps-15 NetworkManager[14382]: <info>  [1522314787.0473] dhcp4 (wlp2s0):   nameserver '192.168.23.17'
Mär 29 11:13:07 xps-15 NetworkManager[14382]: <info>  [1522314787.0473] dhcp4 (wlp2s0):   nameserver '8.8.4.4'
Mär 29 11:13:07 xps-15 NetworkManager[14382]: <info>  [1522314787.0473] dhcp4 (wlp2s0): state changed bound -> bound
Mär 29 11:13:07 xps-15 dhclient[14422]: bound to 192.168.23.127 -- renewal in 1588 seconds.
Mär 29 11:13:07 xps-15 nm-dispatcher[16560]: req:1 'dhcp4-change' [wlp2s0]: new request (0 scripts)
Mär 29 11:13:07 xps-15 nm-dispatcher[16560]: req:1 'dhcp4-change' [wlp2s0]: completed: no scripts

About my issue and dhclient vs. dhcpcd and why dhcpcd was not running...

Firstly, NetworkManager does not choose dhclient when it's "just" installed, so the wiki page should be updated.
Secondly, dhcpcd should not run as a service, since its invocation is managed via NetworkManager.

- https://bbs.archlinux.org/viewtopic.php?id=235502
- https://bbs.archlinux.org/viewtopic.php?id=152376
- https://bbs.archlinux.org/viewtopic.php … 4#p1331014

Offline

Board footer

Powered by FluxBB