You are not logged in.

#1 2018-05-15 04:32:40

Med
Member
Registered: 2011-08-08
Posts: 16

[SOLVED] Card does not respond for about 30s → dhcpcd fails at boot

I am having a very strange issue trying to get an IP using dhcpcd with an intel X520 SFP+ network card: it only ever works when the card has been up for a while. Conversely the integrated network cards work fine right away. The consequence is that the first call to dhcpcd at boot fails. Only a second later call works.

1st time:

dhcpcd[1796]: dhcpcd-7.0.4 starting
dhcpcd[1796]: enp81s0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
dhcpcd[1796]: enp81s0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' NOCARRIER
kernel: ixgbe 0000:51:00.0: registered PHC device on enp81s0
kernel: IPv6: ADDRCONF(NETDEV_UP): enp81s0: link is not ready
kernel: 8021q: adding VLAN 0 to HW filter on device enp81s0
dhcpcd[1796]: enp81s0: waiting for carrier
kernel: ixgbe 0000:51:00.0 enp81s0: detected SFP+: 5
kernel: ixgbe 0000:51:00.0 enp81s0: NIC Link is Up 10 Gbps, Flow Control: RX/TX
kernel: IPv6: ADDRCONF(NETDEV_CHANGE): enp81s0: link becomes ready
dhcpcd[1796]: enp81s0: carrier acquired
dhcpcd[1796]: enp81s0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' CARRIER
dhcpcd[1796]: DUID 00:01:00:01:22:4d:6e:74:0c:c4:7a:f9:ab:8a
dhcpcd[1796]: enp81s0: IAID 21:bb:19:fa
dhcpcd[1796]: enp81s0: adding address fe80::e00f:f3fc:b5d0:cdda
dhcpcd[1796]: enp81s0: pltime infinity, vltime infinity
dhcpcd[1796]: enp81s0: delaying IPv6 router solicitation for 0.8 seconds
dhcpcd[1796]: enp81s0: delaying IPv4 for 0.5 seconds
dhcpcd[1796]: enp81s0: reading lease `/var/lib/dhcpcd/enp81s0.lease'
dhcpcd[1796]: enp81s0: rebinding lease of 172.20.13.45
dhcpcd[1796]: enp81s0: sending REQUEST (xid 0x47accebe), next in 4.0 seconds
dhcpcd[1796]: enp81s0: soliciting an IPv6 router
dhcpcd[1796]: enp81s0: delaying Router Solicitation for LL address
dhcpcd[1796]: enp81s0: sending Router Solicitation
dhcpcd[1796]: enp81s0: sending REQUEST (xid 0x47accebe), next in 8.2 seconds
dhcpcd[1796]: enp81s0: sending Router Solicitation
dhcpcd[1796]: enp81s0: DHCP lease expired
dhcpcd[1796]: enp81s0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' EXPIRE
dhcpcd[1796]: enp81s0: soliciting a DHCP lease
dhcpcd[1796]: enp81s0: sending DISCOVER (xid 0xf461d17c), next in 4.7 seconds
dhcpcd[1796]: enp81s0: sending Router Solicitation
dhcpcd[1796]: enp81s0: sending DISCOVER (xid 0xf461d17c), next in 8.3 seconds
dhcpcd[1796]: enp81s0: sending Router Solicitation
dhcpcd[1796]: enp81s0: no IPv6 Routers available
dhcpcd[1796]: enp81s0: sending DISCOVER (xid 0xf461d17c), next in 16.2 seconds
dhcpcd[1796]: timed out
dhcpcd[1796]: dhcpcd exited

2nd time:

dhcpcd[1842]: dhcpcd-7.0.4 starting
dhcpcd[1842]: enp81s0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' PREINIT
dhcpcd[1842]: enp81s0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' CARRIER
dhcpcd[1842]: DUID 00:01:00:01:22:4d:6e:74:0c:c4:7a:f9:ab:8a
dhcpcd[1842]: enp81s0: IAID 21:bb:19:fa
dhcpcd[1842]: enp81s0: delaying IPv6 router solicitation for 0.0 seconds
dhcpcd[1842]: enp81s0: delaying IPv4 for 0.3 seconds
dhcpcd[1842]: enp81s0: soliciting an IPv6 router
dhcpcd[1842]: enp81s0: sending Router Solicitation
dhcpcd[1842]: enp81s0: soliciting a DHCP lease
dhcpcd[1842]: enp81s0: sending DISCOVER (xid 0xa802a97), next in 4.7 seconds
dhcpcd[1842]: enp81s0: offered 172.20.13.45 from 172.20.13.254
dhcpcd[1842]: enp81s0: sending REQUEST (xid 0xa802a97), next in 4.3 seconds
dhcpcd[1842]: enp81s0: acknowledged 172.20.13.45 from 172.20.13.254
dhcpcd[1842]: enp81s0: probing address 172.20.13.45/24
dhcpcd[1842]: enp81s0: probing for 172.20.13.45
dhcpcd[1842]: enp81s0: ARP probing 172.20.13.45 (1 of 3), next in 1.8 seconds
dhcpcd[1842]: enp81s0: ARP probing 172.20.13.45 (2 of 3), next in 1.1 seconds
dhcpcd[1842]: enp81s0: ARP probing 172.20.13.45 (3 of 3), next in 2.0 seconds
dhcpcd[1842]: enp81s0: sending Router Solicitation
dhcpcd[1842]: enp81s0: DAD completed for 172.20.13.45
dhcpcd[1842]: enp81s0: leased 172.20.13.45 for 86400 seconds
dhcpcd[1842]: enp81s0: renew in 43200 seconds, rebind in 75600 seconds
dhcpcd[1842]: enp81s0: writing lease `/var/lib/dhcpcd/enp81s0.lease'
dhcpcd[1842]: enp81s0: adding IP address 172.20.13.45/24 broadcast 172.20.13.255
dhcpcd[1842]: enp81s0: adding route to 172.20.13.0/24
dhcpcd[1842]: enp81s0: adding default route via 172.20.13.254
dhcpcd[1842]: enp81s0: ARP announcing 172.20.13.45 (1 of 2), next in 2.0 seconds
dhcpcd[1842]: enp81s0: executing `/usr/lib/dhcpcd/dhcpcd-run-hooks' BOUND
dhcpcd[1842]: forking to background
dhcpcd[1842]: forked to background, child pid 1886
sudo[1841]: pam_unix(sudo:session): session closed for user root
dhcpcd[1886]: enp81s0: ARP announcing 172.20.13.45 (2 of 2)
dhcpcd[1886]: enp81s0: sending Router Solicitation
dhcpcd[1886]: enp81s0: sending Router Solicitation
dhcpcd[1886]: <b>enp81s0: no IPv6 Routers available</b>

Quantifying this I found that I need to wait about 20 seconds after “ip link set enp81s0 up” before launching dhcpcd to get the IP correctly right away. If I wait less, it gets the IP but does not have time to finish the ARP checks and times out. This explains why the first call to dhcpcd fails as it does not wait after it gets the carrier. I find it quite troubling that the card seems to take a good 30 seconds overall before actually responding. Looking at dmesg it apears to be up in about 0.5 second. Any idea? Thanks!

Last edited by Med (2018-05-15 23:33:35)

Offline

#2 2018-05-15 06:19:26

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: [SOLVED] Card does not respond for about 30s → dhcpcd fails at boot

That is a long time.
My advice would be to run dhcpcd in master mode and not for a specific interface.
Then, even it it times out, it will not exit and it will wait patiently for DHCP to work.

You might want to use dhcpcd-online from the dhcpcd-ui package (I think this is in AUR) if you need services to block for DHCP.

Offline

#3 2018-05-15 23:32:09

Med
Member
Registered: 2011-08-08
Posts: 16

Re: [SOLVED] Card does not respond for about 30s → dhcpcd fails at boot

So, the issue what that the switch it was connected to had a spanning-tree protocol query going and would not let packets flow until the it timed out. The sysadmin fixed the switch configuration through fastport and now it works.

Offline

Board footer

Powered by FluxBB