DHCP Reservation Will Not Work

My DHCP config just will not work for my Linux machine to get a reserved IP. I've put the following commands on my router.

service dhcp 
ip dhcp relay information trust-all
ip dhcp pool server_ip
host 10.10.10.10 255.255.255.0
client-identifier ee94.f602.5eee
default-router 10.10.10.1
dns-server 8.8.8.8
end
debug ip dhcp detail

 

It doesn't work however If do not try and reserve the IP address it work. So say I put the config below into the router instead, then it works (but obviously I don't get the reserved IP I wanted). So what is the problem? I do not even see a single dhcp message come inbound using the reserved ip method.

service dhcp
ip dhcp relay information trust-all
ip dhcp pool server_ip
network 10.10.10.0 255.255.255.0
default-router 10.10.10.1
dns-server 8.8.8.8
end
debug ip dhcp detail

So can someone tell me how to figure out what the problem is? I am 100% sure my mac address of the interface is correct. So I am stuck.

 

The debug shows the below. Howevre I don't understand why it is talking about a vpn, this is coming from a pc on the same layer 2 network at the router.

*Jun 18 17:41:00.551: DHCPD: client's VPN is .
*Jun 18 17:41:00.551: DHCPD: No option 125
*Jun 18 17:41:00.551: DHCPD: DHCPDISCOVER received from client ee94.f602.5eee on interface Vlan10

Comments

  • Wow I found a solution to this problem, although I don't understand what's actually different.  This is what I did:

    no client-identifier ee94.f602.5eee
    hardware-address ee94.f602.5eee


    Problem solved. I actually don't know what the difference is in these two commands and why it didn't work in the first place. Can someone tell me why the client-id didn't work?

  • It looks like you are missing the hardware-address command when specifiying your host in the first config.

     

    service dhcp 
    ip dhcp relay information trust-all
    ip dhcp pool server_ip
    host 10.10.10.10 255.255.255.0
    hardware-address xxxx.xxxx.xxxx
    client-identifier ee94.f602.5eee
    default-router 10.10.10.1
    dns-server 8.8.8.8
    end
  • Client-id and MAC are different things. If you do a show ip dhcp bindings  on the DHCP router you'll see that the PC probably has a different client-id vs the actual MAC (hardware-address).

  • I just checked the binding and it shows only the same MAC. Just wondering what a client-id is?

  • DHCP
    clients require client identifiers. The unique identification of the
    client is specified in dotted hexadecimal notation, for example,
    01b7.0813.8811.66, where 01 represents the Ethernet media type.

    It looks like a Cisco router/switch operating as DHCP server might be throwing a 01 in front of the PC MAC to make a client identifier. I've seen a couple of other similar situations where working configuration of client-id only works if you enter the MAC in with no periods. But the client-id is supposed to be sent by the client(PC) in the DHCP request.

     

    Glad you got it working.

  • Oh okay. Well I think I will just use the hardware-address from now on as it's a lot more clear to look at when looking through the configuration. Thanks for your help.

  • JoeMJoeM ✭✭✭

    I just checked the binding and it shows only the same MAC. Just wondering what a client-id is?

     Don't leave us to only trust that it matches.  Let another set of eyes look at it. Please show us the output.

    EDIT:  often I will also look for any dhcp/mac configs on the client:  

                       show run interface X/Y <--

    In your first post, it does not look like your debug output is complete. I do not think that mac in your debug is the client-identifier.

    One of the easiest debug commands to use for this is 

                  debug ip dhcp server packet

    This command makes it easy to copy and paste the correct client-identifier.

     

    Try this for your client-identifier.   01ee.94f6.025e.ee

    Note the difference in the client-identifier and the hardware-mac.

    01ee.94f6.025e.ee
      ee94.f602.5eee

     

  • JoeMJoeM ✭✭✭

    http://www.cisco.com/c/en/us/td/docs/ios/12_2/ip/configuration/guide/fipr_c/1cfdhcp.html#wp1001108

    Step 3 

    Router(dhcp-config)# client-identifier unique-identifier




    Specifies the unique identifier for DHCP clients. This command is used for DHCP requests.

    imageDHCP clients require client identifiers. The unique identification of the client is specified in dotted hexadecimal notation, for example, 01b7.0813.8811.66, where 01 represents the Ethernet media type.

    imageSee "Troubleshooting Tips" below for information on how to determine the client identifier of the DHCP client.

     

     

     

     

     

Sign In or Register to comment.