Updated at: 2022-02-22 GMT+08:00

Configuring NetworkManager

Linux OSs use NetworkManager to provide detection and configuration for systems to automatically connect to network. You are advised to use NetworkManager for new versions of OSs.

If you do not want to use NetworkManager, you can use the native network management service of the OS.

Red Hat, Oracle, CentOS 6.x, CentOS 7.x, EulerOS 2.x, Fedora 22, or Later

Perform the following operations to enable automatic network configuration for an ECS using NetworkManager:

  1. Run the following command to install NetworkManager:

    yum install NetworkManager

  2. Delete ifcfg-eth1 to ifcfg-eth11 from the /etc/sysconfig/network-script/ directory and retain only ifcfg-eth0.
  3. Run the following command to disable the network:

    service network stop

  4. Run the following command to disable automatic start of the network:

    chkconfig network off

  5. Run the following commands to restart messagebus and NetworkManager and enable NetworkManager to start automatically at startup:

    service messagebus restart

    service NetworkManager restart

    chkconfig NetworkManager on

Debian 9.0 or Later

Perform the following operations to enable automatic network configuration for an ECS using NetworkManager:

  1. Run the following command to install NetworkManager:

    apt-get install network-manager

  2. Change the value of managed in the /etc/NetworkManager/NetworkManager.conf file to true.
  3. Modify /etc/network/interfaces and retain only eth0.
  4. Run the following commands to disable the network, restart messagebus and NetworkManager, and enable NetworkManager to start automatically at startup:

    service network-manager restart

    chkconfig network-manager on

    service networking stop

    service messagebus restart

    service network-manager restart

Ubuntu 14 or Later

Perform the following operations to enable automatic network configuration for an ECS using NetworkManager:

  1. Run the following command to install NetworkManager:

    apt-get install network-manager

  2. Change the value of managed in the /etc/NetworkManager/NetworkManager.conf file to true.
  3. Modify /etc/network/interfaces and retain only eth0.
  4. Run the following command to disable the network:

    service networking stop

  5. Run the following command to disable automatic start of the network:

    chkconfig network off

  6. Run the following commands to restart D-Bus and NetworkManager:

    service dbus restart

    service network-manager restart

SUSE 11 SP3 and openSUSE 13 or Later

Perform the following operations to enable automatic network configuration for an ECS using NetworkManager:

  1. Delete ifcfg-eth1 to ifcfg-eth11 from the /etc/sysconfig/network-script/ directory and retain only ifcfg-eth0.
  2. Run the following command to install NetworkManager:

    zypper install NetworkManager

  3. Start YaST, choose Network Devices in the navigation pane on the left, and select Network Settings in the right pane. In the Network Setup Method area of the Global Options page, change Traditional Method with ifup to User Controlled with NetworkManager.
close