DHCP limit problem on WIFI

Hi,

I have instlaled "OpenWrt 18.06.2 r7676-cddd7b4c77" on my TP-LINK Archer C7 v5
It was my first time, and everything seems ti be ok, with the default configuration.

But something make me crazy the DHCP server limit does not work on the WLAN.

the DHCP server IP limits are between 100 and 150
When I connect a computer on LAN via an ethernet cable on the routers everything is ok i got an IP 192.168.1.138
but when i connect through the wireless interrface the DHCP give me an address 192.168.1.238.
238 it's over 150, no ?

Is there womething wrong in my understanding ? it's as if there were several DHCP servers, or different limits depending on the interfaces

Someone could help me?

ogawan.


DHCP config


config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option expandhosts '1'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option domain 'lanoga'
        option logqueries '1'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option force '1'
        option netmask '255.255.255.0'

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'

network config


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 'fd3e:6986:cf4c::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option stp '1'
        option delegate '0'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'

config interface 'wan6'
        option ifname 'eth0.2'
        option proto 'dhcpv6'
        option auto '0'

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'

wireless config


config wifi-device 'radio0'
        option type 'mac80211'
        option channel '36'
        option hwmode '11a'
        option path 'pci0000:00/0000:00:00.0'
        option htmode 'VHT80'
        option legacy_rates '1'
        option country 'FR'
        option noscan '1'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'psk2+tkip+ccmp'
        option key 'xxxxxxxxx'
        option network 'lan'

config wifi-device 'radio1'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'platform/qca956x_wmac'
        option htmode 'HT40'
        option legacy_rates '1'
        option noscan '1'
        option country 'FR'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'psk2+tkip+ccmp'
        option key 'xxxxxxx'
        option network 'lan'

The webinterface LUCI states the "limit" as:
"Maximum number of leased addresses."

So, it's starting at 100 and ending at 250. 150 Addresses inbetween.

2 Likes

Arrggggg !!!
That's makes sense

100+150=250 so my IP address will be between .100 and .250

in my understanding the IP was between 100 a 150...

so to have an IP between 100 and 150 the configuration is :

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '50'

:slight_smile:Thank You !!!

Well, to be strictly correct, that would give you IPs from .100 to .149. If you want .150 to be included then you should set the limit to 51, because the first IP (.100 in this case) is included in the count.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.