Assigning Server IP addresses with DHCP
Using DHCP to assign server IP addresses is usually not a wise decision. To start with, you have to define static DHCP mappings, which rely on client-id attribute in the DHCP request (usually the MAC address of the client). For me, the easiest way to find the correct client ID is as follows:
- Use DHCP to assign the IP address to the server
- Note the newly assigned IP address
- Use the show ip dhcp bindings | include ip-address command to display the client-id to IP address binding.
- Create a static DHCP mapping (for example, by configuring a host DHCP pool on the router) and release/renew IP address on the server
Of course, if the Ethernet adapter in the server is replaced, the static mapping stops working. The only reliable workaround I've found so far is to assign a locally-administered MAC address to the server's LAN adapter (if anyone has figured out a way to assign ASCII client-ID to a Windows server, let me know). To do it on Windows XP, use the Advanced properties in the adapter configuration window.
Remember: locally administered MAC addresses on Ethernet networks start with 02xx. More precisely, second bit in first byte must be set, thus 02 in the previous sentence. AA00-0000-0001 is also a locally administered MAC address.
After you've configured MAC address on the server, prepend 01 to it and insert a dot after every fourth character to get the client-ID you need to enter on the DHCP server. For example, the MAC address 0200.1000.1234 becomes client-id 0102.0010.0012.34, and the static DHCP pool on a router is configured as follows:
ip dhcp pool Server_static
host 10.0.0.10 255.255.255.0
client-identifier 0102.0010.0012.34
The DHCP Options RFC says in section 9.12: It is expected that this field will typically contain a hardware type and hardware address, but this is not required. So, the more strictly conformant DHCP client implementations will prepend 01 to the MAC address, others might choose not to do so.
The hardware type is defined in Assigned Numbers RFC, well hidden in the ARP Parameters section.
Picture this: AP to switch. router on same VLAN. Notebook with wireless and wired cards. You want for the notebook to get the same IP address no matter if the connection is wired or wireless. Tough luck - just one "client-identifier" per pool.
The use of a locally administered MAC address could solve my problem - if I used the same MAC for both the wired _and_ the wireless interface. Have to try and see what Vista thinks of it ;)
where adaptername is the name of the adapter in your network interfaces and asciistring is the string you want.
no idea if it works with cisco dhcp yet. have not tried it.
One of the limitations/issues I've run with the IOS DHCP server and setting up a reservation is that it only accepts on "client-identifier" per pool.
Now I have a hp2300n and i want to make a reservation in dhcp. Nothing is working hardware-address, client-identifier, no prepend, 01 prepend, 00 prepend
Who can help me?