LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 09-01-2014, 05:17 AM   #1
odjb
Member
 
Registered: Jan 2006
Location: France
Distribution: Ubuntu/Debian
Posts: 69

Rep: Reputation: 1
dhcp daemon not starting


Hi,

I'm trying to setup my unbuntu as an WiFi access point. I followed this procedure :
http://askubuntu.com/questions/18073...-wi-fi-hotspot
The first part is ok. I can configure my wireless interface and lanch hostapd and I can see my see my access point from another wireless device. But when I run isc-dhcp-server, it tries to retrieve an IP address and never succeeds.
This is the command to run dhcp daemon :
Code:
sudo service isc-dhcp-server start
This is the log in dmesg :
Code:
[11831.225190] init: isc-dhcp-server main process (9404) terminated with status 1
[11831.225202] init: isc-dhcp-server main process ended, respawning
[11831.284169] init: isc-dhcp-server main process (9412) terminated with status 1
[11831.284199] init: isc-dhcp-server main process ended, respawning
[11831.344327] init: isc-dhcp-server main process (9420) terminated with status 1
[11831.344358] init: isc-dhcp-server main process ended, respawning
[11831.410465] init: isc-dhcp-server main process (9428) terminated with status 1
[11831.410495] init: isc-dhcp-server main process ended, respawning
[11831.460698] init: isc-dhcp-server main process (9436) terminated with status 1
[11831.460727] init: isc-dhcp-server main process ended, respawning
[11831.528351] init: isc-dhcp-server main process (9444) terminated with status 1
[11831.528365] init: isc-dhcp-server main process ended, respawning
[11831.588041] init: isc-dhcp-server main process (9452) terminated with status 1
[11831.588072] init: isc-dhcp-server main process ended, respawning
[11831.645747] init: isc-dhcp-server main process (9460) terminated with status 1
[11831.645777] init: isc-dhcp-server main process ended, respawning
[11831.706038] init: isc-dhcp-server main process (9468) terminated with status 1
[11831.706069] init: isc-dhcp-server main process ended, respawning
[11831.763517] init: isc-dhcp-server main process (9476) terminated with status 1
[11831.763546] init: isc-dhcp-server main process ended, respawning
[11831.823598] init: isc-dhcp-server main process (9484) terminated with status 1
[11831.823609] init: isc-dhcp-server respawning too fast, stopped
 
Old 09-01-2014, 05:25 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,792

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
looks like misconfiguration, would be nice to post your config files. also try to start it in non-daemon mode (not as service), probably it will tell you what is the problem.
 
Old 09-01-2014, 06:58 AM   #3
odjb
Member
 
Registered: Jan 2006
Location: France
Distribution: Ubuntu/Debian
Posts: 69

Original Poster
Rep: Reputation: 1
Thanks, I started it in non-daemon mode and I checked syslog as it suggested and I noticed my wlan0 had no IP address configured. I restarted (ifconfig wlan0 stop then start) and now, dhcp starts.
I still don't get an address with my mobile device but I see the handshake of dhcp request.
I still investigate and tell you more.
 
Old 09-01-2014, 07:27 AM   #4
odjb
Member
 
Registered: Jan 2006
Location: France
Distribution: Ubuntu/Debian
Posts: 69

Original Poster
Rep: Reputation: 1
Here is the log when I try to connect to AP:
Code:
Sep  1 14:19:03 RHCP dhcpd: DHCPREQUEST for 10.1.0.1 from 00:22:f4:6b:3a:c1 (android-b0c30b7f56834b18) via wlan0
Sep  1 14:19:03 RHCP dhcpd: DHCPACK on 10.1.0.1 to 00:22:f4:6b:3a:c1 (android-b0c30b7f56834b18) via wlan0
Sep  1 14:19:03 RHCP hostapd: wlan0: STA 00:22:f4:6b:3a:c1 IEEE 802.11: disassociated
Sep  1 14:19:04 RHCP dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12 (xid=0xbe3bc6f)
Sep  1 14:19:04 RHCP hostapd: wlan0: STA 00:22:f4:6b:3a:c1 IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
My configuration files :
/etc/hostapd/hostapd.conf
Code:
interface=wlan0
driver=nl80211
ssid=rhcp
hw_mode=g
channel=1
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=xxxxxxxxx
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
/etc/network/interfaces
Code:
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet static
address 10.1.0.254
netmask 255.255.255.0
/etc/dhcp/dhcpd.conf
Code:
#
# Sample configuration file for ISC dhcpd for Debian
#
# Attention: If /etc/ltsp/dhcpd.conf exists, that will be used as
# configuration file instead of this file.
#
#

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# option definitions common to all supported networks...
#option domain-name "example.org";
#option domain-name-servers ns1.example.org, ns2.example.org;

#default-lease-time 600;
#max-lease-time 7200;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

# No service will be given on this subnet, but declaring it helps the 
# DHCP server to understand the network topology.

#subnet 10.152.187.0 netmask 255.255.255.0 {
#}

# This is a very basic subnet declaration.

#subnet 10.254.239.0 netmask 255.255.255.224 {
#  range 10.254.239.10 10.254.239.20;
#  option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
#}

# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.

#subnet 10.254.239.32 netmask 255.255.255.224 {
#  range dynamic-bootp 10.254.239.40 10.254.239.60;
#  option broadcast-address 10.254.239.31;
#  option routers rtr-239-32-1.example.org;
#}

# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
#  range 10.5.5.26 10.5.5.30;
#  option domain-name-servers ns1.internal.example.org;
#  option domain-name "internal.example.org";
#  option routers 10.5.5.1;
#  option broadcast-address 10.5.5.31;
#  default-lease-time 600;
#  max-lease-time 7200;
#}

# Hosts which require special configuration options can be listed in
# host statements.   If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.

#host passacaglia {
#  hardware ethernet 0:0:c0:5d:bd:95;
#  filename "vmunix.passacaglia";
#  server-name "toccata.fugue.com";
#}

# Fixed IP addresses can also be specified for hosts.   These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP.   Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
#host fantasia {
#  hardware ethernet 08:00:07:26:c0:a5;
#  fixed-address fantasia.fugue.com;
#}

# You can declare a class of clients and then do address allocation
# based on that.   The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.

#class "foo" {
#  match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
#}

#shared-network 224-29 {
#  subnet 10.17.224.0 netmask 255.255.255.0 {
#    option routers rtr-224.example.org;
#  }
#  subnet 10.0.29.0 netmask 255.255.255.0 {
#    option routers rtr-29.example.org;
#  }
#  pool {
#    allow members of "foo";
#    range 10.17.224.10 10.17.224.250;
#  }
#  pool {
#    deny members of "foo";
#    range 10.0.29.10 10.0.29.230;
#  }
#}
subnet 10.1.0.0 netmask 255.225.255.0 {
	range 10.1.0.1 10.1.0.20;
	option domain-name-servers 212.27.40.241, 212.27.40.240;
	option routers 10.1.0.254;
}
 
Old 09-05-2014, 07:06 AM   #5
odjb
Member
 
Registered: Jan 2006
Location: France
Distribution: Ubuntu/Debian
Posts: 69

Original Poster
Rep: Reputation: 1
Anybody has an idea ? It doesn't seem quite complicated but I don't know which way to use to solve it. I tried searching in forums and on google but no solution found.
 
Old 09-07-2014, 03:26 AM   #6
odjb
Member
 
Registered: Jan 2006
Location: France
Distribution: Ubuntu/Debian
Posts: 69

Original Poster
Rep: Reputation: 1
So, I will close this post as solves as the problem mentionned in the tittle is no longer present. I will open a new post for the other problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
signal for starting daemon shifter Programming 9 10-08-2008 02:54 AM
dhcp daemon for one nic sharadshankar Linux - Networking 1 05-24-2006 11:18 PM
daemon not starting up jbrearley Linux - Software 2 05-11-2006 10:54 AM
still cant get nmb daemon starting eroica Linux - Networking 1 12-02-2004 08:42 PM
Starting Up MySQL daemon tuka Linux - Software 2 08-06-2003 11:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 07:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration