About the Author

author photo

Joe Harris, CCIE No. 6200 (R&S, Security & SP) is a Systems Engineer with Cisco Systems® specializing in Security. In addition to authoring Cisco Network Security Little Black Book, Joe has also been a technical reviewer for several Cisco Press publications and written articles, white papers, and presentations on various security technologies. He also assists various Certification Partners by beta testing their newest CCIE certification workbooks and has been recognized by Cisco as an SE Wall of Fame award winner.

See All Posts by This Author

Static DHCP Address

I received this question from a popular Cisco mailing list I visit frequently where a gentlemen was having an issue with the DHCP server function and allocation of static IP Addresses. Below is his question and my response:

I am trying to allocate a static IP address to my Printer, but it is not working as expected. Its getting allocated an IP address out of the pool and not the statically configured address. Am I miss something here? Below are my config’s:

ip dhcp excluded-address 10.121.251.33
ip dhcp excluded-address 10.121.251.34
!
ip dhcp pool Networks
network 10.121.251.32 255.255.255.240
domain-name XYZ
default-router 10.121.251.33
netbios-name-server 10.120.100.250
dns-server 10.120.100.250
!
ip dhcp pool Printer
host 10.121.251.35 255.255.255.240
client-identifier 0014.22b7.9aad
client-name IT-Printer
domain-name XYZ
default-router 10.121.251.33
netbios-name-server 10.120.100.250
dns-server 10.120.100.250
netbios-node-type h-node

Most likely your client id is incorrect…run a debug ip dhcp server packet and it will tell you what the client id is it’s receiving….you will most likely need to shift you decimals and prepend a 01 to the client-id command like so:

ip dhcp pool DHCP
host 192.168.16.1 255.255.255.0
client-identifier 0100.11bb.78fc.80
client-name Rack1R4(1)

The actual MAC address is: 0011.bb78.fc80 … 01 is actually pre-pended because the client identifier is formed by concatenating the media type and the MAC address and in this case 01 represents the Ethernet media type. See the client-id part of the provided debug below:

DHCPD: DHCPDISCOVER received from client 0100.11bb.78fc.80 on interface Virtual-Access1.1.
DHCPD: Sending DHCPOFFER to client 0100.11bb.78fc.80 (192.168.16.1).
DHCPD: broadcasting BOOTREPLY to client 0011.bb78.fc80.
DHCPD: DHCPREQUEST received from client 0100.11bb.78fc.80.
DHCPD: Sending DHCPACK to client 0100.11bb.78fc.80 (192.168.16.1).
DHCPD: broadcasting BOOTREPLY to client 0011.bb78.fc80.

There Are 2 Responses So Far. »

  1. Gravatar

    I do this all the time on my home network. What you want to do is get the device on the network and let it get any address. Then do a show ip dhcp binding.

    If an address has the prepended 01, then use client-identifier with the 01 prepended to the MAC. If it does not have the 01 prepended, then use ‘harware-address mac’ without the 01 prepended.

    This method has worked many times without issue for me. Good luck.

  2. Gravatar

    What annoys me to no end about static DHCP allications is that the Cisco DHCP server seems to ignore the ‘hardware-address’ setting as soon as the DHCP query contains a client-id.

    For example, this:

    ip dhcp pool TEST
    host 10.11.12.13 255.255.255.0
    hardware-address 000f:1234:1234

    does not work when the device sends a DHCP query containing a client-id. You have to match on the client id in the pool to get the IP allocated to the device.

    To add insult to injury the client-id setting is dependent on the operating system (for example, my laptop sends a DHCP query containing a client-id when running under Windows, but does not do so when running under Linux).

Post a Response