Config Host with IP pool

So I have to make sure certain devices always get a pool of IP addresses, I currently have it set to their MAC addresses. This can get problematic with multiple devices. So my question is can I set each Config Host to pull from an IP range?

config host
option ip '192.168.13.50' <-----This is what I want to set to a range something like between 192.168.13.41 to 192.168.13.50.
option mac '00:11:df:::*'
option name 'MC8'

Is there a reason you can't simply edit the DHCP configs?

This is in the DHCP config file on the devices we are using. I am still learning openwrt, so if there is an easier way I am totally down. This would make my life easier than having to put in multiple host sections.

1 Like

For this type of “advanced” (client “classes”) DHCP, I’d look at using kea and manually configuring it.

Screenshot from 2019-12-12 15-09-26

Sadly, these are vendor made devices. So I am stuck with this version of openwrt, chaos calmer (V0.2.1, r21)

You can assign one MAC to one IP.
You can assign multiple MACs to one IP. This is the scenario of assigning the ethernet and wireless MAC of a laptop to get the same IP, so it must be used with caution otherwise one device might not get IP.
In your case I think you have to go for the 1to1.

What is the reason for such a requirement?

That makes sense, the reason is I have about 15 devices. Each section of the 5 have the same three sections of the MAC addresses. I was basically trying to save time.

Makes sense if the vendor is the same.

Better copy paste the config host block 15 times and fix the mac and ip, rather than try something like that. At least it is a one time thing.

2 Likes

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