G109B
Posts: 22
Joined: Thu Sep 12, 2013 9:57 am

Raspi making DHCP requests to its own hotspot

Mon Apr 03, 2017 11:21 am

My hostapd hotspot with isc-dhcp-server is working just fine.
It is hosting a web page to view a local log, and there is NO internet connection, although eth0 is available for use on my home network if I bring it home.
I can see from syslog and messages that it makes a DHCP request on its own wlan once per minute. Can this be stopped ?

This is from /var/log/messages:
Apr 3 11:58:25 raspi2ag dhcpd: DHCPDISCOVER from 7c:dd:90:5e:fb:87 (raspi2ag) via wlan0
Apr 3 11:58:26 raspi2ag dhcpd: DHCPOFFER on 192.168.43.24 to 7c:dd:90:5e:fb:87 (raspi2ag) via wlan0

Many thanks.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26671
Joined: Sat Jul 30, 2011 7:41 pm

Re: Raspi making DHCP requests to its own hotspot

Mon Apr 03, 2017 1:50 pm

Sounds like dhcpcd is still running, you need to deny the interface that is making the request

https://www.raspberrypi.org/documentati ... s-point.md
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

G109B
Posts: 22
Joined: Thu Sep 12, 2013 9:57 am

Re: Raspi making DHCP requests to its own hotspot

Mon Apr 03, 2017 2:57 pm

Thanks for the quick reply. I added "denyinterfaces wlan0" to the end of /etc/dhcp/dhcpd.conf but it seems to have stopped access to the hotspot. (I did think that dhcpd was part of isc-dhcp-server). /etc/dhcpd.conf does not exist.

This from syslog:
Apr 3 15:47:53 raspi2ag dhcpcd[441]: wlan0: adding route to 169.254.0.0/16
Apr 3 15:47:53 raspi2ag avahi-daemon[436]: Registering new address record for 169.254.14.205 on wlan0.IPv4.
Apr 3 15:47:55 raspi2ag ntpd[685]: Listen normally on 8 wlan0 169.254.14.205 UDP 123

User avatar
elkberry
Posts: 167
Joined: Wed Dec 28, 2016 9:21 pm

Re: Raspi making DHCP requests to its own hotspot

Mon Apr 03, 2017 6:36 pm

G109B wrote:Thanks for the quick reply. I added "denyinterfaces wlan0" to the end of /etc/dhcp/dhcpd.conf but it seems to have stopped access to the hotspot. (I did think that dhcpd was part of isc-dhcp-server). /etc/dhcpd.conf does not exist.

This from syslog:
Apr 3 15:47:53 raspi2ag dhcpcd[441]: wlan0: adding route to 169.254.0.0/16
Apr 3 15:47:53 raspi2ag avahi-daemon[436]: Registering new address record for 169.254.14.205 on wlan0.IPv4.
Apr 3 15:47:55 raspi2ag ntpd[685]: Listen normally on 8 wlan0 169.254.14.205 UDP 123
No, it's dhcpcd, not dhcpd ... note the "c" for client. Same for the daemon, same for the config. Yeah, I know ... I've messed this up myself several times, especially after having worked with dhcpcd so much. :mrgreen:
From ZX81 to Raspberry Pi, but wait ... where's the 7805 gone?

G109B
Posts: 22
Joined: Thu Sep 12, 2013 9:57 am

Re: Raspi making DHCP requests to its own hotspot

Mon Apr 03, 2017 7:27 pm

Many thanks elkberry, I still find it difficult to see the difference (!), but it certainly fixed it.
I have made a note to read this stuff up when I get a moment.

Return to “Troubleshooting”