標籤:vmbox eth0
在配置vmbox虛擬機器的時候,為了方便,經常採用複製虛擬機器的操作,但是複製後的虛擬機器即便採用了橋接網路的方式,還是無法正常串連區域網路
後來網上查了一下,可以重新設定eth
首先查看檔案 /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 0x8086:0x100e (e1000)SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:92:5e:f2", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"# PCI device 0x8086:0x100e (e1000)SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:5a:00:b2", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
記住eth1 中的mac地址 "08:00:27:5a:00:b2"
然後編輯檔案 vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth1HWADDR=08:00:27:5a:00:b2TYPE=Ethernet#UUID=62b19c7b-4fbd-45ef-b73f-73d9bf664f69ONBOOT=yesNM_CONTROLLED=yesBOOTPROTO=staticIPADDR=192.168.102.6NETMASK=255.255.255.0GATEWAY=192.168.102.1
將原來的eth0,改為eth1,並將HWADDR修改該為上面檔案裡的mac地址
儲存退出後
重啟網路
service network restart
即可完成內網的聯通
測試輸入ifconfig斷行符號,如果能看到剛才檔案裡設定的ip,標示設定成功!
VMware啟動CentOS 6.5後將網卡eth1重新設定為eth0