Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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   slave1   slave2
...   slave54

When a slave machine dynamically get 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 " slave2" on server side. My DHCP config file:


subnet netmask  {
    range dynamic-bootp; # Range of lease IP  address
    option broadcast-address;
    option routers;

next-server; # 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.

share|improve this question
up vote 1 down vote accepted

My professor answered my question. There is no specific tool or method to assign hostname and ip address pair without knowing MAC address in Linux Server. Because Linux server uses pure DHCP standards. So I have to assign a hostname/fixed ip address with MAC address for each slave in /etc/dhcp/dhcpd.conf file. For example:

host slave1 {
  hardware ethernet 00:00:00:00:00:01;
  option host-name "slave1";

host slave2 {
   hardware ethernet 00:00:00:00:00:02;
   option host-name "slave2";

He said: "you can do that with using hostname table in Windows NT Server". But i'm not sure how to do that.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.