Good fun with dhcp-eval(5)
One’s gotta love Unix and Unix-like operating system. You can always make them do exactly what you want, given enough savvy. Some of the stuff you may need to figure out can be so obscure and cryptic, nobody short of a level 20 sysadmin has any chance at it. But, hey, mere mortal like us can always turn back to Google for these things. In the interest of seeding the knowledge cesspool of Google with such an elusive factoid, here’s my experience with dhcp-eval(5).
Let’s say you want to populate the DHCP host-name option, served your ISC DHCP daemon, to something meaningful. For example, “client”, followed by the last two digits of the IP address you are leasing. Here’s what you would declare in dhcpd.conf:
subnet 10.0.0.0 netmask 255.255.255.0 {
# ...
option host-name = concat ("client", suffix (binary-to-ascii (10, 8, "", leased-address), 2));
}
And then your head asplode. Have fun.