To ensure the reliability of our services, DHCP leases at Clouding last for one week. This means that devices connected to the network maintain their assigned IP address for this period. However, any change in the gateway address or DNS server will not be reflected immediately. These updates will be applied when the server automatically renews the DHCP lease, which occurs approximately every half week.
If you need the IP address to be updated more quickly, you can force a manual renewal. To do this, we have prepared a detailed tutorial that will guide you step by step through the process.
Editing a Private Network (VPC)
When we edit a Private Network (VPC) to change the gateway or preferred DNS servers, we will see the following notice:
To force the renewal of the IP or DNS servers, a quick and easy way is to restart the server. When doing so, during the boot process, DHCP will assign a new IP address or update the DNS configuration.
We understand that if the affected server is currently in production, restarting the server is not an option. In that case, you can follow these other steps to update the configuration:
Forcing DHCP to change the IP (WIP)
To change the IP, we need to use the dhclient command. Below we explain some options that may be useful depending on the operating system you are using:
For Windows, we need to open a CMD to identify the name of the interface. To do this, we need to run the command:
ipconfig
Then we need to open a PowerShell console and run this command:
Set-NetIPInterface -InterfaceAlias "InterfaceName" -Dhcp Enabled
The -r option of the dhclient command explicitly releases the current lease, and once released, the client exits. From SSH, we can run the following command specifying the interface:
dhclient -r eth1
Then to obtain a new IP, we can run this other command:
dhclient eth1
Then we can check that the IP has been changed correctly:
ip a