You are not logged in.

#1 2013-05-28 08:35:22

mbunkus
Member
Registered: 2013-05-28
Posts: 3

netctl eth+DHCP fails on boot, works manually

Hey,

my DHCP-based ethernet netctl profile does not work during boot. It fails each and every time. However, it does work each and every time if I start it later manually.

The profile file /etc/netctl/eth-dhcp:

Description='A basic dhcp ethernet connection'
Interface=eth0
Connection=ethernet
IP=dhcp
IP6=stateless
TimeoutDAD=30

The corresponding systemd unit is the only one that fails during boot according to "systemctl --failed":

UNIT                       LOAD   ACTIVE SUB    DESCRIPTION
netctl@eth\x2ddhcp.service loaded failed failed A basic dhcp ethernet connection

LOAD   = Reflects whether the unit definition was properly loaded.
...

And it fails due to timeouts according to "systemctl --status 'eth\x2ddhcp'":

-- Logs begin at Fr 2012-10-26 00:08:47 CEST, end at Di 2013-05-28 10:20:54 CEST. --
Mai 28 10:15:45 vitamalz network[891]: Starting network profile 'eth-dhcp'...
Mai 28 10:15:45 vitamalz dhcpcd[914]: version 5.6.8 starting
Mai 28 10:15:45 vitamalz dhcpcd[914]: eth0: sending IPv6 Router Solicitation
Mai 28 10:15:45 vitamalz dhcpcd[914]: eth0: sendmsg: Cannot assign requested address
Mai 28 10:15:45 vitamalz dhcpcd[914]: eth0: broadcasting for a lease
Mai 28 10:15:49 vitamalz dhcpcd[914]: eth0: sending IPv6 Router Solicitation
Mai 28 10:15:53 vitamalz dhcpcd[914]: eth0: sending IPv6 Router Solicitation
Mai 28 10:15:55 vitamalz dhcpcd[914]: timed out
Mai 28 10:15:55 vitamalz network[891]: DHCP IP lease attempt failed on interface 'eth0'
Mai 28 10:15:55 vitamalz systemd[1]: netctl@eth\x2ddhcp.service: main process exited, code=exited, status=1/FAILURE
Mai 28 10:15:55 vitamalz systemd[1]: Failed to start A basic dhcp ethernet connection.
Mai 28 10:15:55 vitamalz systemd[1]: Unit netctl@eth\x2ddhcp.service entered failed state.

Starting it later with "sudo netctl start eth-dhcp" works; output according to "_ journalctl -b -u 'eth\x2ddhcp'":

Mai 28 10:21:06 vitamalz systemd[1]: Starting A basic dhcp ethernet connection...
Mai 28 10:21:07 vitamalz network[1540]: Starting network profile 'eth-dhcp'...
Mai 28 10:21:07 vitamalz dhcpcd[1550]: version 5.6.8 starting
Mai 28 10:21:07 vitamalz dhcpcd[1550]: eth0: sending IPv6 Router Solicitation
Mai 28 10:21:07 vitamalz dhcpcd[1550]: eth0: sendmsg: Cannot assign requested address
Mai 28 10:21:07 vitamalz dhcpcd[1550]: eth0: broadcasting for a lease
Mai 28 10:21:07 vitamalz dhcpcd[1550]: eth0: offered 192.168.10.53 from 192.168.10.3
Mai 28 10:21:07 vitamalz dhcpcd[1550]: eth0: acknowledged 192.168.10.53 from 192.168.10.3
Mai 28 10:21:07 vitamalz dhcpcd[1550]: eth0: checking for 192.168.10.53
Mai 28 10:21:08 vitamalz dhcpcd[1550]: eth0: Router Advertisement from fe80::230:XXXX:XXXX:XXXX
Mai 28 10:21:09 vitamalz dhcpcd[1550]: eth0: did not fork due to an absent RDNSS option in the RA
Mai 28 10:21:11 vitamalz dhcpcd[1550]: eth0: leased 192.168.10.53 for 43200 seconds
Mai 28 10:21:11 vitamalz systemd[1]: Started A basic dhcp ethernet connection.

Yes, the interface is always named eth0.

Any idea how to convince this system to start properly on boot?

Thanks.

Offline

#2 2013-05-28 11:22:52

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,920
Website

Re: netctl eth+DHCP fails on boot, works manually

Do you still see eth0 if you run

ip addr

In a terminal


Mr Green I like Landuke!

Offline

#3 2013-05-29 06:05:30

mbunkus
Member
Registered: 2013-05-28
Posts: 3

Re: netctl eth+DHCP fails on boot, works manually

Sure it does, but in state DOWN without any address assigned to it:

2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT qlen 1000
    link/ether 48:5b:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff

Offline

#4 2014-10-15 14:37:11

dsar
Member
From: Saint Petersburg
Registered: 2014-10-09
Posts: 44

Re: netctl eth+DHCP fails on boot, works manually

any solution?

Offline

#5 2014-10-15 14:54:50

mbunkus
Member
Registered: 2013-05-28
Posts: 3

Re: netctl eth+DHCP fails on boot, works manually

In my case it turned out to be the switch. The switches we have here were configured to probe each newly connected port for other connected switches via STP (spanning tree protocol). This incurred roughly a 30 second delay before the switch port was put into normal switching mode. So during a normal boot of my client the DHCP packets were sent out while the switch port was still within that probing period, and the packets weren't forwarded.

Our Dell switches have an STP setting called »fast link« which reduces this period considerably. I chose to turn »fast link« on for all the ports that client machines are connected to and haven't had such DHCP problems since.

Offline

Board footer

Powered by FluxBB