1

i need to serve DHCP requests for a given test tool tailored for a specific network hardware (hardware under test).

The testing tool (my server + simple netgear 5ports switch) seems to work as long as you pass one device at a time. When you start using 2 devices at the same time, both fail soon after the second device is plugged on the system.

Symptoms makes me think of two devices using the same IP address. Afterlooking in the wireshark trace, it seems to be exactly the case.

Those devices under test always show the same mac address : 4e:42:46:76:30:32 (NBFv02 in ascii). As a result, i think isc-dhcp-server observes that this mac adress has already been assigned a lease and serves it back to the other device.

How can i configure isc-dhcp-server so that it simply offers a new lease regardless of client mac adress?

(oberved on Ubuntu 12.04)

thanks

[edit] i have made my own custom DHCP daemon. oh it does work. it offers leases regardless of client mac address. However, i seem to have other problems later on with ARP resolution. i am stuck

Alex
  • 11
  • 1
  • 3
  • I was wondering how a switch would deal with the same MAC on multiple ports. Does the switch have STP enabled? – NickW Apr 03 '13 at 11:32
  • I think you need to fix the clients so they don't have the same MAC address as, as you have discovered other things break (correctly) when you 'fix' the IP layer. – user9517 Apr 03 '13 at 11:33

1 Answers1

1

While what you're seeing is correct behavior, your best option will probably be either to change the client identifier in the device, or its MAC address. If the server receives a DHCPDISCOVER with the same MAC and client identifier, what other method will it have to differentiate between the machines?

On the server side you can check and see what the duplicates key is set to in dhcpd.conf, you should deny duplicates, and set up multiple DHCP servers(possibly with authoritative set to off). Then assign different pools to each server, that way the first machine will make a request to a DHCP server, and should obtain an IP, then when the next machine makes a request, the first server will ignore the request, but the second server should reply, and assign a different IP (it might be necessary to have min sec set to a non 0 number on the second server).

The duplicates keyword

allow duplicates; deny duplicates;

Host declarations can match client messages based on the DHCP Client Identifier option or based on the client's network hardware type and MAC address. If the MAC address is used, the host declaration will match any client with that MAC address - even clients with different client identifiers. This doesn't normally happen, but is possible when one computer has more than one operating system installed on it - for example, Microsoft Windows and NetBSD or Linux.

The duplicates flag tells the DHCP server that if a request is received from a client that matches the MAC address of a host declaration, any other leases matching that MAC address should be discarded by the server, even if the UID is not the same. This is a violation of the DHCP protocol, but can prevent clients whose client identifiers change regularly from holding many leases at the same time. By default, duplicates are allowed.

P.S. this is just my understanding by reading, I've never had to deal with a situation like this personally.

NickW
  • 10,183
  • 1
  • 18
  • 26