If you have some additional devices which are to have a DHCP-provided IP address based on their MAC, but which are not regular compute nodes, then those devices should be defined as “generic devices”. Defining devices as generic devices will also make the devices’ hostnames added to name server’s entries, and thus the hostnames will be resolvable into IPs.
Here’s how to add a new generic device using cmsh:
[root@headnode ~]# cmsh
[headnode->device]% add genericdevice mydevice
[headnode->device*[mydevice*]]% set mac 00:00:00:11:22:33
[headnode->device*[mydevice*]]% set ip 10.141.111.111
[headnode->device*[mydevice*]]% set network internalnet
Commit device 'mydevice' ... ok.
For the new generic devices to be served IP address by DHCP the following conditions have to be fulfilled:
- the generic devices have to have a network interface on a network which allows for node booting (e.g. the default internalnet).
- the headnode has to have a network interface on the network containing the generic devices.
- the network on which the generic devices are present has to be connected to the headnode via a physical interface (i.e. not via an alias interface). The reason behind this is that otherwise the dhcpd will not know which subnet to use if a DHCP request comes in from an unknown MAC address.