LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-07-2014, 03:41 AM   #1
odjb
Member
 
Registered: Jan 2006
Location: France
Distribution: Ubuntu/Debian
Posts: 67

Rep: Reputation: 0
Can't acquire address via DHCP


I'm trying to setup my ubuntu as a WiFi access point. I configured access point with hostap and my AP is seen when wireless network is scanned. I configured DHCP and my android pad tries to get an address but never succeeds.

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-07-2014, 08:27 PM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,184

Rep: Reputation: 1017Reputation: 1017Reputation: 1017Reputation: 1017Reputation: 1017Reputation: 1017Reputation: 1017Reputation: 1017
It does get a DHCP address. Second line in your log says DHCPACK. But somehow you are disconnected from the AP, and then (logically) you don't get an IP address. But it is not in your DHCP.

jlinkels
 
Old 10-01-2014, 12:33 PM   #3
odjb
Member
 
Registered: Jan 2006
Location: France
Distribution: Ubuntu/Debian
Posts: 67

Original Poster
Rep: Reputation: 0
ok, so far, I tried with another guest running W7. At first it didn't work neither but I finally found that I forgot to uncomment the "default-lease-time 600;" and "max-lease-time 7200;" lines in /etc/dhcp/dhcpd.conf. After correcting, it worked. I thought I could then connect with my android tablet but it's still the same : "deauthenticated due to inactivity (timer DEAUTH/REMOVE)" message in syslog.
What can happen so it gets this message ?

Last edited by odjb; 10-01-2014 at 03:56 PM.
 
Old 10-01-2014, 04:12 PM   #4
odjb
Member
 
Registered: Jan 2006
Location: France
Distribution: Ubuntu/Debian
Posts: 67

Original Poster
Rep: Reputation: 0
Setting a static IP on the tablet makes it work fine. There's something fishy with DHCP ...
 
Old 10-03-2014, 05:45 AM   #5
odjb
Member
 
Registered: Jan 2006
Location: France
Distribution: Ubuntu/Debian
Posts: 67

Original Poster
Rep: Reputation: 0
Anyone has an idea ?
 
  


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
Windows XP network can't acquire DHCP address from debian squeeze? shams Linux - Networking 11 04-22-2011 04:38 AM
Unable to acquire IP address at boot after upgrade to Fedora 9 openSauce Linux - Networking 7 11-22-2008 03:19 AM
Acquire uncached MAC address in kernel. shuperb Linux - Kernel 0 02-11-2008 09:52 PM
Cannot acquire DHCP IP address from router dwhitney67 Linux - Newbie 10 11-02-2007 04:17 PM
Unable to acquire an IP Address ras777 Linux - Wireless Networking 13 12-03-2005 11:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration