Re: Getting dynamic IP when starting dhcpcd with Static IP
Roy Marples
Tue Oct 01 18:39:46 2019
Hi Jonas
On 30/09/2019 16:56, Jonas Ramstrand wrote:
Hi!
I have issue with starting dhcpcd with static ip, from command line.
I start dhcpcd with command: "dhcpcd wlan0 --ipv4only --static
ip_address=10.30.2.121/21 <http://10.30.2.121/21> --static
routers=10.30.0.1 --static domain_name_servers="10.30.0.101 10.30.0.120""
But dhcpcd is still doing discover/request, and uses that address as
static. Am I missing something?
I see the same behavior on 6.11.3 and 7.2.2 (system running Yocto).
Seems as I get this when I don't have any lease-file for the SSID that I
connect to.
Traces:
dhcpcd[2497]: DUID 00:01:00:01:24:e6:df:a4:00:01:3e:3d:f2:31
dhcpcd[2497]: wlan0: IAID 3e:3d:f2:31
dhcpcd[2497]: wlan0: probing address 10.30.2.121/21
<http://10.30.2.121/21>
dhcpcd[2497]: wlan0: hardware address 00:01:3e:3d:e6:c9 claims
10.30.2.121
dhcpcd[2497]: wlan0: soliciting a DHCP lease
dhcpcd[2497]: wlan0: offered 10.30.2.166 from 1.1.1.1
dhcpcd[2497]: wlan0: probing address 10.30.2.166/21
<http://10.30.2.166/21>
dhcpcd[2497]: wlan0: using static address 10.30.2.166/21
<http://10.30.2.166/21>
dhcpcd[2497]: wlan0: adding route to 10.30.0.0/21 <http://10.30.0.0/21>
dhcpcd[2497]: wlan0: adding default route via 10.30.0.1
dhcpcd[2497]: forked to background, child pid 2523
The error is because the IP address you are requesting for static config
failed the DAD probe.
I've fixed this here:
https://roy.marples.name/cgit/dhcpcd.git/commit/?id=a5081cf0bb5e5f76f7a80b28c90b0423507b3755
Roy
Archive administrator: postmaster@marples.name