Good fun with dhcp-eval(5)

July 11, 2010 at 9:48 pm (Uncategorized)

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 netmask {
# ...
option host-name = concat ("client", suffix (binary-to-ascii (10, 8, "", leased-address), 2));

And then your head asplode. Have fun.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: