1、默认centos minimal,网络未启动,通过以下修改
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=08:00:27:C4:E9:6D
TYPE=Ethernet
UUID=eeba00b3-def9-4359-ba78-51c5ed4e8205
ONBOOT=yes
#修改这里为yes
NM_CONTROLLED=no #修改这里为no
BOOTPROTO=dhcp
然后 service network restart
即可
2、通过虚拟机添加了网卡,但是不起效果,
vi /etc/udev/rules.d/70-persistent-net.rules #可以看到几块网卡
# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add",
DRIVERS=="?*", ATTR{address}=="08:00:27:c4:e9:6d", ATTR{type}=="1",
KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:0x100e
(e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="08:00:27:42:e4:29", ATTR{type}=="1", KERNEL=="eth*",
NAME="eth1"
~
然后复制 刚刚添加的网卡mac,如eth1的08:00:27:42:e4:29
################################################
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1
vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1 #修改为eth1
HWADDR=08:00:27:42:e4:29
#粘帖刚才复制的eth1的mac
TYPE=Ethernet
UUID=eeba00b3-def9-4359-ba78-51c5ed4e8205
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=dhcp
然后保存 service network restart
centos minimal网络配置,添加网卡,布布扣,bubuko.com
原文:http://www.cnblogs.com/fonlue/p/3658243.html