OpenWrt Forum Archive

Topic: DHCP not working on FSG-3

The content of this topic has been archived on 5 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,
I am using the latest trunk on my Freecom FSG-3 (r12389 -- thanks for the good work btw !), almost everything is working OK apart from the DHCP : I can't get an IP by wlan, neither by LAN. DNS is working right, though. Strange, as it is dnsmasq that is managing both, isn't it ?
My config is : (slightly modified default one, useless stuff stripped)

/etc/config/network :

config interface lan
    option ifname    "eth0 ath0"
    option type    bridge
    option proto    static
    option ipaddr    192.168.1.1
    option netmask    255.255.255.0

/etc/config/dhcp :

config dnsmasq
    option domainneeded    1
    option boguspriv    1
    option filterwin2k    '0'  #enable for dial on demand
    option localise_queries    1
    option local    '/lan/'
    option domain    'lan'
    option expandhosts    1
    option nonegcache    0
    option authoritative    1
    option readethers    1
    option leasefile    '/tmp/dhcp.leases'
    option resolvfile    '/tmp/resolv.conf.auto'

config dhcp
    option interface    lan
    option start     100
    option limit    150
    option leasetime    12h

I even tried to get rid of the bridge and only test it on eth0 : same result.
Does someone have a clue on what is going on there ? Help would be welcome.

Thanks.

Some precision : a tcpdump on my FSG shows DHCP requests from my laptop, but no reponse from openwrt ... strange.

Actually, the dnsmasq init script is giving a wrong IP range to dnsmasq : it starts from 0.0.0.100 to 0.0.0.150 ...
I tracked that down to a signedness issue in the ip2int/int2ip awk routines used by the ipcalc.sh script. This must only affect IXP4xx since it breaks the whole DHCP since the start (i.e. 2 month ago for me) and nobody seemed to have noticed that ... I enetred bug #3946 to track this issue.
BTW, why is ps always cutting output to 80 columns ? I could have spotted that bug a lot earlier if I saw the IP range this way ...

Hi,

My setup for dhcp on ath0 interface uses dnsmasq.conf as follows  and to issue dhcp I run as

dnsmasq --conf-file=/tmp/dnsmasq.conf  --dhcp-leasefile=/tmp/dnsmasq_leases.log

root@OpenWrt:~/# cat /tmp/dnsmasq.conf
domain-needed
bogus-priv
interface=ath0
dhcp-range=lan,192.168.3.10,192.168.3.250,1h
dhcp-option=lan,3,192.168.3.1
dhcp-option=lan,6,192.168.3.1
dhcp-option=lan,1,255.255.255.0
dhcp-option=lan,28,192.168.3.255
root@OpenWrt:~/#

it works well on IXP4xx.

Sara,

Thanks for the tip !
But I solved the problem, as indicated in the bug report, by applying the patch I made here : http://busybox.net/bugs/view.php?id=4774
This way, I use the "standard" openwrt mechanism.

Thanks still.

The discussion might have continued from here.