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

Centos configuration eth0 prompt Device does not seem to be present

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

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

Centos configuration eth0 prompt Device does not seem to be present

one。 Failure phenomenon:

[root@c1node01 ~] # service network restart

Shutting down loopback insterface: [OK]

Bringing up loopback insterface: [OK]

Bringing up interface eth0: Device eth0 does not seem to be present,delaying initialization. [FAILED]

Solution:

[root@c1node01 ~] # rm-rf / etc/udev/rules.d/70-persistent-net.rules

[root@c1node01] # reboot...

[root@c1node01 ~] # service network restart

Shutting down loopback insterface: [OK]

Bringing up loopback insterface: [OK]

Bringing up interface eth0: [OK]

[root@c1node01 ~] #

two。 Another way

The reason for this is that the files corresponding to the Centos system are moved in the virtual machine (Vmware). When the network card is reconfigured, the MAC address of the network card changes. Type ifconfig-a, and the eth0 cannot be found.

After installing a centos virtual machine, make another copy. After booting, the network card cannot start normally. Error: Device eth0 does not seem to be present

Delaying initialization

Solution: # mv / etc/sysconfig/network-scripts/ifcfg-eth0

Sysconfig/network-scripts/ifcfg-eth2

Vim

Sysconfig/network-scripts/ifcfg-eth2

Modify DEVICE= "eth0"

For DEVICE= "eth2"

Uuid and physical address can be deleted

Then restart and start the network card to try

three。 A little deeper than the first one.

Actions before failure:

The DELL blade is equipped with CentOS6.3 operating system, and the network card recognizes em1 and em2. Due to the need for work, the slot is adjusted and the blade is started.

Failure phenomenon:

The network is not connected after startup. After logging in through iDRAC, the route check the default route is normal.

Restart the network service:

[root@nodeA ~] # service network restart Shutting down loopback insterface: [OK] Bringing up loopback insterface: [OK] Bringing up interface em1: Device em1 does not seem to be present,delaying initialization. [FAILED]

Analyze and resolve problems:

We mentioned the 70-persistent-net.rules file in other articles before, so we took a look at it:

[root@nodeA ~] # vi / etc/udev/rules.d/70-persistent-net.rules

# This file was automatically generated by the / lib/udev/write_net_rules # program, run by the persistent-net-generator.rules rules file. # # You can modify it, as long as you keep each rule on a single # line, and change only the value of the NAME= key.

# PCI device 0x14e4:0x163a (bnx2) SUBSYSTEM== "net", ACTION== "add", DRIVERS== "? *", ATTR {address} = = "24:b6:fd:ab:76:1e", ATTR {type} = = "1", KERNEL== "eth*", NAME= "eth2"

# PCI device 0x14e4:0x163a (bnx2) SUBSYSTEM== "net", ACTION== "add", DRIVERS== "? *", ATTR {address} = = "24:b6:fd:ab:76:1c", ATTR {type} = = "1", KERNEL== "eth*", NAME= "eth0"

Find that the name of NAME is incorrect, change the eth0 in the above red font to em1,eth2 to em2 in turn.

* remember: the Nic number is determined by the size of the MAC address. The smaller the MAC, the smaller the Nic number.

As follows:

.

# PCI device 0x14e4:0x163a (bnx2)

SUBSYSTEM== "net", ACTION== "add", DRIVERS== "? *", ATTR {address} = = "24:b6:fd:ab:76:1e", ATTR {type} = = "1", KERNEL== "eth*", NAME= "em2"

# PCI device 0x14e4:0x163a (bnx2) SUBSYSTEM== "net", ACTION== "add", DRIVERS== "? *", ATTR {address} = = "24:b6:fd:ab:76:1c", ATTR {type} = = "1", KERNEL== "eth*", NAME= "em1"

Save exit ~!

[root@nodeA ~] # reboot

.

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