I am looking for a tool that requests and accepts a DHCP lease but does not actually configure an interface on the host. udhcpc
from busybox comes close when using the "client ID" option but it does actually configure the real interface and if possible, I'd rather not have that so as not to muck up connectivity.
sudo udhcpc -v -i wlp3s0 -x 0x3d:0100BEEFC0FFEB
One of the things I'm trying to do is to exhaust the IP address pool on a primary DHCP server and make sure the secondary DHCP server takes over. Furthermore, I want to make sure that the mapping of MAC address to IP numbers is observed.
Bonus points if the test tool supports an option to send the probe to a specific DHCP server (dhclient
apparently has the -s switch for that, but I can't seem to get it to accept a "client ID" on the command line even though there is the -i switch which I believe is for that purpose).
I'm not sure if you can use this for doing the kind of load testing you want, but I found this tool useful for basic DHCP debugging: https://github.com/CyberShadow/dhcptest
It allows you to send out discovery packets with all sorts of DHCP options, including spoofing your MAC to try IP reservations, etc.