更改网卡类型后,原来信息没有了,更改回来(减少网卡,改变接口模式或者克隆)
网卡配置文件与网络命令显示不一致
1.原有信息
![](https://i.imgur.com/Lafts6A.png)
![](https://i.imgur.com/Ac3rUnQ.png)
2.如果有多,可以删除其中一个;如果只有一个就直接更改
这里有两个,我就删除其中一个
rm -f ifcfg-eth1
![](https://i.imgur.com/CFYnQuC.png)
3.更改ifcfg-eth0(将MAC地址修改为eth2的MAC地址)
vim ifcfg-eth0
![](https://i.imgur.com/JGU03PZ.png)
3.关闭原有的网卡(eth2)
ifdown eth2
或者ifconfig eth2 down
![](https://i.imgur.com/LnJnERD.png)
4.查看驱动程序
查看driver:后面的内容e1000----->驱动
![](https://i.imgur.com/CGgcv01.png)
5.卸载驱动
modprobe -r e1000
![](https://i.imgur.com/NeAIjHn.png)
6.重新加载驱动
modprobe e1000
![](https://i.imgur.com/Kks5Obr.png)
7.重启网络服务(6,7)
CentOS6:service network restart
CentOS7:systemctl restart network
![](https://i.imgur.com/rVORBGV.png)