I'm working on Diskless Linux Clusters. I'm using Ubuntu Server 12.04( DHCP, TFTP and NFS servers installed and configured). When I boot slave machines via Live CD, all of them have same hostname but different IP addresses. I want to set hostname/ip address pair to slave machines via DHCP server without knowing slaves MAC addresses. For example:
IP Hostname
192.168.1.200 slave1
192.168.1.201 slave2
...
192.168.1.253 slave54
When a slave machine dynamically get 192.168.1.201 IP address from DHCP server, its hostname must be slave2. I used this solution on client side to get hostname from DHCP Server. But I don't know how to do this matching "192.168.1.201 slave2" on server side. My DHCP config file:
...
subnet 192.168.1.0 netmask 255.255.255.0 {
range dynamic-bootp 192.168.1.200 192.168.1.253; # Range of lease IP address
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
}
next-server 192.168.1.10; # PXE server address
filename “pxelinux.0”;
DHCP server dynamically assigns IP addresses to clients without knowing clients MAC address. I think that it can assign hostnames too. Is there a way to do that? Please give me any advice.