1

After editing some configurations on the dhclient configuration file (/etc/dhcp/dhclient.conf) the changes doesn't seem to have any effect until I reboot the machine. Since dhclient is running on the background, I believe the process needs to restart to actually read the configuration file again and apply said changes.

What would be the best way to accomplish it?

On the dhclient man page I found the following option:

-r            Release the current lease and stop the running  DHCP  client  as
              previously  recorded  in  the  PID file.  When shutdown via this
              method dhclient-script will be executed with the specific reason
              for calling the script set.  The client normally doesn't release
              the current lease as this is not required by the  DHCP  protocol
              but  some  cable ISPs require their clients to notify the server
              if they wish to release an assigned IP address.

If I understood it right, this option would kill the dhclient and thus make it release the lease and read the configuration file again when it started (which I'm not sure if would be as simply as calling dhclient &).

Checking the processes tree, I also noticed dhclient is a child process of network-manager. Would run sudo service network-manager restart be a cleaner way to make dhclient start again with the new configurations?

1 Answer 1

1

Re-activate the connection.

For example via nmcli connection up $NAME or any other client of NetworkManager.

You usually wouldn't restart NetworkManager.

1
  • The method of restarting the whole network-manager service worked. But I'll try this method of restarting a single connection and check if it works! I've seem an answer that restarted dhclient itself to modify some configuration, but I don't know if it would work on this case since dhclient is a child of network-manager. Sep 27, 2016 at 1:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .