Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The software configures Network Manager to ignore some network devices

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail about software configuration Network Manager to ignore some network devices. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

NetworkManager is a daemon that can dynamically control and configure the network, corresponding to the NetworkManager.service service, the default profile path / etc/NetworkManager/NetworkManager.conf. Starting with RHEL/CentOS 7, network functions are provided by default by NetworkManager in the form of services. The server version of Ubuntu does not enable NetworkManager by default.

By default, NetworkManager manages all devices except lo (loopback) devices. However, in the container environment, many network devices are created by network drivers, and the control of container network devices by NetworkManager may lead to abnormal cluster network communication. Because container-related devices need to be set to unmanaged so that NetworkManager ignores these devices.

View device status # View device management status

Nmcli device status

Temporary unmanaged

If it is only a temporary test, you can use the nmcli command to set a network device to the unmanaged state. However, as soon as the NetworkManager service is restarted or the host is restarted, the network interface will return to the managed state.

Nmcli device set xxx managed no

Permanent unmanaged

To permanently exclude NetworkManager from managing some network devices, you need to set it through a configuration file.

Enable plug-in

Enable the plug-in keyfile under the [main] level of the / etc/NetworkManager/NetworkManager.conf configuration file.

[main]

Plugins=keyfile

Create a / etc/NetworkManager/conf.d/99-unmanaged-devices.conf configuration file that contains the following:

[keyfile]

Unmanaged-devices=interface-name:eth*,except:interface-name:eth0;interface-name:docker0;interface-name:flannel*;interface-name:flannel*;interface-name:cni0;;mac:66:77:88:99:00:aa

Separate by semicolon

You can use wildcards to match interfaces

Interface-name:eth*,except:interface-name:eth0; said: except for eth0, all other interfaces that begin with eth are unmanaged.

Interfaces can be excluded by mac address

Reload configuration

Systemctl reload NetworkManager

Disable Network Manager

Configuration errors, or untimely configuration updates, can lead to unnecessary problems. If you do not have to use NetworkManager services, it is generally recommended to disable NetworkManager services.

This is the end of the article on "configuring Network Manager to ignore some network devices". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report