Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8621

Networking and servers • Re: DHCP serve fixed address from the Network Manager to MAC address

$
0
0
NM-managed hotspots can be run in two ways:
  • ipv4.method=shared - NM provides DHCP addresses to other devices (guessing this is what you're using now)
  • ipv4.method=manual - NM doesn't do that
When using ipv4.method=shared you have literally no control over anything the built-in DHCP server does**. When using ipv4.method=manual you have complete control, which means there's more stuff to configure, like...a DHCP server.

I'm pretty sure that the built-in DHCP server will provide the same IP address to the same MAC address "guest" every time, but you'd have to verify that via your own testing.

That said, if you want to have complete control over IP address assignments, you have to do a bit more work. Specifically, you'd need to configure ipv4.method=manual and provide your own DHCP server.

While this may sound daunting, there's at least one somewhat easy solution. It may work such that you can update your existing 02W OS disk (you'd have to test it on a backup copy of your existing 02W disk), but I can say with certainty that rebuilding that disk will get you exactly what you want. It will also save you a LOT of hassle the next time you have to rebuild the disk...for instance when you want to move your 02W to the next RasPiOS release, Trixie.

Hope the above helps you understand the landscape.

If you're interested in incorporating an easy-to-use solution, LMK and I'll happily provide more details.

**Not completely true, there is some additional dnsmasq config for NM that's possible, but I didn't find a good info/reference source for this use case (controlling MAC-to-IP assignments) when I explored it previously.

Statistics: Posted by bls — Sat Aug 23, 2025 2:22 pm



Viewing all articles
Browse latest Browse all 8621

Trending Articles