Centos6 克隆后簡單的網絡配置
第一步:修改主機名
$ vi /etc/sysconfig/network
第二步:
$ vi /etc/udev/rules.d/70-persistent-net.rules
注:
①注釋掉第一網卡驅動紅色標注地方
②修改第二個網卡驅動name=“eth0”
# PCI device 0x1022:0x2000 (pcnet32)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:ac:0c:#39", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:95:4a:d3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:ac:0c:#39", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x1022:0x2000 (pcnet32)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:95:4a:d3", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
第三步:
$ vi /etc/sysconfig/network-scripts/ifcfg-eth0
刪除UUID,HWADRR
修改
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
IPADDR=192.168.8.109
GATEWAY=192.168.8.2
第四步:
$ reboot
重啟機器
第五步:
修改 /etc/hosts
第六步:
關閉防火墻,SELINUX
service iptables stop
service ip6tables stop
chkconfig iptables off
chkconfig ip6tables off
vi /etc/selinux/config
SELINUX=disabled

浙公網安備 33010602011771號