i connect to the web via LAN and IPs are assigned via the DHCP server. so a simple

sudo dhclient -r
sudo dhclient 

does not work. is there another way to get a new IP address from the DHCP server?

  • Some distros tend to have a NetworkManager that can get in the way of dhclient -r.Have you tried stopping that service before issuing sudo dhclient -r? – Bart De Vos Sep 9 '11 at 12:09
  • Are you trying to get a different address than the one you currently have? – uSlackr Sep 9 '11 at 12:47
  • @uSlackr yes, thats what i meant by new IP address – sterz Sep 11 '11 at 18:43

You should be able to be ifconfig /release and ifconfig /renew (the syntax might be a bit different I'm coming from Windows here) to drop the current IP and request a new IP from the DHCP server. However if your reservation is still valid the DHCP server will give you the same IP address.

  • do you think it is possible to invalidate the lease/reservation? – sterz Sep 9 '11 at 11:19
  • 2
    That would need to be done on the DHCP server it self, not of the machine requesting the IP address. – mrdenny Sep 9 '11 at 11:49
  • since i cannot touch the DHCP server it would involve changing of my MAC address i guess. maybe then the server would be forced to assign a different IP address to me. – sterz Sep 11 '11 at 18:46
  • Changing the MAC address should cause a new IP to be issued. – mrdenny Sep 12 '11 at 1:00

What do you mean it does not work? Don't you get an IP address?

If you get one but this is the "old" one then this is totally OK. The server may be configured to hand out the same address according to the MAC (or other variables). It may even hand out the same address as it is the only free one in the DHCP range. Or it is lazy and sees no reason to hand out another one. An IP is an IP; they are all equal and it makes no difference which one you got.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.