天天看點

vmware克隆centos6.8mini系統後eth0啟動不了

1、修改主機名

#hostname lvs1

#vim /etc/sysconfig/network

    NETWORKING = yes    

    HOSTNAME = lvs1  

2、修改mac位址

#vim  /etc/udev/rules.d/70-persistent-net.rules

# PCI device 0x8086:0x100f (e1000)

#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:02:b6:9b", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:03:4c:9e", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

把上一行登出掉,然後把下面這個改為eth0

然後#vim /etc/sysconfig/network-scripts/ifcfg-eth0 

DEVICE=eth0

HWADDR=00:0c:29:03:4c:9e

TYPE=Ethernet

UUID=51a3aab4-42cc-4e9a-b5d6-e23bb16c2b54

ONBOOT=yes

NM_CONTROLLED=yes

BOOTPROTO=dhcp

3、重新啟動網卡 #service network restart

4、 #ifconfig

          eth0      Link encap:Ethernet  HWaddr 00:0c:29:03:4c:9e 

          inet addr:192.168.213.136  Bcast:192.168.213.255  Mask:255.255.255.0

          inet6 addr: fe80::250:56ff:fe39:3808/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:245 errors:0 dropped:0 overruns:0 frame:0

          TX packets:156 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:22023 (21.5 KiB)  TX bytes:19033 (18.5 KiB)

本文轉自 古老 51CTO部落格,原文連結:http://blog.51cto.com/yzmlinux/1931728,如需轉載請自行聯系原作者