What Should I Do If NIC Flapping Occurs After My ECS Specifications Are Modified?
Symptom
Take a Linux ECS as an example. After the user modified ECS specifications and ran the ifconfig command, the user found that the original eth0 and eth1 NICs were changed to eth2 and eth3 NICs, indicating that NIC flapping occurred.
Root Cause
NIC flapping occurs because NIC retaining is enabled in the image from which the ECS is created.
Solution to Linux
For a Linux ECS, perform the following operations and restart the ECS to resolve this issue:
- Run the following command to view the files in the network rule directory:
- Run the following commands to delete the files with both persistent and net included in file names from the network rule directory:
rm -fr /etc/udev/rules.d/*net*persistent*.rules
rm -fr /etc/udev/rules.d/*persistent*net*.rules
- Run the following command to check whether the initrd image file with a name starting with initrd and ending with default contains both persistent and net network rules (change the italic data in the following command to the actual OS version):
lsinitrd /boot/initrd-2.6.32.12-0.7-default |grep persistent|grep net
- Run the following command to back up the initrd image file (change the italic data in the following command to the actual OS version):
cp /boot/initrd-2.6.32.12-0.7-default /boot/initrd-2.6.32.12-0.7-default_bak
- Run the following command to regenerate the initrd image file:
- Run the following command to check whether the initramfs image file with a name starting with initrd and ending with generic contains both persistent and net network rules:
lsinitramfs /boot/initrd.img-3.19.0-25-generic|grep persistent|grep net
- Run the following command to back up the initrd image file:
cp /boot/initrd.img-3.19.0-25-generic /boot/initrd.img-3.19.0-25-generic_bak
- Run the following command to regenerate the initramfs image file:
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.