0

Situation: unconfigured network interface eth1. As root, I give command dhclient eth1, and get an IP. Now I want to change this IP from client side, force DHCP client to get a new address.

Answers of this question only have command to release and re-aquire the lease, but I get the same IP every time, so it does not answer the question.

I am looking for a generic Linux solution, not dependent on this exact environment, but just for reference, this is my current environment:

  • OS: Ubuntu 14.04 running as a VirtualBox quest
  • DHCP server: VirtualBox host-only network

Also I am aware of following solutions which would work with above: use the VM to set a new MAC address, so it would probably get a new IP too, or simply manually configure another IP for the host-only network. But I am specifically asking how to force a new DHCP IP from client side without rebooting, if such a thing is possible with DHCP at all.

Alternatively, if someone can confirm that DHCP does not support client wanting an IP address change, preferably with a reference, that would be valid answer, too.

hyde
  • 209

1 Answers1

3

The DHCP server decides which address it gives to which client. The client can only release and renew it's address, and not ask the DHCP server for a different address.

Most DHCP servers hand out the same ipaddress to a client it has seen before when the ipaddress is not in use at the moment.

It is possible to ask the server for a specific ipaddress, after the current address is released (How to request a specific IP address from DHCP server?) although the decision to give you this or a different address remains with the server.