知识库

记录共享技术内容

CentOS6/RedHat6新增网卡识别问题

使用虚拟机做实验时,有时需要新增网卡设备,有些时候新增的设备并不能正常的识别出来,可以通过下面的方法处理
1.添加新硬件,重启udev服务

start_udev

2.查看网卡配置信息,确认正确识别

vim  /etc/udev/rules.d/70-persistent-net.rules
# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:de:15:d5", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:3d:76:c8", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

3.生成网卡配置文件
使用setup或system-config-network-tui添加了网卡配置信息。如果在/etc/sysconfig/network-scripts/找不到新增网卡的配置文件,可以将/etc/sysconfig/networking/devices/下的配置文件直接复制到network-scripts文件夹中。

cp /etc/sysconfig/networking/devices/* /etc/sysconfig/network-scripts/
点赞

Leave a Reply

Your email address will not be published. Required fields are marked *