On Thu, 4 Jun 2020 at 09:48, Mark Rogers mark@more-solutions.co.uk wrote:
My problem is that more often than not I end up with the fallback IP address rather than one from DHCP, despite the Pi being on a network with a DHCP server.
Additional information:
Here's the output of dhcpcd run from the terminal. Notice that an IP is offered from 192.168.10.1 but it nevertheless falls back. (I'm testing in IPv4 mode in case it's the lack of an IPv6 from my router that's causing it, but it does the same thing regardless - the logs are a bit shorter excluding IPv6 though.)
I do have to run it several times to get an IP address offered before it falls back to 192.168.60.100 which is interesting (but the whole process is over in a few seconds and it should be waiting far longer before giving up anyway in the absence of an IP, but falling back when it demonstrably has received an IP?)
$sudo dhcpcd -B -d -w -4 eth0 dhcpcd-8.1.2 starting eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' CARRIER eth0: delaying IPv4 for 0.8 seconds eth0: using ClientID 01:b8:27:eb:22:1c:05 eth0: soliciting a DHCP lease eth0: sending DISCOVER (xid 0x274915b3), next in 3.4 seconds eth0: sending DISCOVER (xid 0x274915b3), next in 7.7 seconds eth0: offered 192.168.10.220 from 192.168.10.1 eth0: sending REQUEST (xid 0x274915b3), next in 3.3 seconds eth0: selected profile static_eth0 eth0: using ClientID 01:b8:27:eb:22:1c:05 eth0: using static address 192.168.60.100/24 eth0: adding IP address 192.168.60.100/24 broadcast 192.168.60.255 eth0: adding route to 192.168.60.0/24 eth0: adding default route via 192.168.60.250 eth0: ARP announcing 192.168.60.100 (1 of 2), next in 2.0 seconds eth0: executing `/lib/dhcpcd/dhcpcd-run-hooks' STATIC eth0: ARP announcing 192.168.60.100 (2 of 2)