This topic describes how to resolve the issue that the IP address of a Linux Elastic Compute Service (ECS) instance cannot be renewed when the network process for IP address renewal is abnormal or does not exist.
Problem description
If Dynamic Host Configuration Protocol (DHCP) is configured on a Linux ECS instance and the network process for IP address renewal, such as dhclient, is not started or does not exist, the IP address of the instance cannot be renewed when the IP lease expires. The issue interrupts network connections. To restore network connections, you must resolve the issue and make sure that the network configurations are correct.
Solution
Step 1: Check the status of the network process
Run the ps -ef |grep [$Network process]
command to check whether the network process exists. If the network process does not exist, potential risks exist. The following table describes the network processes that correspond to different operating system (OS) distributions for IP address renewal when DHCP is configured.
OS distribution
|
Network process
|
|
|
CentOS 8
|
|
|
|
|
|
Step 2: Restart the network service associated with the network process
Restart the network service associated with the network process to handle service exceptions or resolve the issue that the network process does not exist. The network service name varies based on the Linux distribution and version. The following table describes the network service names that correspond to different Linux distributions and versions and the commands that can be used to start the network services.
The restart operation may interrupt network connections for a short period of time and may interrupt services that are running on the instance. We recommend that you restart the network service during off-peak hours.
OS
|
Version
|
Network service name
|
Command
|
CentOS
|
6
|
network
|
|
7
|
network
|
| |
8
|
NetworkManager
|
| |
Debian
|
8
|
networking
|
|
9
|
networking
|
| |
10
|
networking
|
| |
Ubuntu
|
14
|
networking
|
|
16
|
networking
|
| |
18
|
systemd-networkd
|
| |
20
|
systemd-networkd
|
| |
SLES
|
15
|
wicked
|
|
12
|
wicked
|
| |
openSUSE
|
15
|
wicked
|
|
Alibaba Cloud Linux 2
|
2
|
systemd-networkd
|
|