dhcpcd-discuss

Re: Problems getting an IP address from various routers

Mick

Fri Jun 12 22:20:55 2015

On Friday 12 Jun 2015 22:15:00 Roy Marples wrote:
> On Saturday 06 Jun 2015 19:40:55 Mick wrote:
> > > > Shouldn't the IP4ALL be dropped as soon as a dhcp address is
> > > > obtained?
> > > 
> > > Yes it should.
> > > 
> > > This is a new bug in dhcpcd, probably introduced in dhcpcd-6.8.x and it
> > > stems off new code I have to work with new code only found in NetBSD
> > > which I have yet to decide how best to solve. I'll probably go for the
> > > best way of solving it, which is also sadly the slowest - but may have
> > > a more long term gain.
> > 
> > Phew!  I thought something was wrong with my system.  :-)
> > 
> > Thank you for your help and all the good work you've be doing on dhcpcd.
> 
> You'll be pleased to know this has now been resolved in the latest fossil
> trunk.
> 
> However, the new code causes dhcpcd to spin on NetBSD when we expire a DHCP
> lease, acquire an IPv4LL address and then exit. Of course, it works fine on
> Linux where my fav debug tool valgrind actually works! So that's holding up
> a new release.
> 
> Also, I'd like to get the waitip directive working under all know
> conditions (it breaks currently in corner cases) and then I'll ship a new
> version with all known issues fixed!
> 
> Testing of the current code is of course, welcome :)
> 
> Roy

Thank you Roy!

I tried the latest from trunk, but it fails to obtain a dhcp address from my 
router.  :-(

When I pull the cable and push it back in, this is what I get:
=============================================================
Jun 12 20:00:27  kernel: tg3 0000:0b:00.0 enp11s0: Link is down
Jun 12 22:55:35  ifplugd(enp11s0)[3063]: Link beat lost.
Jun 12 22:55:42  ifplugd(enp11s0)[3063]: Executing 
'/etc/ifplugd/ifplugd.action enp11s0 down'.
Jun 12 22:55:42  ifplugd(enp11s0)[3063]: Program executed successfully.
Jun 12 20:00:52  kernel: tg3 0000:0b:00.0 enp11s0: Link is up at 100 Mbps, 
full duplex
Jun 12 20:00:52  kernel: tg3 0000:0b:00.0 enp11s0: Flow control is on for TX 
and on for RX
Jun 12 22:56:00  ifplugd(enp11s0)[3063]: Link beat detected.
Jun 12 22:56:04  ifplugd(enp11s0)[3063]: Executing 
'/etc/ifplugd/ifplugd.action enp11s0 up'.
Jun 12 22:56:11  dhcpcd[8128]: DUID 00:01:00:01:1a:78:4e:0c:00:26:b9:20:b4:9c
Jun 12 22:56:11  dhcpcd[8128]: enp11s0: IAID b9:20:b4:9c
Jun 12 22:56:11  dhcpcd[8128]: enp11s0: soliciting a DHCP lease
Jun 12 22:56:11  dhcpcd[8128]: enp11s0: soliciting an IPv6 router
Jun 12 22:56:16  dhcpcd[8128]: enp11s0: probing for an IPv4LL address
Jun 12 22:56:21  dhcpcd[8128]: enp11s0: using IPv4LL address 169.254.181.113
Jun 12 22:56:23  dhcpcd[8128]: enp11s0: no IPv6 Routers available
Jun 12 22:56:39  dhcpcd[8128]: enp11s0: offered 10.10.10.7 from 10.10.10.1
Jun 12 22:56:41  dhcpcd[8128]: timed out
Jun 12 22:56:41  ifplugd(enp11s0)[3063]: client: timed out
Jun 12 22:56:41  dhcpcd[8128]: dhcpcd exited
Jun 12 22:56:41  ifplugd(enp11s0)[3063]: client: DUID 
00:01:00:01:1a:78:4e:0c:00:26:b9:20:b4:9c
Jun 12 22:56:41  ifplugd(enp11s0)[3063]: client: enp11s0: IAID b9:20:b4:9c
Jun 12 22:56:41  ifplugd(enp11s0)[3063]: client: enp11s0: soliciting a DHCP 
lease
Jun 12 22:56:41  ifplugd(enp11s0)[3063]: client: enp11s0: soliciting an IPv6 
router
Jun 12 22:56:41  ifplugd(enp11s0)[3063]: client: enp11s0: probing for an 
IPv4LL address
Jun 12 22:56:41  ifplugd(enp11s0)[3063]: client: enp11s0: using IPv4LL address 
169.254.181.113
Jun 12 22:56:41  ifplugd(enp11s0)[3063]: client: enp11s0: no IPv6 Routers 
available
Jun 12 22:56:41  ifplugd(enp11s0)[3063]: client: enp11s0: offered 10.10.10.7 
from 10.10.10.1
Jun 12 22:56:41  ifplugd(enp11s0)[3063]: client: dhcpcd exited
Jun 12 22:56:41  /etc/init.d/net.enp11s0[7962]: ERROR: net.enp11s0 failed to 
start
Jun 12 22:56:41  ifplugd(enp11s0)[3063]: client:  * ERROR: net.enp11s0 failed 
to start
Jun 12 22:56:41  ifplugd(enp11s0)[3063]: Program executed successfully.
=============================================================

Why doesn't it accept address 10.10.10.7 offered from the router?

With the previous version it does this:
=============================================================
Jun 12 23:10:22  ifplugd(enp11s0)[3063]: Executing 
'/etc/ifplugd/ifplugd.action enp11s0 up'.
Jun 12 23:10:29  dhcpcd[11370]: DUID 00:01:00:01:1a:78:4e:0c:00:26:b9:20:b4:9c
Jun 12 23:10:29  dhcpcd[11370]: enp11s0: IAID b9:20:b4:9c
Jun 12 23:10:29  dhcpcd[11370]: enp11s0: soliciting a DHCP lease
Jun 12 23:10:30  dhcpcd[11370]: enp11s0: soliciting an IPv6 router
Jun 12 23:10:34  dhcpcd[11370]: enp11s0: probing for an IPv4LL address
Jun 12 23:10:40  dhcpcd[11370]: enp11s0: using IPv4LL address 169.254.181.113
Jun 12 23:10:40  dhcpcd[11370]: enp11s0: adding route to 169.254.0.0/16
Jun 12 23:10:40  dhcpcd[11370]: forked to background, child pid 11400
Jun 12 23:10:40  ifplugd(enp11s0)[3063]: client: DUID 
00:01:00:01:1a:78:4e:0c:00:26:b9:20:b4:9c
Jun 12 23:10:40  ifplugd(enp11s0)[3063]: client: enp11s0: IAID b9:20:b4:9c
Jun 12 23:10:40  ifplugd(enp11s0)[3063]: client: enp11s0: soliciting a DHCP 
lease
Jun 12 23:10:40  ifplugd(enp11s0)[3063]: client: enp11s0: soliciting an IPv6 
router
Jun 12 23:10:40  ifplugd(enp11s0)[3063]: client: enp11s0: probing for an 
IPv4LL address
Jun 12 23:10:40  ifplugd(enp11s0)[3063]: client: enp11s0: using IPv4LL address 
169.254.181.113
Jun 12 23:10:40  ifplugd(enp11s0)[3063]: client: enp11s0: adding route to 
169.254.0.0/16
Jun 12 23:10:40  ifplugd(enp11s0)[3063]: client: forked to background, child 
pid 11400
Jun 12 23:10:40  ifplugd(enp11s0)[3063]: Program executed successfully.
Jun 12 23:10:42  dhcpcd[11400]: enp11s0: no IPv6 Routers available
Jun 12 23:10:58  dhcpcd[11400]: enp11s0: offered 10.10.10.7 from 10.10.10.1
Jun 12 23:10:58  dhcpcd[11400]: enp11s0: leased 10.10.10.7 for 86400 seconds
Jun 12 23:10:58  dhcpcd[11400]: enp11s0: adding route to 10.10.10.0/24
Jun 12 23:10:58  dhcpcd[11400]: enp11s0: adding default route via 10.10.10.1
Jun 12 23:10:58  dhcpcd[11400]: enp11s0: deleting route to 169.254.0.0/16
Jun 12 23:10:58  dhcpcd[11400]: enp11s0: removing route to 10.10.10.0/24
=============================================================

PS. I've noticed that the router is temperamental - some times it responds to 
arpings, other times it does not.  Also, with this NIC (BCM5784M) the router 
does not respond to DHCPREQ to rebind the address when I try to reconnect.  
Not sure if this is related, but I mention it just in case.

-- 
Regards,
Mick

Attachment: signature.asc
Description: This is a digitally signed message part.


Follow-Ups:
Re: Problems getting an IP address from various routersRoy Marples
References:
Problems getting an IP address from various routersMick
Re: Problems getting an IP address from various routersMick
Re: Problems getting an IP address from various routersRoy Marples
Archive administrator: postmaster@marples.name