DHCP Reservation

I can't understand why a reservation isn't working for my DHCP server on my router.

 

ip dhcp pool Main_Network
network 192.168.1.0 255.255.255.0
dns-server 8.8.8.8
default-router 192.168.1.254
lease 7
ip dhcp pool Phone_IP_Reservation2
host 192.168.1.6 255.255.255.0
hardware-address 0124.50fb.84ae.aa
default-router 192.168.1.254
dns-server 8.8.8.8

Then I #debug ip dhcp server packet and get this output when I try to get an IP on my phone

Oct 17 13:37:51.003: DHCPD: client's VPN is .
Oct 17 13:37:51.003: DHCPD: No option 125
Oct 17 13:37:51.003: DHCPD: DHCPREQUEST received from client 0124.50fb.84ae.aa.
Oct 17 13:37:51.003: DHCPD: Finding a relay for client 0124.50fb.84ae.aa on interface Vlan1.
Oct 17 13:37:54.203: DHCPD: client's VPN is .
Oct 17 13:37:54.203: DHCPD: No option 125

Oct 17 13:37:55.951: DHCPD: DHCPDISCOVER received from client 0124.50fb.84ae.aa on interface Vlan1.
Oct 17 13:37:55.951: DHCPD: Allocate an address without class information (192.168.1.0)
Oct 17 13:37:55.951: DHCPD: Saving workspace (ID=0xE4020011)
Oct 17 13:37:57.951: DHCPD: Reprocessing saved workspace (ID=0xE4400011)
Oct 17 13:37:57.951: DHCPD: DHCPDISCOVER received from client 0124.50fb.84ae.aa on interface Vlan1.
Oct 17 13:37:57.951: DHCPD: Sending DHCPOFFER to client 0124.50fb.84ae.aa (192.168.1.19).
Oct 17 13:37:57.951: DHCPD: no option 125
Oct 17 13:37:57.951: DHCPD: creating ARP entry (192.168.1.19, 24.50fb.84ae.aa8, vrf default).
Oct 17 13:37:57.951: DHCPD: unicasting BOOTREPLY to client 24.50fb.84ae.aa (192.168.1.19).
Oct 17 13:37:57.967: DHCPD: New packet workspace 0x88282394 (ID=0x7800032)

As you can see the phone gets 192.168.1.19, the next available IP instead of 192.168.1.6

Comments

  • I renamed them (i actually had to re-do the whole dhcp config because it puts the dhcp pools in the order you typed them rather than sequential naming), and this did not fix the problem.

  • ip dhcp pool Phone_IP_Reservation2

      no hardware-address 0124.50fb.84ae.aa

      client-identifier 0124.50fb.84ae.aa

     

    this workd

  • late entry

     

     
  • Hi,

    BOOTP allocated IP addresses based on client's hardware (MAC) address, thus if you create a DHCP pool for bootp clients and you want to make a reservation, you NEED to use the "hardware-address" command.

    DHCP, for scalability, introduced the concept of "client-identifier", which is used by the client in its DHCP messages, to identify itself (what the client-identifier contains it's up to the implementation, but most implementations have a mix of MAC and other things, like interface number, DNS name, etc). If the DHCP clients sets a value to the "client-identifier" field, the DHCP server will lease an address based on that value, if DHCO clients leave the filed empty, the DHCP server will lease an address based on the hardware-address from the "chaddr" field of the DHCP message, not from the layer2 header.

    Regards,

    Cristian.

     

     

  • Hi All,

    My question:

    "If the DHCP clients sets a value to the "client-identifier" field, the DHCP server will lease an address based on that value, if DHCO clients leave the filed empty, the DHCP server will lease an address based on the hardware-address from the "chaddr" field of the DHCP message, not from the layer2 header."

    This is with Cisco IOS dhcp server?

    So, it is not correct to say that MAC is for bootp packets; because it could be dhcp discoveries without client id.  //RandyB

  • Hi,

    This is per the RFC, which should apply to all DHCP implementations, but of course each vendor can decide NOT to follow up on the RFC, and there are many examples of it.

    It is correct to state that BOOTP server will lease addresses based on the "chaddr" field in the BOOTP request, which is the BOOTP client's MAC address for Ethernet; BOOTP cannot understand "client-identifier". It is correct to state that if vendors follow up on RFC, DHCP should lease addresses based on "client-identifier" if not-empty/zero, otherwise based on "chaddr".

    Regards,

    Cristian.

Sign In or Register to comment.