dhcpcd-discuss

Re: dhcpcd -n sets IPv4LL address even if -L is given

Roy Marples

Tue Jan 07 08:51:29 2014

Hi Marco

On 06/01/2014 10:20, Marco Wirz wrote:
I have a mobile Linux device with several wired interfaces, some of
them running dhcpcd. The interfaces are connected to an external
switch and are up, but there is no DHCP server present most of the
time.

dhcpcd is run without config file as

$ dhcpcd -qb4 -L -m 30 -C resolv.conf -C hostname vlan30

This works as expected: it waits forever for a DHCP server to appear,
and then obtains an IP address.

But when I kick dhcpcd before it has obtained an address using

$ dhcpcd -n vlan30

with still no DHCP server present, the running dhcpcd happily assigns
169.254.X.Y/16 on this interface after a few seconds.

I would expect it to never assign IPv4LL addresses when -L was given.

Kicking dhcpcd when a DHCP server is present works as expected.

Did I miss something?

How else can I tell a running dhcpcd to try to get a lease right now,
and not wait until the regular retry interval is over? Restarting
dhcpcd is not what I have in mind...

This is a known problem.
http://roy.marples.name/oldprojects/dhcpcd/ticket/307
(still haven't migrated my tickets across to fossil yet)

Not entirely sure how to solve it because you can change parameters on the fly when dhcpcd is running in master mode, which it sounds like you are not. Assuming this exact problem won't be solved right away, is there a reason you don't put your config into dhcpcd.conf?

Thanks

Roy

Follow-Ups:
Re: dhcpcd -n sets IPv4LL address even if -L is givenMarco Wirz
References:
dhcpcd -n sets IPv4LL address even if -L is givenMarco Wirz
Archive administrator: postmaster@marples.name