说好的每天一篇博文的,看来还是自己不够努力。 加油吧,少年!
好了今天给大家分享下,由于在日常使用中,安装Linu新系统太费时间,因此克隆系统就成了大家的首选,然而这并不是一切顺利的,你会发现克隆后,克隆机网卡无法启动的现象。OK,开始解决方法吧!
1、首先,进入以下目录:
[[email protected] ~]# cd /etc/udev/rules.d/
2、修改配置文件如下:
原来的:[[email protected] rules.d]# vim 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:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:11:05:1e", ATTR{type}=="1", KERNEL=="eth*", NAME=
"eth0"
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:aa:8b:bf", ATTR{type}=="1", KERNEL=="eth*", NAME=
"eth1"
修改后的:[[email protected] rules.d]# vim 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:0x100f (e1000)
#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:11:05:1e", ATTR{type}=="1", KERNEL=="eth*", NAME
="eth0"
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:aa:8b:bf", ATTR{type}=="1", KERNEL=="eth*", NAME=
"eth0"
3、修改网卡参数:
[[email protected] ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:0c:29:aa:8b:bf *修改为上边的红色的MAC地址*
TYPE=Ethernet
UUID=d7849a85-3812-4026-ab92-b2fa58b28ecf
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=192.168.255.252 *配置新的IP地址*
NETMASK=255.255.255.0
DNS2=4.4.4.4
DNS1=8.8.8.8
IPV6INIT=no
USERCTL=no
4、重启系统,查看网卡是否正常启动,ip地址是否正常。
[[email protected] ~]# shutdown -r now *重启系统*
[[email protected] ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:AA:8B:BF
inet addr:192.168.255.252 Bcast:192.168.255.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:feaa:8bbf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:900 errors:0 dropped:0 overruns:0 frame:0
TX packets:788 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:87807 (85.7 KiB) TX bytes:115265 (112.5 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
可见,网卡启动正常,ip地址ok。
***************此文结束***********************
20150806