DHCP for AP does not start

Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Locked
Pouknouki
 
Posts: 16
Joined: Wed Nov 27, 2013 7:35 am

DHCP for AP does not start

Post by Pouknouki »

Hi
I just bought a Raspberry Pi (Model B) with this WiFi dongle : http://tellu.re/IntmE6
I wanted to create a WiFi access point with them, so I followed this tutorial : http://tellu.re/1afLfe9
This was the first time a tutorial for this was good (I had read other but there was always an error somewhere).
I finished doing everything written in it, and I could see the Pi_AP on my Windows Phone and Galaxy Tab, but couldn't connect.
So I rebooted and then, I saw the DHCP service could not start, and I would like some help over here because I don't know where the problem is, I followed exactly the tutorial :roll:
Here is my error message :

Code: Select all

[ ok ] Starting ISC DHCP server: dhcpd[....] Starting OpenBSD Secure Shell server: sshd
[FAIL] check syslog for diagnostics. ... failed!
 failed!
[FAIL] startpar: service(s) returned failure: isc-dhcp-server ... failed!
And then it asks me to log in.
I searched on Google but nothing helped me.
If you have any idea...
Thanks

Note : when I try to connect from my Galaxy Tab, the status stays at "Getting IP adress" (or something like that, it is in french)

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: DHCP for AP does not start

Post by adafruit_support_rick »

What does /var/log/syslog have to say about DHCP?

Pouknouki
 
Posts: 16
Joined: Wed Nov 27, 2013 7:35 am

Re: DHCP for AP does not start

Post by Pouknouki »

It says :

Code: Select all

Dec  2 02:22:01 raspberrypi dhcpd: Internet Systems Consortium DHCP Server 4.2.2
Dec  2 02:22:01 raspberrypi dhcpd: Copyright 2004-2011 Internet Systems Consortiu                                                                                       m.
Dec  2 02:22:01 raspberrypi dhcpd: All rights reserved.
Dec  2 02:22:01 raspberrypi dhcpd: For info, please visit https://www.isc.org/sof                                                                                       tware/dhcp/
Dec  2 02:22:01 raspberrypi dhcpd: Internet Systems Consortium DHCP Server 4.2.2
Dec  2 02:22:01 raspberrypi dhcpd: Copyright 2004-2011 Internet Systems Consortiu                                                                                       m.
Dec  2 02:22:01 raspberrypi dhcpd: All rights reserved.
Dec  2 02:22:01 raspberrypi dhcpd: For info, please visit https://www.isc.org/sof                                                                                       tware/dhcp/
Dec  2 02:22:01 raspberrypi dhcpd: Wrote 0 leases to leases file.
Dec  2 02:22:03 raspberrypi dhcpd:
Dec  2 02:22:03 raspberrypi dhcpd: No subnet declaration for wlan0 (no IPv4 addre                                                                                       sses).
Dec  2 02:22:03 raspberrypi dhcpd: ** Ignoring requests on wlan0.  If this is not                                                                                        what
Dec  2 02:22:03 raspberrypi dhcpd:    you want, please write a subnet declaration
Dec  2 02:22:03 raspberrypi dhcpd:    in your dhcpd.conf file for the network seg                                                                                       ment
Dec  2 02:22:03 raspberrypi dhcpd:    to which interface wlan0 is attached. **
Dec  2 02:22:03 raspberrypi dhcpd:
Dec  2 02:22:03 raspberrypi dhcpd:
Dec  2 02:22:03 raspberrypi dhcpd: Not configured to listen on any interfaces!
And here is my interfaces file :

Code: Select all

auto lo

iface lo inet loopback
iface eth0 inet dhcp

#allow-hotplug wlan0
#iface wlan0 inet manual
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp

#auto br0
#iface br0 inet dhcp
#bridge_ports eth0 wlan0

iface wlan0 inet static
  address 192.168.42.1
  netmask 255.255.255.0

up iptables-restore < /etc/iptables.ipv4.nat

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: DHCP for AP does not start

Post by adafruit_support_mike »

It looks like your wireless interface isn't getting an address when the RasPi boots. That means the DHCP server can't decide what addresses to use for that interface, and it reports an error.

Try modifying your /etc/network/interfaces like so:

Code: Select all

auto wlan0
iface wlan0 inet static
  address 192.168.42.1
  netmask 255.255.255.0
The 'auto' directive tells the system to configure wlan0 any time a general 'bring the network interfaces up' command is given.

Locked
Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Return to “Adafruit Raspberry Pi® accessories”