UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
# 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;
}
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.