Help Center > > FAQs> Network Configurations> NICs> What Should I Do If NIC Flapping Occurs After My ECS Specifications Are Modified?

What Should I Do If NIC Flapping Occurs After My ECS Specifications Are Modified?

Updated at: Jan 26, 2021 GMT+08:00

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 retaining is enabled in the image based on which the ECS is created.

Solution to Windows

For a Windows ECS, delete the directories in the following registries and restart the ECS to resolve this issue:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\Unmanaged

Solution to Linux

For a Linux ECS, perform the following operations and restart the ECS to resolve this issue:

  1. Run the following command to view the files in the network rule directory:

    ls -l /etc/udev/rules.d

  2. 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

  3. 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

    • If yes, go to steps 4 and 5.
    • If no, no further action is required.
  4. 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

  5. Run the following command to regenerate the initrd image file:

    mkinitrd

Perform the following operations when an OS, such as Ubuntu, uses the initramfs image:
  1. 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

    • If yes, go to steps 2 and 3.
    • If no, no further action is required.
  2. 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

  3. Run the following command to regenerate the initramfs image file:

    update-initramfs -u

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel