1

Good time of day, SF people. I have created a manual DHCP binding entry on a Cisco router so that a client would always get leased to it. The clients wants to get the same address on both of his dual-boot linux systems. He tries to get an IP address leased and he succeeds on one of the dual-boot operating systems. When he reboots to another one he gets a lease for a completely different one.

I don't get it. The MAC addresses are the same (we checked in ifconfig, so what could be happening here? Why is the router confused? Or is it something else?

Also, how can I check DHCP server IP address who I have got an IP address from (on Linux)?

Configuration on Cisco:

ip dhcp pool MANUAL_BINDING0001
   host 192.168.0.64 255.255.255.0
   hardware-address dead.beef.1337
   dns-server 192.168.8.11
   default-router 192.168.0.254
   domain-name verynicedomainigothere.cn

PS. Is it mandatory to use client-name configuration line?

user9517
  • 114,104
  • 20
  • 206
  • 289
Alex
  • 516
  • 1
  • 7
  • 18

1 Answers1

1

The client stores information about the leases it has had in a dhclient.leases file.

This file can be located in /var/lib/dhclient (for RHEL/CentOS etc), /var/liv/dhcp for Ubuntu, other ditros may use different locations.

The lease file itself may not be called dhclient.leases it is often called dhclient.<if>.leases e.g. dhclient.etho.leases.

If present, the option dhcp-server-identifier will tell you where the client obtained it's IP addreess from.


The client may be obtaining it's IP address from a different DHCP server than the one you are looking at - see above.

The client may already have a valid IP address from your DHCP server so it goes through lease reallocation rather then lease allocation and is provided the IP address it already has.

You may have to debug this on the wire using something like tcpdump wireshark or similar.

Further reading

user9517
  • 114,104
  • 20
  • 206
  • 289
  • Thank you! Yeah, I think the same thing, it's because the client tries to get the use the same address. :) Now that I think of different DHCP server assigning address, I don't think it's possible because we only assigned this server as trusted on our switches, so the client should not get any other DHCP Offers – Alex Jun 06 '14 at 08:23