DHCP server does not allow to connect more than 2 clients at the same time

HI every one,
I am trying to connect 7 clients to my HI-LINK mt7621-based DHCP server at the same time.
But more than 2 clients are not connected at the same time. To sort out this problem, I tested my setup using mikrotic router, and it was successful!!! in the next step, I tested TP-LINK (EC-220-G5) with the original system, and only 5 clients received an IP address.
The TP-Link router (WR842N) with the OpenWRT system menu has not received an IP address!!!

My question is: How many clients is it possible to connect to the router using OpenWRT? What settings do I need to set to solve this problem?

In theory any router (openwrt or not), can give hundreds of thousands of IP address. Of course depending on how you configured DHCP.

Can you show your /etc/config/dhcp settings?

1 Like

this settings is by default

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 domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'

config dhcp 'lan'
        option interface 'lan'
        option start '30'
        option limit '20'
        option leasetime '12h
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        option ra_slaac '1'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

In addition, I can connect many more clients, but one by one with a delay after the first IP receipt, I can connect the next router,
but it is not possible at the same time.

I don't see any issue with your config, but based on the limiit '20', it means it can lease a maximum of 20 IP's starting from .30 ( .30 to .49).

I suggest you monitor the syslog when doing your test (logread -f) and try to see if there are any hints or error on why it's disconnecting the other devices.

2 Likes

Can you allow more devices in your DHCP? You have 12hrs lease time but only 20 devices allowed, so within 12hrs when there exist more than 20 devices connected you will have trouble to provide an IP for the newer devices.

2 Likes

I want to test my router based on openWrt.
In this step I need to connect 8 host to openwrt router and receive IP address.
but I have the problem and need to understand that is my problem or BUG openwrt, because with another router all work excellent and very fast

It's 95% a configuration issue on your side, dhcp/ dnsmasq is a userspace service, which (should) behaves the same on all targets and devices.

Small DHCP pools and DHCP leases that haven't been released, nor timed out, might contribute to your issues.

You might want to reset OpenWrt to factory defaults and test it with the minimum changes necessary for your environment.

1 Like

Your another router is also OpenWrt, same configuration? If not then you are comparing apple to orange.