SOLUTION ONE
dhcpd.conf
option domain-name "mydomain.com";
subnet 10.6.6.0 netmask 255.255.255.0 {
option routers 10.6.6.1;
option domain-name-servers 10.6.6.1;
option time-servers 10.6.6.1;
use-host-decl-names on;
host calliope {
# thinkpad x220
hardware ethernet AA:BB:CC:DD:EE:FF; # wireless
hardware ethernet DE:AD:BE:EF:00:00; # ethernet
fixed-address calliope;
}
the daemon seems OK with that:
$ sudo dhcpd -n vr1
$ sudo dhcpd vr1
$
dhcpd will lease the address for calliope to the first request from either mac address. but then if the other mac address asks for a dhcp lease, dhcpd assigns a lease from the pool (if any), as the address for calliope is already leased to another mac. not quite what i want.
SOLUTION TWO
same dhcpd.conf as before, but now "calliope" will resolve to two IP addresses.
dns zone:
calliope IN A 10.6.6.6 ; thinkpad x220
IN A 10.6.6.7 ; thinkpad x220
ok, that works:
$ sudo rndc reload
server reload successful
$ nslookup calliope
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: calliope.mydomain.com
Address: 10.6.6.6
Name: calliope.mydomain.com
Address: 10.6.6.7
$
curious to see what dhcpd will do! killed it, checked config, and started it in foreground.
$ sudo dhcpd -n vr0
$ sudo dhcpd -d vr0
doesn't seem to work. :(
trying to read
https://github.com/openbsd/src/blob/master/us … ars.c#L892 but struggling to figure out if the code allows multiple hardward addresses and ip addresses for a host.