OpenWrt Forum Archive

Topic: How to set dhcp-range with dnsmasq.conf

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

I´m newbie with kamikaze and need litle help. I want to set dhcp-range in dnsmasq.conf. How can I disable /etc/init.d/dnsmasq -script setting dhcp-range...?

thanks Jones

Kamikaze does not use /etc/dnsmasq.conf. Kamikaze uses a UCI configuration file for dnsmasq. The UCI configuration file for dnsmasq is /etc/config/dhcp.

The DHCP range is specified with two options. The options are: start and limit

uci set dhcp.cfg2.start=100
uci set dhcp.cfg2.limit=150
uci commit dhcp
/etc/init.d/dnsmasq restart

Sets the DHCP range from 192.168.1.100 to 192.168.1.250

(Last edited by forum2008 on 16 Jan 2008, 23:00)

Yeap, I know that Kamikaze use UCI-configuration files...
My problem is this; My routers ip is 10.0.0.1 and my dhcp-range should be 10.0.2.1-10.0.2.50

Could I just comment out line from the script which set dhcp-range as command line argument?

append args "--dhcp-range=$name,$START,$END,$NETMASK,$leasetime${options:+ $options}"

ok , why?

i'm assuming your on a /16 subnet .. why couldnt you just make the dhcp do 10.0.0.100-150 OR make the router 10.0.2.1 ?

ok .. so maby you need this , how about spliting the switch into 2 vlans ? ( where you have vlan0 vlan1 and vlan2 )  then you can tell dnsmasq.conf what lan to assign addresses to.


hmm .. if you treated it as a class b network .. could you tell dnsmasq to start and end your addresses as 513-612 ( 2.1 - 2.100 ) ??   or will dns masq crap out with that

edit : bad math

(Last edited by lucindrea on 18 Jan 2008, 03:19)

The discussion might have continued from here.