Hyper-v中安裝centos網卡故障

故障:

1、/etc/sysconfig/network-scripts 目錄下無ifcfg-eth0

2、ifconfig命令無eth0,僅顯示lo


解決方法:

一、如果輸入ifconfig,沒有eth0:,那你需要安裝網卡驅動,如下:

ubuntu中查看網卡類型及是否安裝網卡驅動程序   

1輸入: lspci 或者 lspci –v 或lspci–vv

會顯示所有的硬件信息和版本,然後在網上搜索linux下的驅動程序
03:00.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02) 
03:01.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 05) 
……

其中: Ethernet controller: 是網卡型號

我的網卡型號:Ethernet controller: Intel Corporation Device 1502 (rev 04)

 

網驅動爲:e1000e-1.6.2.tar.gz, 高版本可兼容低版本


hyper下安裝Linux IC v3.2.iso

# mount /dev/cdrom /media

# /media/install.sh

# reboot


二、查看是否有網卡驅動

在終端輸入 ifconfig –a

如果只出現   lo     Link encap:本地環回   
 

說明沒有網卡驅動。


如果還       eth0       Link encap:以太網 硬件地址 00:1c:bf:ca:14:d7   
 

說明網卡驅動安裝沒有問題


三、新建或複製ifcfg-eth0文件


刪除 rm  /etc/udev/rules.d/70-persistent-net.rules


cp ifcfg-lo ifcfg-eth0

或新建ifcfg-eth0文件

內容如下:

DEVICE=eth0

ONBOOT=yes

TYPE=Ethernet

……




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章