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

Add a new network card to cnetos6,centos7, which is not recognized by the system.

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

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

When doing experiments today, you need to add a new network card for virtual, but the system can not recognize it, all kinds of Baidu, Google, all kinds of restarts are unsuccessful.

I thought if I added a new piece, the system would recognize it, but it didn't.

Summary: To rewrite the new network card configuration file, and modify HWADDR, otherwise LSB error will be reported.

Here is my solution:

1. After adding a new network card, execute ifconfig, and the system does not recognize it.

#ifconfig

2. Get the real mac of the new network card

#ip addr

3. Copy eth0 to eth2 and modify the configuration file

#cd /etc/sysconfig/network-scripts

#cp ifcfg-eth0 ifcfg-eth2

#vim ifcfg-eth2

The content to be modified is:

HWADD is obtained by ip addr

UUID I did not find UUID, can comment out

NAME changed to the current network card name eth2

DEVICE changed to current NIC name eth2

IPADDR,GATEWAY, etc.

save and exit

4. Restart the NIC, you can see that it has been acquired

#systemctl restart network

#ifconfig

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

Network Security

Wechat

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

12
Report