How to allocate DHCP fixed ip address based on client mac address ?

Topology : DHCP server   -------- Client-X with mac address aaaa.bbbb.cccc  on Vlan-XX (ethernet)

 

DHCP server:


  ip dhcp pool VLAN-XX

      network <> <255.255.255.0>

      default-router <>

       dns-server <>  

      domain-name <>

 ip dhcp pool Client-X

      host <FIX IP Address>/24

       client-identifier 01aa.aabb.bbcc.cc                      

       client-name Client



Client-x (simulated by router):

    int>  ip address dhcp client-identifier <interface facing dhcp server>



But i cannot get Fixed IP address assigned. It always start with .1, .2...etc 


What i'm missing here ?


Comments

  • DHCP server:

     

      ip dhcp pool VLAN-XX

          network <> <255.255.255.0>

          default-router <>

           dns-server <>  

          domain-name <>

     ip dhcp pool Client-X

          host <FIX IP Address>/24

           client-identifier 01aa.aabb.bbcc.cc                      

           client-name Client



    Client-x (simulated by router):

        int>  ip address dhcp client-identifier <interface facing dhcp server>



    But i cannot get Fixed IP address assigned. It always start with .1, .2...etc 


    What i'm missing here ?

    Configuration seeems fine, just to verify look client-identifier at the "debug ip dhcp server packets" on dhcp server and match it with the client-identifier in "show ip dhcp binding" on dhcp server. These both should match. 

     

  • Hi AndiS,

    Your config is fine, paste the client-identifier, just turn debug ip dhcp server packet on DHCP server, look for client-identifier and paste it:

    R1#debug ip dhcp server packet
    DHCP server packet debugging is on.
    R1#
    *Mar  1 00:04:20.175: DHCPD: DHCPDISCOVER received from client 0063.6973.636f.2d                                                                                        63.6330.312e.3139.3934.2e30.3030.302d.4661.302f.30 on interface FastEthernet0/0.
    *Mar  1 00:04:20.179: DHCPD: Allocate an address without class information (192.                                                                                        168.0.0)
    R1#
    *Mar  1 00:04:22.179: DHCPD: Sending DHCPOFFER to client 0063.6973.636f.2d63.633                                                                                        0.312e.3139.3934.2e30.3030.302d.4661.302f.30 (192.168.0.2).
    !

    ip dhcp pool R2
       host 192.168.0.100 255.255.255.0
       client-identifier 0063.6973.636f.2d63.6330.312e.3139.3934.2e30.3030.302d.4661.302f.30
       client-name R2
    !

    R2(config-if)#do show ip int brief | ex un
    Interface                  IP-Address      OK? Method Status                Protocol
    FastEthernet0/0            192.168.0.100   YES DHCP   up                    up 

  • Try deleting the client identifier things and have a look if the server is working generally. Not that you encounter a problem concerning different subnet masks etc.

    Then if this works paste your config and debug.

    Real gear or simulated? Maybe a reboot can take a good action here.

     

    HTH!

    Regards!

    Markus

  • It's working now. My bad, i put wrong interface  so send wrong mac address. :P

        int>  ip address dhcp client-identifier <interface facing dhcp server>

    This's remainder to always double check on exam. 

     

  • Nice it works! Had a similar issue some weeks ago, hat some numbers twisted in the ip addresses :).

    Regards!

  • It's working now. My bad, i put wrong interface  so send wrong mac address. :P

        int>  ip address dhcp client-identifier <interface facing dhcp server>

    ohh this seems to be a trouble ticket in the TS lab exam.

     

  • When we should use "hardware-address <mac-address>" , instead of "client-identifier <>"   ?

    Is the hardware-address used for non-cisco device such as printer,fax machine, etc ?

     

  • When we should use "hardware-address <mac-address>" , instead of "client-identifier <>"   ?

    Is the hardware-address used for non-cisco device such as printer,fax machine, etc ?

    By default Cisco router if configured as DHCP server will serve both BOOTP and DHCP requests. Client-identifier is used for DHCP request and hardware-address is used for BOOTP request. You can also disable to reply for BOOTP request via "ip dhcp bootp ignore" in this case "hardware-address" has no use.

    Cisco routers by default is configured to send DHCP request so they have client identifier field, but if some devices send BOOTP request then DHCP should be configured with hardware-address. Windows send DHCP request by default, Linux machine sends BOOTP request by default (we can change this behavior as well). So its depends on which device is sending which request and accordingly DHCP serves them. 

     

  • Can  BOOTP work together with DHCP Snooping ? 

    https://supportforums.cisco.com/thread/143506

    Is the BOOTP client information stored in DCHP binding on the server side ? or we need to put static "ip dhcp snooping binding XXXXXX".

Sign In or Register to comment.