DHCP commands - griffinsnest/tech-Jorunal-1 GitHub Wiki

DHCP commands to Release and Renew DHCP Address


The commands to release and renew the DHCP address of a given machine are a rather simple process. First, since we're going to need to use affect some root level data like the IP address of the machine, we'll need to begin with sudo. Following this, we get to the actual command for releasing the DHCP address, which will be dhcpclient -r. This command with "r" optional added one tells the DHCP client to release the given address of the DHCP server that the machine currently has, hence the -r as it is what stands for release. You'll know if this succeded if the command prompt supplies the message "Killed old client process" as a confirmation after the command is run. To renew the connection of the client, simply run the sudo dhcpclient command minus the "-r" argument. This command by itself will instead of release the current address, reconnect the host to the DHCP client and thus make it receive a new given address to use for IP trafficing.