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

How to solve the problem that the Missing config file br-ex network card can not start normally after centos7 adds the network card to the bridge?

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to solve the problem that the Missing config file br-ex network card can not start normally after centos7 adds the network card to the bridge. I hope you will get something after reading this article. Let's discuss it together.

Original / etc/sysconfig/network-scripts/ifcfg-ens2

[html] view plain copy

HWADDR=68:05:CA:11:XX:XX

TYPE=Ethernet

BOOTPROTO=none

NAME=ens2

UUID=bc723ed2-3196-491b-8e25-bf4a56a63c81

ONBOOT=yes

/ var/log/message

[html] view plain copy

Nov 25 13:42:50 localhost network: Bringing up interface ens2: Error: either "dev" is duplicate, or "br-ex" is a garbage.

Nov 25 13:42:50 localhost network: cat: / sys/class/net/ens2: Is a directory

Nov 25 13:42:50 localhost network: cat: br-ex/ifindex: No such file or directory

Nov 25 13:42:50 localhost network: / etc/sysconfig/network-scripts/ifup-eth: line 273: 1000 +: syntax error: operand expected (error

Token is "+")

Nov 25 13:42:50 localhost network: ERROR: [/ etc/sysconfig/network-scripts/ifup-aliases] Missing config file br-ex.

Nov 25 13:42:50 localhost / etc/sysconfig/network-scripts/ifup-aliases: Missing config file br-ex.

The scripts started by the network card are

/ etc/init.d/netwrok-> / usr/sbin/ifup-> / etc/sysconfig/network-scripts/network-functions

-> / etc/sysconfig/network-scripts/ifup-eth

By tracking each variable, we found that the problem is that the system sets the DEVICE variable to "ens2 br-ex2"

That's why the above strange log appears, and the correct DEVICE should be "ens2".

The main reason is that there is no DEVICE parameter in the ifcfg-ens2 file, and network-functions will find the device based on the mac address, but the Mac address of br-ex is the same as ens2, so the resulting DEVICE is an error.

The solution is to add the DEVICE parameter, and the modified / etc/sysconfig/network-scripts/ifcfg-ens2 is as follows

[html] view plain copy

DEVICE=ens2

After reading this article, I believe you have a certain understanding of "how to solve the problem that the Missing config file br-ex network card can not start normally after centos7 adds the network card to the bridge". If you want to know more about it, welcome to follow the industry information channel, thank you for your reading!

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