[Dnsmasq-discuss] Reserved IP Addresses for Specific DHCP Clients without a Connection to the Subnet
Rich Otero
rotero at editshare.com
Fri Oct 28 22:44:36 UTC 2022
I think I've arrived at a solution. With v2.87 and the following
configuration, clients are now receiving the expected leases:
# /etc/dnsmasq.d/172.18.0.0-16
dhcp-range=set:172.18.15.0-24,172.18.15.0,static,255.255.255.0
shared-network=enp2s0,172.18.15.0
# /etc/dhcp-hosts/172.18.15.0-24
00:c0:b7:f1:0f:65,rack7-pdu1
00:c0:b7:f1:a3:71,rack7-pdu2
# /etc/dhcp-opts/172.18.15.0-24
tag:172.18.15.0-24,option:router,172.18.15.1
# /etc/static-hosts/172.18.15.0-24
172.18.15.106 rack7-pdu1
172.18.15.107 rack7-pdu2
This leads me to another question: There are 129 other subnets whose
gateway IP addresses will be moved away from the dnsmasq server. Is it
allowed to have many shared-network directives in the config?
shared-network=enp2s0,172.18.0.0
shared-network=enp2s0,172.18.1.0
shared-network=enp2s0,172.18.2.0
< … >
shared-network=enp2s0,172.18.125.0
shared-network=enp2s0,172.18.126.0
shared-network=enp2s0,172.18.127.0
shared-network=enp2s0,172.18.128.0
Thanks again for all of the help.
-Rich
On Thu, Oct 27, 2022 at 10:44 AM Rich Otero <rotero at editshare.com> wrote:
> No, I'm not setting dhcp-rapid-commit in my config. I'll follow your
> earlier suggestions about shared-network and come back when I have more
> information.
>
> -Rich
>
> On Thu, Oct 27, 2022 at 7:15 AM Simon Kelley <simon at thekelleys.org.uk>
> wrote:
>
>>
>>
>> On 27/10/2022 11:49, Simon Kelley wrote:
>>
>> >
>> > When I first tried this, I had the dhcp-rapid-commit option set, and
>> > strange things were happening, which I'll look into now, so make sure
>> > you don't have that. (I might have found a bug for my efforts).
>> >
>>
>> I did indeed find a bug, and if you _are_ using rapid commit, that might
>> be a problem, I doubt you are. The fix is in the git repo now.
>>
>> Simon.
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20221028/b36dfda1/attachment.htm>
More information about the Dnsmasq-discuss
mailing list