Tuesday, April 1, 2008

Force dhcp to renew ip address with dhclient

To get ip address of your choice from the dhcp server of the local network or to force dhcp server to assign you with a new address :

Trick (1)
  • dhclient -r eth0 ; dhclient eth0
Trick (2)
  • vim /var/lib/dhcp3/dhclient.leases
  • change this line :: fixed-address; with another ip address on the same network.
  • dhclient eth0

... now you should get the new ip address you just specified in dhclient.leases file ;-)

nmap -sP -n -T5 ... to check for the used-up addresses.