You are not logged in.

#1 2012-04-03 17:17:46

funkypotatoe
Member
Registered: 2012-03-23
Posts: 47

dnsmasq issues?

Hi. I'm trying to set up wi-fi spot using hostapd & dnsmasq. Everything seems to be okay, but dnsmasq doesn't assign an ip address to client machine.

hostapd.conf (no encryption atm., just to test conf):

interface=wlan0
driver=nl80211
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
ssid=test
hw_mode=g
channel=6

dnsmasq.conf:

interface=wlan0
dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,6h

console output:

[*@* ~]$ sudo /usr/bin/dnsmasq -qd
dnsmasq: started, version 2.60 cachesize 150
dnsmasq: compile time options: IPv6 GNU-getopt DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack
dnsmasq-dhcp: DHCP, IP range 192.168.0.50 -- 192.168.0.150, lease time 12h
dnsmasq: reading /etc/resolv.conf
dnsmasq: using nameserver 8.8.8.8#53
dnsmasq: using nameserver 8.8.4.4#53
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:*:*:*:*:* brd ff:ff:ff:ff:ff:ff
    inet6 *::*:*:*:*/64 scope link 
       valid_lft forever preferred_lft forever
8: mon.wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UNKNOWN qlen 1000
    link/ieee802.11/radiotap 00:*:*:*:*:* brd ff:ff:ff:ff:ff:ff

wireshark shows 0 outgoing packets, only DHCP Discover packets from client machine.
What did i miss ?

Offline

#2 2012-04-03 18:43:15

funkypotatoe
Member
Registered: 2012-03-23
Posts: 47

Re: dnsmasq issues?

tried with "ifconfig wlan0 192.168.0.1 netmask 255.255.255.0" before hostapd & dnsmasq.

3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:*:*:*:*:* brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.1/24 brd 192.168.0.255 scope global wlan0
    inet6 fe80::*:*:*:*/64 scope link 
       valid_lft forever preferred_lft forever

still no luck sad

Offline

#3 2012-04-03 19:14:40

mr.MikyMaus
Member
From: disabled
Registered: 2006-03-31
Posts: 285

Re: dnsmasq issues?

Netmask part of dhcp-range parm is superfluous in your case, try to drop it. It's also strange that in the conf you have a lease time of 6h while the dnsmasq daemon says 12h on start.

Also if you set both interfaces manually, can you ping each other?


What happened to Arch's KISS? systemd sure is stupid but I must have missed the simple part ...

... and who is general Failure and why is he reading my harddisk?

Offline

#4 2012-04-04 12:57:27

funkypotatoe
Member
Registered: 2012-03-23
Posts: 47

Re: dnsmasq issues?

mr.MikyMaus wrote:

Netmask part of dhcp-range parm is superfluous in your case, try to drop it. It's also strange that in the conf you have a lease time of 6h while the dnsmasq daemon says 12h on start.

Also if you set both interfaces manually, can you ping each other?

Hi, thanks for reply.
Changed "dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,6h" to "dhcp-range=192.168.0.10,192.168.0.30,6h", same result. Different lease time is my copy/paste fault, i've changed lease time, to make sure dnsmasq reading from the same conf file i've edited. If i connect my wlan0 (intranet) with eth0 (ISP) with bridge, my LAN client machine getting an ip from my ISP. Wireshark shows ping-request packets coming from LAN to my wlan0 interface, but theres no ping-reply packets (in Wireshark/Lan machine). DHCPd seems to work fine with ip address offering, but no ping-reply's.

Apr  4 13:42:09 localhost kernel: [ 6107.199016] IICMP: IN=br0 OUT= PHYSIN=wlan0 MAC=00:*:*:*:*:*:*:*:*:*:*:*:* SRC=192.168.0.10 DST=192.168.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=ICMP TYPE=8 CODE=0 ID=700 SEQ=247 
Apr  4 13:42:09 localhost kernel: [ 6107.199073] OICMP: IN= OUT=wlan0 SRC=192.168.0.1 DST=192.168.0.10 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=34014 PROTO=ICMP TYPE=0 CODE=0 ID=700 SEQ=247 

Both machines has all policies in ACCEPT mode, iptables -F/-X.

Last edited by funkypotatoe (2012-04-04 13:00:13)

Offline

Board footer

Powered by FluxBB