<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post//</link>
<title><![CDATA[centos6.3/centos7.4虚拟机之网卡出现ifconfig eth1 eth1: error fetching interface information: Device not found,eth0: error fetching interface information: Device not found问题之解决]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[WEB2.0]]></category>
<pubDate>Mon, 12 Nov 2012 02:14:22 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	背景：因为虚拟机经从一台电脑拷贝到另一台电脑时，出现了网卡问题，于是把ifcfg-eth0 --&gt;ifcfg-eth1.后启动Ok，但是，在开机会出现：eth0: error fetching interface information: Device not found。root 用户su xiangdong时会出现：ifconfig eth1 ，eth1: error fetching interface information: Device not found<br/>解决办法：<br/>1.刚开始运行ifconfig eth0发现网卡不见了。<br/>[root@localhost ~]# ifconfig eth0<br/>eth0: error fetching interface information: Device not found //但是network-scripts里的配置文件全部是eth0的，为什么获取不到也不知道为什么?<br/>处理解决方法只能用eth1替换eth0了，自己创建modprobe.conf文件里面alias eth0 e1000e但是不能识别。<br/> <br/>2.[root@localhost network-scripts]# mii-tool //查看网卡连接状态<br/>&nbsp;&nbsp; eth1: negotiated 100baseTx-FD, link ok<br/> <br/>3.[root@localhost network-scripts]# ifconfig eth1//能发现eth1网卡<br/> <br/>4.[root@localhost network-scripts]# mv ifcfg-eth0 ifcfg-eth1//修改eth0为eth1<br/> <br/>5.[root@localhost network-scripts]# vi ifcfg-eth1<br/>DEVICE=eth1//把eth1修改为eth0<br/>ONBOOT=yes//启动激活<br/>TYPE=Ethernet<br/>BOOTPROTO=static//静态ip<br/>IPADDR=192.168.xx.40<br/>NETMASK=255.255.255.0<br/>GATEWAY=192.168.xx.254<br/> <br/>6.[root@localhost ~]# cd /etc/sysconfig/networking/ //进入networking目录<br/>[root@localhost networking]# ls//里面有两个文件把里面的设备修改为ifcfg-eth1即可。<br/>devices&nbsp;&nbsp;profiles <br/> <br/>7.[root@localhost devices]# /etc/rc.d/init.d/network restart //重新启动network守护进程。<br/>Shutting down interface eth1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&nbsp;&nbsp;OK&nbsp;&nbsp;]<br/>Shutting down loopback interface:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&nbsp;&nbsp;OK&nbsp;&nbsp;]<br/>Bringing up loopback interface:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&nbsp;&nbsp;OK&nbsp;&nbsp;]<br/>Bringing up interface eth1:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[&nbsp;&nbsp;OK&nbsp;&nbsp;sss]<br/> <br/>8.[root@localhost devices]# ping www.baidu.com //最后ping 百度通了<br/>PING www.a.shifen.com (220.181.111.148) 56(84) bytes of data.<br/>64 bytes from 220.181.111.148: icmp_seq=1 ttl=52 time=33.1 ms<br/>64 bytes from 220.181.111.148: icmp_seq=2 ttl=52 time=33.3 ms<br/>64 bytes from 220.181.111.148: icmp_seq=3 ttl=52 time=33.4 ms<br/> <br/>遇到的问题：<br/>刚开始因为以为驱动问题，lsmod看了一下加载的驱动为e1000e,所以在 /etc/modprobe.d/里添加了modprobe.conf文件可是还是不行。<br/>dmesg查看启动信息查看网卡信息为e1000: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None<br/>后来查看/lib/modules/2.6.32-71.el6.i686/modules.alias 添加alias eth0 e1000e 还是不行，只能用eth1代替eth0<br/><br/><br/>本质上是阿里云经典的Eth0/Eth1迁移到VPC网，只有Eth0网卡导致的，可能上面的内容还搞不定？得向这个方向寻找：<br/>cat /etc/udev/rules.d/70-persistent-net.rules<br/># PCI device 0x10ec:0x8139 (8139too)<br/>SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR&#123;address&#125;==&quot;00:e0:4c:90:06:83&quot;, ATTR&#123;type&#125;==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth0&quot;<br/># PCI device 0x10ec:0x8168 (r8169)<br/>SUBSYSTEM==&quot;net&quot;, ACTION==&quot;add&quot;, DRIVERS==&quot;?*&quot;, ATTR&#123;address&#125;==&quot;00:e0:4c:10:cd:ab&quot;, ATTR&#123;type&#125;==&quot;1&quot;, KERNEL==&quot;eth*&quot;, NAME=&quot;eth1&quot;<br/><br/>TrevorH wrote:<br/>Look in /etc/udev/rules.d for a file called something with persistent-net-rules in it. Edit that and look at the contents - it probably contains lines for both eth0 and eth1. You should remove the lines that refer to eth0 and can also change eth1 to eth0 afterwards if you&#039;d prefer to have eth0 rather than eth1 on your system (though it doesn&#039;t really matter what it&#039;s called so long as it works). Save that and then look in /etc/sysconfig/network-scripts for the various ifcfg-eth* files there. You&#039;ll want to remove the one for eth0. If you renamed eth1 to eth0 then you need to rename ifcfg-eth1 to ifcfg-eth0 and edit its contents as it also contains the string &#039;eth1&#039; inside it.<br/>You can verify if the MAC address found on the device is same as that present in the /etc/udev/rules.d/*-persistent-net.rules
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] centos6.3/centos7.4虚拟机之网卡出现ifconfig eth1 eth1: error fetching interface information: Device not found,eth0: error fetching interface information: Device not found问题之解决]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>