I am in a situation where I need myDevice (ubuntu), when connected to router, to have any IP address in the range of 192.168.1.20 to 192.168.1.40. I am aware that adding the line
send dhcp-requested-address 192.168.1.20;
to the file /etc/dhcp/dhclient.conf
would assign my device with the same address. It fails to do so if another device connected in the same network holds the same address. In such scenario I want the dhclient to request for the next IP address in the specified range i.e 192.168.1.21 . How do I achieve it?