DHCP server not giving out addresses

Report wireless and/or network connectivity problems in this forum.

Moderator: Moderators

Post Reply
pkkrusty
Posts: 29
Joined: Mon Jan 13, 2020 4:41 pm

DHCP server not giving out addresses

Post by pkkrusty »

Setting up a TL-WDR3600 from scratch with 1.13, and the DHCP server isn't handing out addresses. I'm basically copying the same setup from my old router on 1.10, but changing the subnet a bit.

Am I missing something basic? Here's my /etc/config/network and /etc/config/dhcp files:

Code: Select all

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'fdd5:33a5:3c78::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option proto 'static'
	option ip6assign '60'
	option ipaddr '192.168.2.1'
	option netmask '255.255.254.0'
	option ip6ifaceid '::1'
	option dns '192.168.2.1 208.67.222.123 208.67.220.123'

config interface 'wan'
	option ifname 'eth0.2'
	option proto 'static'
	option ipaddr '192.168.1.76'
	option netmask '255.255.255.0'
	option gateway '192.168.1.1'
	option ipv6 '0'
	option peerdns '0'

config device 'wan_eth0_2_dev'
	option name 'eth0.2'
	option macaddr 'f4:f2:6d:79:01:59'

config interface 'wan6'
	option ifname 'eth0.2'
	option proto 'none'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '2 3 4 5 0t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '1 0t'
and

Code: Select all

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option expandhosts '1'
	option nonegcache '0'
	option authoritative '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'
	list server '/.bit/178.32.31.41'
	list server '/.bit/176.58.118.172'
	list server '/.glue/66.244.95.20'
	list server '/.glue/95.211.32.162'
	list server '/.glue/95.142.171.235'
	list server '/.parody/66.244.95.20'
	list server '/.parody/95.211.32.162'
	list server '/.parody/95.142.171.235'
	list server '/.dyn/66.244.95.20'
	list server '/.dyn/95.211.32.162'
	list server '/.dyn/95.142.171.235'
	list server '/.bbs/66.244.95.20'
	list server '/.bbs/95.211.32.162'
	list server '/.bbs/95.142.171.235'
	list server '/.free/66.244.95.20'
	list server '/.free/95.211.32.162'
	list server '/.free/95.142.171.235'
	list server '/.fur/66.244.95.20'
	list server '/.fur/95.211.32.162'
	list server '/.fur/95.142.171.235'
	list server '/.geek/66.244.95.20'
	list server '/.geek/95.211.32.162'
	list server '/.geek/95.142.171.235'
	list server '/.gopher/66.244.95.20'
	list server '/.gopher/95.211.32.162'
	list server '/.gopher/95.142.171.235'
	list server '/.indy/66.244.95.20'
	list server '/.indy/95.211.32.162'
	list server '/.indy/95.142.171.235'
	list server '/.ing/66.244.95.20'
	list server '/.ing/95.211.32.162'
	list server '/.ing/95.142.171.235'
	list server '/.null/66.244.95.20'
	list server '/.null/95.211.32.162'
	list server '/.null/95.142.171.235'
	list server '/.oss/66.244.95.20'
	list server '/.oss/95.211.32.162'
	list server '/.oss/95.142.171.235'
	list server '/.micro/66.244.95.20'
	list server '/.micro/95.211.32.162'
	list server '/.micro/95.142.171.235'
	list rebind_domain '.bit'
	list rebind_domain '.glue'
	list rebind_domain '.parody'
	list rebind_domain '.dyn'
	list rebind_domain '.bbs'
	list rebind_domain '.free'
	list rebind_domain '.fur'
	list rebind_domain '.geek'
	list rebind_domain '.gopher'
	list rebind_domain '.indy'
	list rebind_domain '.ing'
	list rebind_domain '.null'
	list rebind_domain '.oss'
	list rebind_domain '.micro'
	option domain 'home'
	option readethers '0'

config dhcp 'lan'
	option interface 'lan'
	option leasetime '12h'
	option start '60'
	option limit '194'
	option ra_management '2'
	option dhcpv6 'disabled'
	option ra 'disabled'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

config host 'static_host_1'
	option name 'EsaiieGarden'
	option mac '50:49:B0:B5:6D:FF'
	option ip '192.168.2.61'

config host 'static_host_2'
	option name 'KhamadGuard'
	option mac '2C:4D:DE:1A:DA:1F'
	option ip '192.168.2.62'

config host 'static_host_3'
	option name 'JohannesSister'
	option mac 'B0:8C:75:C3:88:9D'
	option ip '192.168.2.63'

config host 'static_host_4'
	option name 'BrigitteHelper'
	option mac 'BC:B8:4A:CC:81:41'
	option ip '192.168.2.77'

config host 'static_host_5'
	option name 'AmineFayeCleaner'
	option mac '18:21:95:A4:31:4F'
	option ip '192.168.2.80'
Along with another 160 or so more static hosts...

Lantis
Moderator
Posts: 6352
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: DHCP server not giving out addresses

Post by Lantis »

I think you’ll need to check the dnsmasq logs to understand why.
Also why are all of your static leases insight your dynamic range?
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

pkkrusty
Posts: 29
Joined: Mon Jan 13, 2020 4:41 pm

Re: DHCP server not giving out addresses

Post by pkkrusty »

Dnsmasq logs are where? Didn’t see them in /etc/logs.

Lantis
Moderator
Posts: 6352
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: DHCP server not giving out addresses

Post by Lantis »

Run the "logread" command after saving dhcp settings or restarting dnsmasq
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

pkkrusty
Posts: 29
Joined: Mon Jan 13, 2020 4:41 pm

Re: DHCP server not giving out addresses

Post by pkkrusty »

Super tip, that showed the problem. Below is a bit of output from logread:

Code: Select all

Thu Jan  6 20:24:29 2022 daemon.crit dnsmasq[2297]: bad DHCP host name at line 227 of /var/etc/dnsmasq.conf.cfg01411c
Thu Jan  6 20:24:29 2022 daemon.crit dnsmasq[2297]: FAILED to start up
And line 227 of /var/etc/dnsmasq.conf.cfg01411c shows a host with a non-ASCII character (which I copied directly over from my server running 1.10)

Code: Select all

226	dhcp-host=9C:3D:CF:E6:E5:D2,192.168.2.238,JonathanNew2
227	dhcp-host=90:56:FC:E6:EF:8A,192.168.2.239,Bourré
Removed the character and dnsmasq starts normally and I am getting DHCP assignments. Whew!

Lantis
Moderator
Posts: 6352
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: DHCP server not giving out addresses

Post by Lantis »

Perfect!
A few people have reported this lately. There must have been an upstream change to dnsmasq
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

Post Reply