You are not logged in.

#1 2020-07-18 11:11:28

Knightos
Member
From: Hungary, Europe
Registered: 2020-07-18
Posts: 3

dhcpcd fails to get lease after boot, works after

Hello,

I use netctl with dhcpcd. Netctl is configured to get IP by dhcp.
My interface is an ethernet port on my motherboard.
It's a desktop computer which isn't moved around usually, so I thought about using a static profile, but I wanted to find out the root cause of this problem anyways.

dhcpcd config (default apart from noarp, which was added after this became a problem):

duid
persistent
vendorclassid
option domain_name_servers, domain_name, domain_search
option classless_static_routes
option interface_mtu
option host_name
option rapid_commit
require dhcp_server_identifier
slaac private
noipv4ll
noarp

This is my netctl config:

Interface=enp4s0
Connection=ethernet
IP=dhcp
SkipNoCarrier=yes

I tried it without SkipNoCarrier, and it didn't make a difference (apart from getting absolutely no log messages from dhcpcd, like it didn't even start)

This is the log from journalctl when booting (only relevant lines):

júl 18 12:28:32 ytterbium dhcpcd[585]: dhcpcd-9.1.4 starting
júl 18 12:28:32 ytterbium dhcpcd[588]: DUID 00:01:00:01:22:21:35:bd:c8:60:00:da:81:e4
júl 18 12:28:32 ytterbium dhcpcd[588]: enp4s0: waiting for carrier
júl 18 12:28:58 ytterbium dhcpcd[588]: enp4s0: carrier acquired
júl 18 12:28:58 ytterbium kernel: igb 0000:04:00.0 enp4s0: igb: enp4s0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
júl 18 12:28:58 ytterbium kernel: igb 0000:04:00.0 enp4s0: Link Speed was downgraded by SmartSpeed
júl 18 12:28:58 ytterbium kernel: IPv6: ADDRCONF(NETDEV_CHANGE): enp4s0: link becomes ready
júl 18 12:28:58 ytterbium dhcpcd[588]: enp4s0: IAID c4:58:8a:64
júl 18 12:29:00 ytterbium dhcpcd[588]: enp4s0: soliciting a DHCP lease
júl 18 12:29:02 ytterbium network[588]: timed out
júl 18 12:29:02 ytterbium dhcpcd[588]: timed out
júl 18 12:29:02 ytterbium dhcpcd[588]: dhcpcd exited
júl 18 12:29:02 ytterbium network[568]: DHCP IPv4 lease attempt failed on interface 'enp4s0'
júl 18 12:29:02 ytterbium network[568]: Failed to bring the network up for profile 'ks_static'
júl 18 12:29:02 ytterbium systemd[1]: netctl@ks_static.service: Main process exited, code=exited, status=1/FAILURE
júl 18 12:29:02 ytterbium systemd[1]: netctl@ks_static.service: Failed with result 'exit-code'.

This is after I run

sudo dhcpcd --renew
júl 18 12:33:30 ytterbium dhcpcd[1267]: dhcpcd-9.1.4 starting
júl 18 12:33:30 ytterbium dhcpcd[1270]: dev: loaded udev
júl 18 12:33:30 ytterbium dhcpcd[1269]: DUID 00:01:00:01:22:21:35:bd:c8:60:00:da:81:e4
júl 18 12:33:30 ytterbium dhcpcd[1269]: no interfaces have a carrier
júl 18 12:33:30 ytterbium dhcpcd[1269]: enp4s0: waiting for carrier
júl 18 12:33:30 ytterbium kernel: 8021q: adding VLAN 0 to HW filter on device enp4s0
júl 18 12:33:56 ytterbium dhcpcd[1269]: enp4s0: carrier acquired
júl 18 12:33:56 ytterbium kernel: igb 0000:04:00.0 enp4s0: igb: enp4s0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
júl 18 12:33:56 ytterbium kernel: igb 0000:04:00.0 enp4s0: Link Speed was downgraded by SmartSpeed
júl 18 12:33:56 ytterbium kernel: IPv6: ADDRCONF(NETDEV_CHANGE): enp4s0: link becomes ready
júl 18 12:33:56 ytterbium dhcpcd[1269]: enp4s0: IAID c4:58:8a:64
júl 18 12:33:56 ytterbium dhcpcd[1269]: enp4s0: adding address fe80::de5f:d558:f927:34ac
júl 18 12:33:56 ytterbium dhcpcd[1269]: enp4s0: soliciting an IPv6 router
júl 18 12:33:58 ytterbium dhcpcd[1269]: enp4s0: soliciting a DHCP lease
júl 18 12:33:58 ytterbium dhcpcd[1269]: enp4s0: Router Advertisement from fe80::5eb1:3eff:fe69:44df
júl 18 12:33:58 ytterbium dhcpcd[1269]: enp4s0: invalid prefix in RA
júl 18 12:34:03 ytterbium dhcpcd[1269]: enp4s0: offered 192.168.1.71 from 192.168.1.1
júl 18 12:34:03 ytterbium dhcpcd[1269]: enp4s0: leased 192.168.1.71 for 86400 seconds
júl 18 12:34:03 ytterbium dhcpcd[1269]: enp4s0: adding route to 192.168.1.0/24
júl 18 12:34:03 ytterbium dhcpcd[1269]: enp4s0: adding default route via 192.168.1.1

Thank you in advance for your assisstance.

Offline

#2 2020-07-18 12:47:04

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,396

Re: dhcpcd fails to get lease after boot, works after

júl 18 12:33:30 ytterbium kernel: 8021q: adding VLAN 0 to HW filter on device enp4s0

8021q is not common on desktop systems, unless they support ipmi for remote access.
What is brand and model of your motherboard / system ?


For now, disable the static profile netctl@ks_static.service .
reboot, login as root and run

netctl start ks_static

post output.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2020-07-18 13:05:13

Knightos
Member
From: Hungary, Europe
Registered: 2020-07-18
Posts: 3

Re: dhcpcd fails to get lease after boot, works after

I have an ASUS ROG STRIX B450-F GAMING motherboard, and it was working perfectly up until a week or two ago. (No network related settings were changed and no new packages were installed)

Issuing netctl start ks_static yields no useful messages in the terminal, and in the journal it looks like this:

júl 18 14:54:30 ytterbium systemd[1]: Created slice system-netctl.slice.
-- Subject: A start job for unit system-netctl.slice has finished successfully
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit system-netctl.slice has finished successfully.
-- 
-- The job identifier is 1019.
júl 18 14:54:30 ytterbium systemd[1]: Starting Networking for netctl profile ks_static...
-- Subject: A start job for unit netctl@ks_static.service has begun execution
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit netctl@ks_static.service has begun execution.
-- 
-- The job identifier is 900.
júl 18 14:54:30 ytterbium network[819]: Starting network profile 'ks_static'...
júl 18 14:54:35 ytterbium network[819]: No connection found on interface 'enp4s0' (timeout)
júl 18 14:54:35 ytterbium network[819]: Failed to bring the network up for profile 'ks_static'
júl 18 14:54:35 ytterbium systemd[1]: netctl@ks_static.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- An ExecStart= process belonging to unit netctl@ks_static.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
júl 18 14:54:35 ytterbium systemd[1]: netctl@ks_static.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- The unit netctl@ks_static.service has entered the 'failed' state with result 'exit-code'.
júl 18 14:54:35 ytterbium systemd[1]: Failed to start Networking for netctl profile ks_static.
-- Subject: A start job for unit netctl@ks_static.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit netctl@ks_static.service has finished with a failure.
-- 
-- The job identifier is 900 and the job result is failed.
júl 18 14:54:35 ytterbium audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=netctl@ks_static comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
júl 18 14:54:35 ytterbium systemd[1]: Reached target Network.
-- Subject: A start job for unit network.target has finished successfully
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- A start job for unit network.target has finished successfully.
-- 
-- The job identifier is 1022.
júl 18 14:54:35 ytterbium kernel: audit: type=1130 audit(1595076875.393:121): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=netctl@ks_static comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'

Running dhcpcd --renew fixed it again.

I have to leave for the weekend, so excuse me if I do not answer, I won't have access to my computer.

Offline

#4 2020-07-18 13:57:51

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,396

Re: dhcpcd fails to get lease after boot, works after

netctl start ks_static yields no useful messages in the terminal, 

Please leave that judgement to others, just post the lines that are outputted.
If you meant there was no terminal output after issuing that command, make that clear.


When you get back please post full journal and/or dmesg , along with the outputs of   

$ ip address
$ lspci -k

Some of those outputs are likely to be long, consider using a pastebin client


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#5 2020-07-22 14:08:24

Knightos
Member
From: Hungary, Europe
Registered: 2020-07-18
Posts: 3

Re: dhcpcd fails to get lease after boot, works after

Hello, sorry, the output of netctl start ks_static is:

Job for netctl@ks_static.service failed because the control process exited with error code.
See "systemctl status netctl@ks_static.service" and "journalctl -xe" for details.

So what I did for these logs:
Rebooted, logged in as root, issued: netctl start ks_static
After that, I saved the output of ip address and lspci -k.
ip address: http://ix.io/22JM
lspci -k: http://ix.io/22Lj
After this, I issued dhcpcd --renew, and saved the log of both dmesg and journalctl.
journalctl: http://ix.io/22Ll
dmesg: http://ix.io/22Lm

Thank you for your patience.

Offline

Board footer

Powered by FluxBB