网卡名字eth0,eth1的修改方法
2014-06-06 11:15
766 查看
网卡 虚拟机 配置文件 eth0
http://longwind.blog.51cto.com/419072/982738
VMWARE安装虚拟机后,为了避免重新安装,一般会选择直接复制虚拟机,但当打开心得拷贝后网卡信息会变化,原来是eth0 eth1 就会变成eth2 eth3,如果不想使用eth2 eth3下面的方法就可以更改网卡名称。CentOS为例 1.使用ip link 命令 ip link set eth0 name eth2
ip link set eth1 name eth0
ip link set eth2 name eth1 即可随意更改名字,不过重启后会失效。 2.更改配置文件(重启不会失效) 直接可以在modprobe 中修改模块别名,如使用udev的情况下,
# vi /etc/udev/rules.d/70-persistent-net.rules
其中会有
# PCI device 0x8086:0x100f (e1000) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:42:e7:61", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:42:e7:66", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x8086:0x100f (e1000) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:42:e7:6c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:42:e7:76", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"
为了避免MAC地址和其他虚拟机重复,我们可以选择更改下MAC地址,然后将eth0 eth1两行注释掉,将最后两行中的eth2 和eth3更改为eht0 和 eth1 。 完成后重启,就会发现虚拟机网卡又变成eth0和eth1了。 本文出自 “longWind” 博客,请务必保留此出处http://longwind.blog.51cto.com/419072/982738
http://longwind.blog.51cto.com/419072/982738
VMWARE安装虚拟机后,为了避免重新安装,一般会选择直接复制虚拟机,但当打开心得拷贝后网卡信息会变化,原来是eth0 eth1 就会变成eth2 eth3,如果不想使用eth2 eth3下面的方法就可以更改网卡名称。CentOS为例 1.使用ip link 命令 ip link set eth0 name eth2
ip link set eth1 name eth0
ip link set eth2 name eth1 即可随意更改名字,不过重启后会失效。 2.更改配置文件(重启不会失效) 直接可以在modprobe 中修改模块别名,如使用udev的情况下,
# vi /etc/udev/rules.d/70-persistent-net.rules
其中会有
# PCI device 0x8086:0x100f (e1000) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:42:e7:61", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:42:e7:66", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x8086:0x100f (e1000) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:42:e7:6c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:42:e7:76", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"
为了避免MAC地址和其他虚拟机重复,我们可以选择更改下MAC地址,然后将eth0 eth1两行注释掉,将最后两行中的eth2 和eth3更改为eht0 和 eth1 。 完成后重启,就会发现虚拟机网卡又变成eth0和eth1了。 本文出自 “longWind” 博客,请务必保留此出处http://longwind.blog.51cto.com/419072/982738
相关文章推荐
- 转: 网卡名字eth0,eth1的修改方法
- 网卡名字eth0,eth1的修改方法
- centos克隆 网卡eth1变成eth0修改方法
- centos网卡eth1变成eth0修改方法
- vmware workstation中克隆后centos网卡eth1变成eth0修改方法
- centos网卡eth1变成eth0修改方法
- centos网卡eth1变成eth0修改方法
- centos网卡eth1变成eth0修改方法
- (linux)复制的虚拟机网卡eth0变成了eth1或其他名称后修正方法
- linux无法设置ip || linux网卡eth1如何修改为eth0
- centos6.3 网卡名字 em0修改为eth0
- CentOS 7下修改默认网卡名为eth0的两种方法
- Linux下网卡eth1如何修改为eth0
- Linux下网卡eth1如何修改为eth0
- linux下网卡eth1如何修改为eth0
- 问题1-- VM 克隆的 centos 的Linux下网卡eth1如何修改为eth0解决办法
- VMware克隆linux虚拟机后,克隆后的虚拟机如何把网卡eth1修改为eth0 ?
- 解决模板生成Linux虚机后网卡eth1变成eth0方法
- vmware workstation克隆linux后修改网卡为eth0方法
- vmware workstation 克隆linux后修改网卡为eth0方法。