vmware克隆CentOS后网卡名称修改
时间:2015-01-14 19:19 来源:blog.51cto.com 作者:一诺千金
# setup //可以使用此命令配置网卡IP,以下截图有省略。
# ifconfig
eth1 Link encap:Ethernet HWaddr 00:0C:29:60:15:0F
inet addr:192.168.2.100 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe60:150f
/64
Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:60 errors:0 dropped:0 overruns:0 frame:0
TX packets:67 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6219 (6.0 KiB) TX bytes:10975 (10.7 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:16436 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)
# cd /etc/sysconfig/network-scripts/
# rm -f ifcfg-eth0
# mv ifcfg-eth1 ifcfg-eth0
# vi ifcfg-eth0
DEVICE=eth0
//
将eth1修改为eth0
BOOTPROTO=none
NETMASK=255.255.255.0
TYPE=Ethernet
HWADDR=00:0c:29:60:15:0f
IPADDR=192.168.2.100
# cd /etc/udev/rules.d/
# vi 70-persistent-net.rules //未修改状态
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM==
"net"
, ACTION==
"add"
, DRIVERS==
"?*"
, ATTR{address}==
"00:0c:29:69:90:83"
, ATTR{
type
}==
"1"
, KERNEL==
"eth*"
, NAME=
"eth0"
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM==
"net"
, ACTION==
"add"
, DRIVERS==
"?*"
, ATTR{address}==
"00:0c:29:60:15:0f"
, ATTR{
type
}==
"1"
, KERNEL==
"eth*"
, NAME=
"eth1"
# cat 70-persistent-net.rules //修改后状态
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM==
"net"
, ACTION==
"add"
, DRIVERS==
"?*"
, ATTR{address}==
"00:0c:29:60:15:0f"
, ATTR{
type
}==
"1"
, KERNEL==
"eth*"
, NAME=
"eth0"
# reboot
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:60:15:0F
inet addr:192.168.2.100 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe60:150f
/64
Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29 errors:0 dropped:0 overruns:0 frame:0
TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3655 (3.5 KiB) TX bytes:5385 (5.2 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:16436 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)
(责任编辑:IT)
|