NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: dhcpd(8) and unused or old MAC addresses



On Wed, Aug 23, 2023 at 11:47:53AM +0200, rockyhotas%firemail.cc@localhost wrote:
> On 2023-08-22 22:51, Greg Troxel wrote:
> > 
> > Yes, that is exactly what I am suggesting.
> > 
> > I identify every device on my network and organize them as if I am
> > assigning static IP addresses, but I do it with many of those statements
> > inside the network declaration in dhcpcd.conf.  The hosts have no idea
> > and just do dhcp, but they all end up on the address I want for each.
> 
> Ok, great!
> At the moment, I don't need this kind of "control" for all the (or many)
> devices, but probably just for some of them (some relevant ones).

You can add fixed-address entries for some of your devices as well
as a pool for transient ones even to the same network's configuration
in dhcpd.conf, e.g.

shared-network etherhub {
        subnet 10.11.12.0 netmask 255.255.255.0 {
            option domain-name-servers 10.11.12.13;
            group fixedones {
		option domain-name "example.org.";
                option routers 10.11.12.1;

		host foo {
			hardware ethernet 52:54:00:01:02:03;
			fixed-address 10.11.12.14;
		}               
		host bar {
			hardware ethernet 52:54:00:01:02:03;
			fixed-address 10.11.12.15;
		}               
	    }

	    pool {
                option domain-name "example.org.";
                option domain-name-servers 10.11.12.13;
                option routers 10.202.254.1;

                max-lease-time 3600;
                range 10.11.12.129 10.11.12.253;
                allow unknown-clients;
            }
        }
}

Regards,
	-is


Home | Main Index | Thread Index | Old Index