Expected Behaviour:
When I disable the DHCP server function on my router, I should still be able to access the pi-hole admin console at its previous IP address from my chrome browser on Windows 10.
Actual Behaviour:
When I disable the DHCP server function on my D-Link DIR885L router, I can no longer access the pi-hole server at its previous IP address (192.168.0.119) in order to turn on the DHCP server function in it. In fact, I can't access anything, even the router at 192.168.0.1. I had to reset the router to regain control. What am I missing here?
I was trying to follow the instructions here: How do I use Pi-hole's built in DHCP server (and why would I want to)?
Thanks for your help.
Make sure Pi-hole is assigned a static IP address making it independent from the router DHCP:
pi@noads:~ $ journalctl -u dhcpcd
[..]
Sep 08 22:28:43 noads.dehakkelaar.nl systemd[1]: Starting dhcpcd on all interfaces...
Sep 08 22:28:43 noads.dehakkelaar.nl dhcpcd[30082]: dev: loaded udev
Sep 08 22:28:43 noads.dehakkelaar.nl dhcpcd[30082]: DUID xx:xx:xx
Sep 08 22:28:43 noads.dehakkelaar.nl dhcpcd[30082]: eth0: IAID xx:xx:xx:xx
Sep 08 22:28:43 noads.dehakkelaar.nl dhcpcd[30082]: eth0: using static address 10.0.0.2/24
Sep 08 22:28:43 noads.dehakkelaar.nl dhcpcd[30082]: eth0: adding route to 10.0.0.0/24
Sep 08 22:28:43 noads.dehakkelaar.nl dhcpcd[30082]: eth0: adding default route via 10.0.0.1
Sep 08 22:28:43 noads.dehakkelaar.nl dhcpcd[30082]: forked to background, child pid 30098
Sep 08 22:28:43 noads.dehakkelaar.nl systemd[1]: Started dhcpcd on all interfaces.
Sep 08 22:28:43 noads.dehakkelaar.nl dhcpcd[30098]: eth0: soliciting an IPv6 router
Sep 08 22:28:55 noads.dehakkelaar.nl dhcpcd[30098]: eth0: no IPv6 Routers available
Whats IP ?
ip -4 a
And whats in below file:
tail -20 /etc/dhcpcd.conf
EDIT: And post a debug token here if you want to have the devs/mods to take a closer look ?
Method 1: Generate a debug token via the Web interface
Log in to your Pi-hole's Web interface
Navigate to Tools > Generate debug log
Click the Generate debug log button
Send us the debug token
[debug]
Method 2: Use the command line to generate a debug token
Login into your Pi-hole's command line
Enter pihole -d
Provide us with the debug token that is generated after the debug script completes
Alternative: Securely sending us additional information
Preferred Method
If there is additi…
jfb
September 8, 2019, 8:39pm
3
Please send us the token generated by
pihole -d
or do it through the Web interface:
Method 1: Generate a debug token via the Web interface
Log in to your Pi-hole's Web interface
Navigate to Tools > Generate debug log
Click the Generate debug log button
Send us the debug token
[debug]
Method 2: Use the command line to generate a debug token
Login into your Pi-hole's command line
Enter pihole -d
Provide us with the debug token that is generated after the debug script completes
Alternative: Securely sending us additional information
Preferred Method
If there is additi…
1 Like
I think it already has a static IP address. Doesn't the fact that I couldn't even access the router at 192.168.0.1 indicate a more fundamental problem?
Here is the output from your suggestions: (Will include debug token in next post.)
Apr 18 01:25:04 raspberrypi systemd[1]: Started dhcpcd on all interfaces.
Apr 18 01:25:06 raspberrypi dhcpcd-run-hooks[360]: wlan0: starting wpa_supplicant
Apr 18 01:25:08 raspberrypi dhcpcd[332]: wlan0: waiting for carrier
Apr 18 01:25:08 raspberrypi dhcpcd[332]: wlan0: carrier acquired
Apr 18 01:25:08 raspberrypi dhcpcd[332]: DUID 00:01:00:01:22:69:5a:f4:b8:27:eb:1e:ee:59
Apr 18 01:25:08 raspberrypi dhcpcd[332]: wlan0: IAID eb:1e:ee:59
Apr 18 01:25:08 raspberrypi dhcpcd[332]: wlan0: adding address fe80::eca3:92a8:e698:f72e
Apr 18 01:25:09 raspberrypi dhcpcd[332]: wlan0: carrier lost
Apr 18 01:25:09 raspberrypi dhcpcd[332]: wlan0: deleting address fe80::eca3:92a8:e698:f72e
Apr 18 01:25:09 raspberrypi dhcpcd[332]: wlan0: carrier acquired
Apr 18 01:25:09 raspberrypi dhcpcd[332]: wlan0: IAID eb:1e:ee:59
Apr 18 01:25:09 raspberrypi dhcpcd[332]: wlan0: adding address fe80::83ed:6d95:cb6b:b8e1
Apr 18 01:25:09 raspberrypi dhcpcd[332]: wlan0: soliciting an IPv6 router
Apr 18 01:25:09 raspberrypi dhcpcd[332]: wlan0: soliciting a DHCP lease
Apr 18 01:25:10 raspberrypi dhcpcd[332]: wlan0: offered 192.168.0.119 from 192.168.0.1
Apr 18 01:25:10 raspberrypi dhcpcd[332]: wlan0: probing address 192.168.0.119/24
Apr 18 01:25:11 raspberrypi dhcpcd[332]: wlan0: Router Advertisement from fe80::928d:78ff:fe66:4030
Apr 18 01:25:11 raspberrypi dhcpcd[332]: wlan0: adding address 2605:6000:ee80:1d01:432c:4269:2321:69c7/64
Apr 18 01:25:11 raspberrypi dhcpcd[332]: wlan0: adding route to 2605:6000:ee80:1d01::/64
Apr 18 01:25:11 raspberrypi dhcpcd[332]: wlan0: adding default route via fe80::928d:78ff:fe66:4030
Apr 18 01:25:11 raspberrypi dhcpcd[332]: wlan0: requesting DHCPv6 information
Apr 18 01:25:15 raspberrypi dhcpcd[332]: wlan0: leased 192.168.0.119 for 604800 seconds
Apr 18 01:25:15 raspberrypi dhcpcd[332]: wlan0: adding route to 192.168.0.0/24
Apr 18 01:25:15 raspberrypi dhcpcd[332]: wlan0: adding default route via 192.168.0.1
Sep 07 04:49:11 raspberrypi dhcpcd[332]: wlan0: deleting default route via fe80::928d:78ff:fe66:4030
Sep 07 04:49:39 raspberrypi dhcpcd[332]: wlan0: adding address 2605:6000:101e:926:fb2a:ed3f:2234:d649/64
Sep 07 04:49:39 raspberrypi dhcpcd[332]: wlan0: adding route to 2605:6000:101e:926::/64
Sep 07 04:49:39 raspberrypi dhcpcd[332]: wlan0: adding default route via fe80::928d:78ff:fe66:4030
Sep 07 05:38:18 raspberrypi dhcpcd[332]: wlan0: deleting default route via fe80::928d:78ff:fe66:4030
Sep 07 05:38:49 raspberrypi dhcpcd[332]: wlan0: adding default route via fe80::928d:78ff:fe66:4030
Sep 07 06:00:05 raspberrypi dhcpcd[332]: wlan0: deleting default route via fe80::928d:78ff:fe66:4030
Sep 07 06:00:38 raspberrypi dhcpcd[332]: wlan0: adding default route via fe80::928d:78ff:fe66:4030
Sep 07 06:49:14 raspberrypi dhcpcd[332]: wlan0: expired address 2605:6000:ee80:1d01:432c:4269:2321:69c7/64
Sep 07 06:49:14 raspberrypi dhcpcd[332]: wlan0: deleting route to 2605:6000:ee80:1d01::/64
Sep 08 15:56:33 raspberrypi dhcpcd[332]: wlan0: deleting default route via fe80::928d:78ff:fe66:4030
Sep 08 15:57:05 raspberrypi dhcpcd[332]: wlan0: adding default route via fe80::928d:78ff:fe66:4030
Sep 08 16:29:58 raspberrypi dhcpcd[332]: wlan0: deleting default route via fe80::928d:78ff:fe66:4030
Sep 08 16:30:26 raspberrypi dhcpcd[332]: wlan0: adding default route via fe80::928d:78ff:fe66:4030
Sep 08 16:53:55 raspberrypi dhcpcd[332]: wlan0: deleting default route via fe80::928d:78ff:fe66:4030
Sep 08 16:54:22 raspberrypi dhcpcd[332]: wlan0: adding default route via fe80::928d:78ff:fe66:4030
Sep 08 17:45:44 raspberrypi dhcpcd[332]: wlan0: carrier lost
Sep 08 17:45:44 raspberrypi dhcpcd[332]: wlan0: deleting address 2605:6000:101e:926:fb2a:ed3f:2234:d649/64
Sep 08 17:45:44 raspberrypi dhcpcd[332]: wlan0: deleting default route via fe80::928d:78ff:fe66:4030
Sep 08 17:45:44 raspberrypi dhcpcd[332]: wlan0: deleting route to 2605:6000:101e:926::/64
Sep 08 17:45:45 raspberrypi dhcpcd[332]: wlan0: deleting address fe80::83ed:6d95:cb6b:b8e1
Sep 08 17:45:45 raspberrypi dhcpcd[332]: wlan0: deleting default route via 192.168.0.1
Sep 08 17:45:45 raspberrypi dhcpcd[332]: wlan0: deleting route to 192.168.0.0/24
Sep 08 17:46:33 raspberrypi dhcpcd[332]: wlan0: carrier acquired
Sep 08 17:46:33 raspberrypi dhcpcd[332]: wlan0: confile file changed, expiring leases
Sep 08 17:46:33 raspberrypi dhcpcd[332]: wlan0: IAID eb:1e:ee:59
Sep 08 17:46:33 raspberrypi dhcpcd[332]: wlan0: adding address fe80::83ed:6d95:cb6b:b8e1
Sep 08 17:46:33 raspberrypi dhcpcd[332]: wlan0: probing address 192.168.0.119/24
Sep 08 17:46:34 raspberrypi dhcpcd[332]: wlan0: soliciting an IPv6 router
Sep 08 17:46:38 raspberrypi dhcpcd[332]: wlan0: using static address 192.168.0.119/24
Sep 08 17:46:38 raspberrypi dhcpcd[332]: wlan0: adding route to 192.168.0.0/24
Sep 08 17:46:38 raspberrypi dhcpcd[332]: wlan0: adding default route via 192.168.0.1
Sep 08 17:46:47 raspberrypi dhcpcd[332]: wlan0: no IPv6 Routers available
Sep 08 17:51:18 raspberrypi dhcpcd[332]: wlan0: carrier lost
Sep 08 17:51:19 raspberrypi dhcpcd[332]: wlan0: deleting address fe80::83ed:6d95:cb6b:b8e1
Sep 08 17:51:19 raspberrypi dhcpcd[332]: wlan0: deleting default route via 192.168.0.1
Sep 08 17:51:19 raspberrypi dhcpcd[332]: wlan0: deleting route to 192.168.0.0/24
Sep 08 17:52:01 raspberrypi dhcpcd[332]: wlan0: carrier acquired
Sep 08 17:52:01 raspberrypi dhcpcd[332]: wlan0: IAID eb:1e:ee:59
Sep 08 17:52:01 raspberrypi dhcpcd[332]: wlan0: adding address fe80::83ed:6d95:cb6b:b8e1
Sep 08 17:52:01 raspberrypi dhcpcd[332]: wlan0: probing address 192.168.0.119/24
Sep 08 17:52:01 raspberrypi dhcpcd[332]: wlan0: soliciting an IPv6 router
Sep 08 17:52:06 raspberrypi dhcpcd[332]: wlan0: carrier lost
Sep 08 17:52:06 raspberrypi dhcpcd[332]: wlan0: deleting address fe80::83ed:6d95:cb6b:b8e1
Sep 08 17:52:08 raspberrypi dhcpcd[332]: wlan0: carrier acquired
Sep 08 17:52:08 raspberrypi dhcpcd[332]: wlan0: IAID eb:1e:ee:59
Sep 08 17:52:08 raspberrypi dhcpcd[332]: wlan0: adding address fe80::83ed:6d95:cb6b:b8e1
Sep 08 17:52:08 raspberrypi dhcpcd[332]: wlan0: probing address 192.168.0.119/24
Sep 08 17:52:08 raspberrypi dhcpcd[332]: wlan0: soliciting an IPv6 router
Sep 08 17:52:13 raspberrypi dhcpcd[332]: wlan0: using static address 192.168.0.119/24
Sep 08 17:52:13 raspberrypi dhcpcd[332]: wlan0: adding route to 192.168.0.0/24
Sep 08 17:52:13 raspberrypi dhcpcd[332]: wlan0: adding default route via 192.168.0.1
Sep 08 17:52:21 raspberrypi dhcpcd[332]: wlan0: no IPv6 Routers available
Sep 08 17:56:22 raspberrypi dhcpcd[332]: wlan0: carrier lost
Sep 08 17:56:22 raspberrypi dhcpcd[332]: wlan0: deleting address fe80::83ed:6d95:cb6b:b8e1
Sep 08 17:56:22 raspberrypi dhcpcd[332]: wlan0: deleting default route via 192.168.0.1
Sep 08 17:56:22 raspberrypi dhcpcd[332]: wlan0: deleting route to 192.168.0.0/24
Sep 08 17:59:55 raspberrypi dhcpcd[332]: wlan0: carrier acquired
Sep 08 17:59:55 raspberrypi dhcpcd[332]: wlan0: IAID eb:1e:ee:59
Sep 08 17:59:55 raspberrypi dhcpcd[332]: wlan0: adding address fe80::83ed:6d95:cb6b:b8e1
Sep 08 17:59:55 raspberrypi dhcpcd[332]: wlan0: probing address 192.168.0.119/24
Sep 08 17:59:55 raspberrypi dhcpcd[332]: wlan0: soliciting an IPv6 router
Sep 08 17:59:58 raspberrypi dhcpcd[332]: wlan0: Router Advertisement from fe80::928d:78ff:fe66:4030
Sep 08 17:59:58 raspberrypi dhcpcd[332]: wlan0: adding address 2605:6000:ee83:f01:876f:9b8:b6f9:60a1/64
Sep 08 17:59:58 raspberrypi dhcpcd[332]: wlan0: adding route to 2605:6000:ee83:f01::/64
Sep 08 17:59:58 raspberrypi dhcpcd[332]: wlan0: adding default route via fe80::928d:78ff:fe66:4030
Sep 08 17:59:58 raspberrypi dhcpcd[332]: wlan0: requesting DHCPv6 information
Sep 08 18:00:00 raspberrypi dhcpcd[332]: wlan0: using static address 192.168.0.119/24
Sep 08 18:00:00 raspberrypi dhcpcd[332]: wlan0: adding route to 192.168.0.0/24
Sep 08 18:00:00 raspberrypi dhcpcd[332]: wlan0: adding default route via 192.168.0.1
Sep 08 18:00:54 raspberrypi dhcpcd[332]: wlan0: carrier lost
Sep 08 18:00:55 raspberrypi dhcpcd[332]: wlan0: deleting address 2605:6000:ee83:f01:876f:9b8:b6f9:60a1/64
Sep 08 18:00:55 raspberrypi dhcpcd[332]: wlan0: deleting default route via fe80::928d:78ff:fe66:4030
Sep 08 18:00:55 raspberrypi dhcpcd[332]: wlan0: deleting route to 2605:6000:ee83:f01::/64
Sep 08 18:00:55 raspberrypi dhcpcd[332]: wlan0: deleting address fe80::83ed:6d95:cb6b:b8e1
Sep 08 18:00:55 raspberrypi dhcpcd[332]: wlan0: deleting default route via 192.168.0.1
Sep 08 18:00:55 raspberrypi dhcpcd[332]: wlan0: deleting route to 192.168.0.0/24
Sep 08 18:00:56 raspberrypi dhcpcd[332]: wlan0: carrier acquired
Sep 08 18:00:56 raspberrypi dhcpcd[332]: wlan0: IAID eb:1e:ee:59
Sep 08 18:00:56 raspberrypi dhcpcd[332]: wlan0: adding address fe80::83ed:6d95:cb6b:b8e1
Sep 08 18:00:56 raspberrypi dhcpcd[332]: wlan0: probing address 192.168.0.119/24
Sep 08 18:00:56 raspberrypi dhcpcd[332]: wlan0: soliciting an IPv6 router
Sep 08 18:01:01 raspberrypi dhcpcd[332]: wlan0: using static address 192.168.0.119/24
Sep 08 18:01:01 raspberrypi dhcpcd[332]: wlan0: adding route to 192.168.0.0/24
Sep 08 18:01:01 raspberrypi dhcpcd[332]: wlan0: adding default route via 192.168.0.1
Sep 08 18:01:09 raspberrypi dhcpcd[332]: wlan0: no IPv6 Routers available
Sep 08 18:01:25 raspberrypi dhcpcd[332]: wlan0: Router Advertisement from fe80::928d:78ff:fe66:4030
Sep 08 18:01:25 raspberrypi dhcpcd[332]: wlan0: adding address 2605:6000:ee83:f01:876f:9b8:b6f9:60a1/64
Sep 08 18:01:25 raspberrypi dhcpcd[332]: wlan0: adding route to 2605:6000:ee83:f01::/64
Sep 08 18:01:25 raspberrypi dhcpcd[332]: wlan0: adding default route via fe80::928d:78ff:fe66:4030
Sep 08 18:01:25 raspberrypi dhcpcd[332]: wlan0: requesting DHCPv6 information
Sep 08 18:18:31 raspberrypi dhcpcd[332]: wlan0: deleting default route via fe80::928d:78ff:fe66:4030
Sep 08 18:19:05 raspberrypi dhcpcd[332]: wlan0: adding address 2605:6000:101e:4d1:1681:b165:4a3d:8e14/64
Sep 08 18:19:05 raspberrypi dhcpcd[332]: wlan0: adding route to 2605:6000:101e:4d1::/64
Sep 08 18:19:05 raspberrypi dhcpcd[332]: wlan0: adding default route via fe80::928d:78ff:fe66:4030
Sep 08 20:18:34 raspberrypi dhcpcd[332]: wlan0: expired address 2605:6000:ee83:f01:876f:9b8:b6f9:60a1/64
Sep 08 20:18:34 raspberrypi dhcpcd[332]: wlan0: deleting route to 2605:6000:ee83:f01::/64
lines 41-125/125 (END)
pi@raspberrypi:~ $ ip -4 a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
inet 192.168.0.119/24 brd 192.168.0.255 scope global wlan0
valid_lft forever preferred_lft forever
pi@raspberrypi:~ $ tail -20 /etc/dhcpcd.conf
#static ip_address=192.168.0.10/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
#static routers=192.168.0.1
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1
It is possible to fall back to a static IP if DHCP fails:
define static profile
#profile static_eth0
#static ip_address=192.168.1.23/24
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1
fallback to static profile on eth0
#interface eth0
#fallback static_eth0
interface wlan0
static ip_address=192.168.0.119/24
static routers=192.168.0.1
static domain_name_servers=127.0.0.1
pi@raspberrypi:~ $
The debug token is:
https://tricorder.pi-hole.net/nuslfp3u8m
To be clear, it is currently running in DNS mode, not DHCP mode. DNS mode doesn't work on my D-Link DIR-885L router because it insists on having both primary and secondary DNS addresses. I can't have both addresses point to the same place (e.g. 192.168.0.119). It doesn't accept 0.0.0.0. I've tried using other valid addresses in the network (e.g. 192.168.0.1) but that doesn't work. If I leave the secondary blank, it magically gets filled in by the router.
Above one indicates dhcpcd5
was actually able to assign a static IP.
Yes.
Normal behaviour is for the client to retain its DHCP assigned IP address until the DHCP lease expires.
Do you have other device to browse/ping/run nslookup
?
The order of switching on/off DHCP service on the router/Pi-hole isn't important.
You can switch on DHCP service on Pi-hole first and disable the one on the router later.
When finished switching, reboot your test client so it will renew its DHCP lease.
This could also be a router specific problem like the router blocking DHCP or other safety features.
Check settings!
Use one PC with a static assigned IP address to troubleshoot and use other devices to test DHCP renewal and DNS resolution.
Oh cr.p, do you need IPv6 ?
Most of us dont so we run without IPv6 support.
Don’t need IPv6. I accidently installed with only IPv6 (because the install instruction was “space bar to select” rather than “space bar to DEselect.” And then I went back through the install process and deselected IPv6 but maybe it was still in there. The web-based admin console shows blank for IPv6 address.
Pi-hole Ethernet Interface:
wlan0
Pi-hole IPv4 address:
192.168.0.119/24
Pi-hole IPv6 address:
Pi-hole hostname:
pi-hole
Anyway, is there something I should do to turn this off?
Regards,
Hal Jennings
in Austin, TX - Live Music Capital of the World
www.jenningsweb.us
Turn off dns for IPv6, you can use the IPv4 to resolve IPv6 too.
OK. I got the DHCP server working. I think the key things were to make the PC I'm working from have a static IP address and turning on pi-hole's DHCP server before disabling the router's DHCP server. I also disabled the IPv6 router function. I think pi-hole already has IPv6 disabled, though in the admin console, it shows some IPv6 query types (AAAA) in the dashboard pie chart.
Thanks for your help.
1 Like
Nice job ... from one former IBM'er to another
IBM TSS Benelux.
Former product techie.
How did you know that I’m a retired IBMer?!? You’re a pretty good sleuth in addition to being a good techie.
Regards,
Hal Jennings
in Austin, TX - Live Music Capital of the World
www.jenningsweb.us
Well, every time you post a reply using your mail client, it adds a footer:
I’ve had that footer for decades. You might be the second person who clicked on it. You, sir, are amazing.
Keep up the good work!
Regards,
Hal Jennings
in Austin, TX - Live Music Capital of the World
www.jenningsweb.us
1 Like
system
Closed
October 1, 2019, 12:33am
15
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.