POSTS
dhcpd, name your machines
By Daniele Brugnara
As seen in my previous blog post, provisioning machines is quite simple, but the hostname must be unique, so we want an automatic way to configure it.
installation of a dhcpd
This is not what I want to share, you will find here the how-to.
dhcpd.conf
option domain-name-servers 8.8.8.8, 8.8.4.4;
option domain-name "brugnara.me";
default-lease-time 600;
max-lease-time 7200;
# Show that we want to be the only DHCP server in this network:
authoritative;
subnet 192.168.10.0 netmask 255.255.255.0 {
range 192.168.10.101 192.168.10.199;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.10.255;
option routers 192.168.10.1;
}
host proxy02 {
hardware ethernet 00:0D:87:B3:DB:01;
fixed-address 192.168.10.142;
option host-name "proxy02";
}
If your machines need to talk each other, you might want to connect your dhcp to your dns server to be able to resolve each hostname setted in the dhcpd.conf file, without replicating the configuration in bind, as an example. I’ll argue this in a further article.