Static DHCP assignment for clients without client-id
A while ago I've installed Fedora Linux on one of my workstations and spent enormous amount of time trying to give it a static IP address from the Cisco IOS DHCP server. I though I was the only one dumb enough to have this problem, so I didn’t document my solution, but then one of the readers made a comment to the Assigning server IP addresses with DHCP post describing almost identical symptoms:
I have a hp2300n and I want to make a static IP assignment with DHCP. Nothing is working: hardware-address, client-identifier, no prepend, 01 prepend, 00 prepend.
In my case, the Fedora DHCP client did not send any DHCP client-ID in the DHCPREQUEST message. One would think that the IOS DHCP server would use the MAC address as the client-ID, but that's not the case. You have to configure the hardware-address parameter in the host DHCP pool to match the MAC address of the DHCP client with the pool and the static IP address:
ip dhcp pool fedi
host 192.168.200.206 255.255.255.240
hardware-address 000f.fe83.bca9
dns-server 208.67.220.220 208.67.222.222
This article is part of You've asked for it series.
I added the following line to the conf file;
send dhcp-client-identifier 01:xx:xx:xx:xx:xx:xx (Replace xx with the mac address you want to use)
show ip dhcp server bindings
to know how the client was recognized.
@anonymous: that's exactly what I'm doing, but if you see just the MAC address without the 01. prefix in the bindings, you don't know whether it's a host with broken Client-ID calculation (that happens as well) in which case you copy the value in client-id parameter, or a host not using the Client-ID at all forcing you to use hardware-address parameter.
I placed PXE files on router's flash to have ability to boot-up (and repair using linux tools) any PC which normally has its statically assigned IP address. My requirement is: any particular PC should have the same address inside Windows and when using embedded PXE boot agent. This is still the same PC! Unfortunately Win uses client-id, PXE uses hw mac... and unfortunately man cannot set both: client-id and mac address inside single lease :(
What can I do if I wont have separate static IP sets: for normal operation and for PXE?
I had one linux client, and I couldn't figure out why the DHCP reservation wasn't working like Windows.
Also, if you've got half a dozen static entries, can they be all in one pool? It looks to me like only one entry can be made per pool, which means a heck of a lot of extra pools if you've got a few devices you want static.
Why don't Linux clients supply client identifiers?