Sticky DHCP addresses

Hi all,

   Anyone tried before configuring dhcp pool on cisco routers and assign 2 different client routers the same IP address everytime they ask for an IP address??

If so, can anyone post the recommended config for it, I think we will be using something called the "client-id" but have no idea about exactly how can we do it.

thanks a lot

 

Comments



  • Hi - try this:

    1. image

    enable



    2. image

    configure terminal



    3. image

    ip dhcp pool pool-name



    4. image

    host address [mask | /prefix-length]



    5. image

    client-identifier unique-identifier



    6. image

    hardware-address hardware-address type



    7. image

    client-name name

     

    http://www.cisco.com/en/US/docs/ios/ipaddr/configuration/guide/iad_dhcp_svr_cfg_ps6441_TSD_Products_Configuration_Guide_Chapter.html#wp1155880

  • I tested the config and it works and wanted to share it here with everyone:

    R0(Client)

    ------------

    Router#sh run
    Building configuration...

    Current configuration : 533 bytes
    !
    version 12.4
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname Router
    !
    boot-start-marker
    boot-end-marker
    !
    !
    no aaa new-model
    !
    resource policy
    !
    memory-size iomem 5
    !
    !
    ip cef
    !
    !
    interface FastEthernet0/0
     ip address dhcp client-id FastEthernet0/0 hostname R0
     duplex auto
     speed auto
    !
    ip http server
    no ip http secure-server
    !
    control-plane
    !
    line con 0
    line aux 0
    line vty 0 4
    !
    !
    end

     

    R1(Server)

    ------------

    Router(config)#do sh run
    Building configuration...

    Current configuration : 648 bytes
    !
    version 12.4
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    !
    hostname Router
    !
    boot-start-marker
    boot-end-marker
    !
    !
    no aaa new-model
    !
    resource policy
    !
    memory-size iomem 5
    !
    !
    ip cef
    no ip dhcp use vrf connected
    !
    ip dhcp pool test
       host 1.1.1.2 255.255.255.0
       client-identifier 01cc.0006.6800.00
       client-name R0
    !
    interface FastEthernet0/0
     ip address 1.1.1.5 255.255.255.0
     duplex auto
     speed auto
    !
    ip http server
    no ip http secure-server
    !
    !
    control-plane
    !
    line con 0
    line aux 0
    line vty 0 4
    !
    !
    end

Sign In or Register to comment.