On Dec 01, 2023, gene heskett wrote: > On 12/1/23 05:41, Dan Purgert wrote: > > On Nov 30, 2023, gene heskett wrote: > > > On 11/30/23 22:07, John Hasler wrote: > > > > Gene writes: > > > > > let me clarify: This buster machine acting like a 3d printer does NOT > > > > > have dhcpcd installed. No trace of it in /etc Only dhcp. > > > > > > > > I'm sure it's running dhclient. do > > > > > > > > ls /etc/dhcp > > > > > > > > and > > > > > > > > ps ax | grep dhc > > > > > > > > You don't need to do anything on that machine. Just install a dhcp > > > > server somewhere on your network (on the router is conventional) and it > > > > will give that machine an ip number. > > > > > > At risk of repeating myself forever, I don't need an unstable address, I > > > don't want whatever the heck is left in the pool. Hosts files do that, > > > dhcp > > > doesn't. It just hands out the next number in the pool. hosts files are > > > static. A forveer lease. > > > > DHCP will only hand out the "next" ('unstable') address to a host that > > currently has no valid lease AND does not have a reservation set on the > > DHCP server. Reservations are based on host MAC address. > > > > Any host that has a valid lease will renew that lease indefinitely, at > > lease half-life (and if the DHCP server happens to be missing at > > half-life, retry at 7/8ths ). > > Assuming I install a dhcp SERVER on this machine, how do I edit the > client.conf on that machine to query this one?, and how to I enable this > "reservation" on this SERVER so it hands out a stable address ONLY if the > reservation matches? Point me at the docs please and I'll go away.
You don't tell the client anything. DHCP is initiated by a broadcast from a client looking for an IP address. Reservation syntax depends on which DHCP server you're using. If it's isc-dhcp-server (predecessor to kea; though I've not yet migrated to kea), then, in the 'subnet' directive, you add a "host" directive. The isc-dhcp-server example config file (and html manual) cover the syntax in greater detail, but here's a short example: subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.100 192.168.1.199; [... DNS, default gateway, etc ...] host thePrinter { hardware ethernet 00:12:34:56:78:9A; fixed-address 192.168.1.120; } } -- |_|O|_| |_|_|O| Github: https://github.com/dpurgert |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860
signature.asc
Description: PGP signature