Hello,
How is it possible to have ip outside the configuration ranges?
For example since one month I have configured DHCP with this range.
Start 50
End 60
However, I have ip outside the range
Thanks for information
Hello,
How is it possible to have ip outside the configuration ranges?
For example since one month I have configured DHCP with this range.
Start 50
End 60
However, I have ip outside the range
Thanks for information
DHCP range is a restriction for the dhcp server only (dnsmasq) and not a general limit for your defined network (192.168.0.0/24) itself. This is defined by the subnet mask. E. g. 192.168.0.0/24 is a shortening for 192.168.0.0 / 255.255.255.0 and you have 254 addresses available in this (sub-)network. Each device is able to assign an address by itself without the DHCP server.
You can restrict this e. g.:
To get a limit like 192.168.0.1 - 192.168.0.126 you would define a subnet mask 255.255.255.128.
The WWW will give you a lot of links to calculators doing this for you for a given range.
You can modify this either in /etc/config/network (netmask) or in LuCI (Network - Interfaces - LAN - General settings - IPv4 Netmask.
@remydev, welcome to the community!
What does "End" mean?
The options in DHCP are Start and Limit. So the config would be Start 50, Limit 10.
I'm actually lost at what @pwned is talking about, I think he's suggesting you just make the subnet smaller - which could work too.
Lost me too.
Everything local here has a static IP starting at 100.
I allow 15 dynamic IPs starting at 2, and also reinforce sequential assignment in dnsmasq settings.
Works well so far. I can see roaming devices coming in with IPs 2, 3, 4 . . .
Never gone above 7 dhcp assigned IPs so can’t say what happens once that range gets exhausted.
Yep. As he has explicit given the range I thought he defined the numbers in LuCI correctly. And especially those Android devices assigning their own IP* if the server cannot assign a new IP because the leases of other earlier connected devices are still not expired. So he could either define the network smaller, increase the range to like 20 (10 is IMO a bit to small) or decrease the leasetime. I hope it is more clear now.
EDIT1:
*To be more clear on this. This is not a general issue. I realized this on older versions of Android. There were several Bugs on Android in the past with DHCP (I think it was Android 4 if I remember correct). Android was still using the IP even if it was expired.
EDIT2: Found it https://www.net.princeton.edu/android/android-stops-renewing-lease-keeps-using-IP-address-11236.html
Yes sorry,
as a new user, i was not able to upload more than one picture, but your right it's start and limit.
Also i confirm this is not only on andoid, remy-pc is my laptop and run with manjaro, but i get the ip 192.168.0.81
root@OpenWrt:~# uci show dhcp
dhcp.@dnsmasq[0]=dnsmasq
dhcp.@dnsmasq[0].domainneeded='1'
dhcp.@dnsmasq[0].localise_queries='1'
dhcp.@dnsmasq[0].rebind_protection='1'
dhcp.@dnsmasq[0].rebind_localhost='1'
dhcp.@dnsmasq[0].local='/lan/'
dhcp.@dnsmasq[0].domain='lan'
dhcp.@dnsmasq[0].expandhosts='1'
dhcp.@dnsmasq[0].authoritative='1'
dhcp.@dnsmasq[0].readethers='1'
dhcp.@dnsmasq[0].leasefile='/tmp/dhcp.leases'
dhcp.@dnsmasq[0].localservice='1'
dhcp.lan=dhcp
dhcp.lan.interface='lan'
dhcp.lan.dhcpv6='server'
dhcp.lan.ra='server'
dhcp.lan.start='50'
dhcp.lan.ra_management='1'
dhcp.lan.force='1'
dhcp.lan.limit='60'
dhcp.lan.leasetime='5m'
dhcp.wan=dhcp
dhcp.wan.interface='wan'
dhcp.wan.ignore='1'
dhcp.odhcpd=odhcpd
dhcp.odhcpd.maindhcp='0'
dhcp.odhcpd.leasefile='/tmp/hosts/odhcpd'
dhcp.odhcpd.leasetrigger='/usr/sbin/odhcpd-update'
dhcp.odhcpd.loglevel='4'
dhcp.@host[0]=host
dhcp.@host[0].name='Proxmox-noth01'
dhcp.@host[0].dns='1'
dhcp.@host[0].mac='50:b7:c3:8e:dd:ce'
dhcp.@host[0].ip='192.168.0.200'
dhcp.@host[1]=host
dhcp.@host[1].name='Freebox-Mini'
dhcp.@host[1].dns='1'
dhcp.@host[1].mac='70:FC:8F:71:3D:5A'
dhcp.@host[1].ip='192.168.0.10'
dhcp.@host[2]=host
dhcp.@host[2].name='Reverse-Proxy'
dhcp.@host[2].dns='1'
dhcp.@host[2].mac='FA:CB:99:8A:42:CE'
dhcp.@host[2].ip='192.168.0.250'
dhcp.@host[3]=host
dhcp.@host[3].name='Altideal_Preview'
dhcp.@host[3].dns='1'
dhcp.@host[3].mac='AE:B6:F5:E4:B8:82'
dhcp.@host[3].ip='192.168.0.234'
dhcp.@host[4]=host
dhcp.@host[4].name='Altideal_Zammad'
dhcp.@host[4].dns='1'
dhcp.@host[4].mac='DE:20:F6:59:78:2C'
dhcp.@host[4].ip='192.168.0.232'
dhcp.@host[5]=host
dhcp.@host[5].name='Altideal_matomo'
dhcp.@host[5].dns='1'
dhcp.@host[5].mac='FA:2A:B7:AA:F2:8A'
dhcp.@host[5].ip='192.168.0.231'
dhcp.@host[6]=host
dhcp.@host[6].name='Cloud.remysilber.com'
dhcp.@host[6].dns='1'
dhcp.@host[6].mac='4E:44:D9:A4:F0:3E'
dhcp.@host[6].ip='192.168.0.201'
dhcp.@host[7]=host
dhcp.@host[7].name='Imprimante_Laser_Samsung'
dhcp.@host[7].dns='1'
dhcp.@host[7].mac='84:25:19:74:72:BD'
dhcp.@host[7].ip='192.168.0.11'
dhcp.@host[8]=host
dhcp.@host[8].name='Stockage'
dhcp.@host[8].dns='1'
dhcp.@host[8].mac='C6:B1:05:31:A0:73'
dhcp.@host[8].ip='192.168.0.249'
dhcp.@host[9]=host
dhcp.@host[9].mac='C8:D3:FF:21:89:BA'
dhcp.@host[9].name='Proxmox-Noth02'
dhcp.@host[9].dns='1'
dhcp.@host[9].ip='192.168.0.30'
dhcp.@domain[0]=domain
dhcp.@domain[0].name='noth-nas01.remysilber.com'
dhcp.@domain[0].ip='192.168.0.35'
dhcp.@host[10]=host
dhcp.@host[10].dns='1'
dhcp.@host[10].ip='192.168.0.40'
dhcp.@host[10].mac='B0:0C:D1:60:0E:37'
dhcp.@host[10].name='RemyLaptopHPEthernet'
dhcp.@host[11]=host
dhcp.@host[11].mac='00:11:32:CB:26:FD'
dhcp.@host[11].name='noth-nas01'
dhcp.@host[11].dns='1'
dhcp.@host[11].ip='192.168.0.35'
Finally, the question is whether it is normal to have ip out of range.
I don't want to reduce the number of ip
Sorry I also forgot to specify that I have fixed ip.
mprimante_Laser_Samsung
Freebox-Mini
noth-nas01
are not concerned, their ip are permanent and it is normal.
What I don't understand is remy-pc and HUAWEI_P8_lite_2017-3f7ef who are out of range
Limit means you can use any address >=50. So the "end" is not defined as indicated in first post. If you want to limit it to 10 and in range you would need:
dhcp.lan.limit '10'
dhcp.lan.sequential_ip='1'
Dnsmasq is designed to choose IP addresses for DHCP clients using a hash of the client's MAC address. This normally allows a client's address to remain stable long-term, even if the client sometimes allows its DHCP lease to expire. In this default mode IP addresses are distributed pseudo-randomly over the entire available address range. There are sometimes circumstances (typically server deployment) where it is more convenient to have IP addresses allocated sequentially, starting from the lowest available address, and setting this parameter enables this mode. Note that in the sequential mode, clients which allow a lease to expire are much more likely to move IP address; for this reason it should not be generally used.
Yes, it's normal for static DHCP leases such as:
Start=50 and limit=60 means that your addresses START at 192.168.0.50 and are LIMITed by 60 successive addresses in total. In practice that means you will have 192.168.0.50 through 192.168.0.109 in use (60 addresses in total).
If you want to limit your address range from 192.168.0.50 through 192.168.0.60 as you seem to want to do, your START should again be 50, but your LIMIT should be 11 for the 11 addresses in total, NOT the 60 you have selected right now.
Ok thanks guys.
So limit is what i was looking for.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.