I have a Kubuntu box (12.04) which usually gets its IP via DHCP. However, it also has a hosts file with some entries in case the DHCP+DNS server fails. Now, if there is no DHCP available, I want the machine to look itself up (by hostname) in the hosts file, and choose its IP based on that.
Now, if I wanted to use a fixed address, without a lookup into /etc/hosts, I could add a fallback lease with a pre-specified IP address to
/etc/dhclient.conf; but that's not quite what I need.
I'm sure this can be done with complex dhclient hooks; but I'm also sure someone has thought about this and implemented it already...