I have a strange problem. I've a fresh install of Jessie, with PiHole installed.
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.9.59+ #1047 Sun Oct 29 11:47:10 GMT 2017 armv6l GNU/Linux
Pi-hole Version v3.2.1 Web Interface Version v3.2.1 FTL Version vDev (v2.13.2 , v2.13.2 )
I believe it has been setup with a static IP for wlan0
, which works for the first 24 hours after turning the Pi on. However after 24 hours, it seems to get another IP address, in a range that I don't even recognise. There is no other network connection.
PiHole is configured as both a DNS and DHCP server (via its UI), as my ISP's hub doesn't allow you to set the DNS servers.
I can see it being released in the log, but no idea why, how to stop it, or why it works at the first boot.
Any suggestions?!
dhcpcdp log
pi@raspberrypi:~ $ cat /var/log/syslog | grep dhcpcd
Feb 6 16:03:20 raspberrypi dhcpcd[253]: wlan0: failed to renew DHCP, rebinding
Feb 6 19:03:20 raspberrypi dhcpcd[253]: wlan0: DHCP lease expired
Feb 6 19:03:20 raspberrypi dhcpcd[253]: wlan0: deleting default route via 192.168.1.254
Feb 6 19:03:20 raspberrypi dhcpcd[253]: wlan0: deleting route to 192.168.1.0/24
Feb 6 19:03:21 raspberrypi dhcpcd[253]: wlan0: soliciting a DHCP lease
Feb 6 19:03:26 raspberrypi dhcpcd[253]: wlan0: probing for an IPv4LL address
Feb 6 19:03:30 raspberrypi dhcpcd[253]: wlan0: using IPv4LL address 169.254.63.162
Feb 6 19:03:30 raspberrypi dhcpcd[253]: wlan0: adding route to 169.254.0.0/16
Feb 6 19:03:30 raspberrypi dhcpcd[253]: wlan0: adding default route
Feb 6 19:14:28 raspberrypi systemd[1]: Starting dhcpcd on all interfaces...
Feb 6 19:14:28 raspberrypi dhcpcd[240]: dev: loaded udev
Feb 6 19:14:28 raspberrypi dhcpcd[240]: no valid interfaces found
Feb 6 19:14:28 raspberrypi dhcpcd[240]: forked to background, child pid 253
Feb 6 19:14:30 raspberrypi systemd[1]: Started dhcpcd on all interfaces.
Feb 6 19:14:35 raspberrypi dhcpcd-run-hooks[370]: wlan0: starting wpa_supplicant
Feb 6 19:14:37 raspberrypi dhcpcd[253]: wlan0: waiting for carrier
Feb 6 19:14:37 raspberrypi dhcpcd[253]: wlan0: carrier acquired
Feb 6 19:14:37 raspberrypi dhcpcd[253]: DUID 00:01:00:01:21:b0:de:88:b8:27:eb:b7:c9:fe
Feb 6 19:14:37 raspberrypi dhcpcd[253]: wlan0: IAID eb:b7:c9:fe
Feb 6 19:14:37 raspberrypi dhcpcd[253]: wlan0: adding address fe80::69c1:c47c:e8d:f433
Feb 6 19:14:37 raspberrypi dhcpcd[253]: wlan0: probing address 192.168.1.253/24
Feb 6 19:14:37 raspberrypi dhcpcd[253]: wlan0: carrier lost
Feb 6 19:14:37 raspberrypi dhcpcd[253]: wlan0: deleting address fe80::69c1:c47c:e8d:f433
Feb 6 19:14:38 raspberrypi dhcpcd[253]: wlan0: carrier acquired
Feb 6 19:14:38 raspberrypi dhcpcd[253]: wlan0: IAID eb:b7:c9:fe
Feb 6 19:14:38 raspberrypi dhcpcd[253]: wlan0: adding address fe80::e85f:508f:b249:455e
Feb 6 19:14:38 raspberrypi dhcpcd[253]: wlan0: probing address 192.168.1.253/24
Feb 6 19:14:39 raspberrypi dhcpcd[253]: wlan0: soliciting an IPv6 router
Feb 6 19:14:40 raspberrypi dhcpcd[253]: wlan0: Router Advertisement from fe80::5a90:43ff:feb8:acd5
Feb 6 19:14:40 raspberrypi dhcpcd[253]: wlan0: adding address fdaa:bbcc:ddee:0:a95e:17d6:a33d:f89c/64
Feb 6 19:14:40 raspberrypi dhcpcd[253]: wlan0: adding address 2a00:23c4:f78a:c500:b628:4e2:3921:cd18/64
Feb 6 19:14:40 raspberrypi dhcpcd[253]: wlan0: adding route to fdaa:bbcc:ddee::/64
Feb 6 19:14:40 raspberrypi dhcpcd[253]: wlan0: adding route to 2a00:23c4:f78a:c500::/64
Feb 6 19:14:40 raspberrypi dhcpcd[253]: wlan0: adding default route via fe80::5a90:43ff:feb8:acd5
Feb 6 19:14:40 raspberrypi dhcpcd[253]: wlan0: requesting DHCPv6 information
Feb 6 19:14:45 raspberrypi dhcpcd[253]: wlan0: using static address 192.168.1.253/24
Feb 6 19:14:45 raspberrypi dhcpcd[253]: wlan0: adding route to 192.168.1.0/24
Feb 6 19:14:45 raspberrypi dhcpcd[253]: wlan0: adding default route via 192.168.1.254
/etc/network/interfaces
pi@raspberrypi:~ $ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
/etc/dhcpcd.conf
pi@raspberrypi:~ $ cat /etc/dhcpcd.conf
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.
# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel
# Inform the DHCP server of our hostname for DDNS.
hostname
# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
#duid
# Persist interface configuration when dhcpcd exits.
persistent
# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit
# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu
# A ServerID is required by RFC2131.
require dhcp_server_identifier
# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private
# Example static IP configuration:
#interface eth0
#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.1.253/24
static routers=192.168.1.254
static domain_name_servers=127.0.0.1