Tag: dhclient

Renewing your IP address on Linux with dhclient

Let’s say you need to change you ip address because there was a change on the network and now ip settings changed,
you can at anytime request with the command : ‘dhclient‘ a new address to a dhcp server ,

if you only have a single network adapter, the command is very simple
just launch the command

dhclient -r

to release the address currently associated to you
then just launch

dhclient

and you computer will broadcast a dhcp request
if you have multiple adapter ,
you can do

dhclient -r wlan0
dhclient wlan0

to spécify that you want a new ip address for you wlan0 adapter
by default the command dhclient is silent , meaning that you will not get any information about what the dhcp server answered.
to add verbosity to the command , just add a -v parameter

dhclient -r -v wlan0
dhclient -v wlan0