Red Hat 7.0 安装完后无网卡

简介:

最近在VMware workstation 8上安装了RHEL 7.0 x64,但是显示没有网卡,ifconfig只显示lo设备

[root@localhost~]# ifconfig   
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536    
        inet 127.0.0.1  netmask 255.0.0.0    
        inet6 ::1  prefixlen 128  scopeid 0x10<host>    
        loop  txqueuelen 0  (Local Loopback)    
        RX packets 8  bytes 764 (764.0 B)    
        RX errors 0  dropped 0  overruns 0  frame 0    
        TX packets 8  bytes 764 (764.0 B)    
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

到/etc/sysconfig/network-scritps里发现只有lo这个设备

image

但是明明是有这块网卡的

[root@openstack ~]# lspci |grep -i eth   
02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)

google了下,试了下面几种方式,都不行

1,开机删掉网卡   
2,重启    
3,开机后加网卡    
4,重启,ifconfig还是只有lo

-------------------------------   
1,开机删掉网卡    
2,关机下加网卡    
3,开机,还是不行    

后来在下面两篇文章中看到原来是虚拟机vmx配置文件中少了一行配置

https://access.redhat.com/discussions/1120733

https://communities.vmware.com/thread/477988

1,关机,

2,移除网卡

3,添加网卡

4,往虚拟机vmx配置文件加ethernet0.virtualDev = "e1000"

5,开机,通过ifconfig能看到网卡

[root@openstack ~]# ifconfig     
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500      
        inet 192.168.47.130  netmask 255.255.255.0  broadcast 192.168.47.255      
        inet6 fe80::20c:29ff:fe5f:8717  prefixlen 64  scopeid 0x20<link>      
        ether 00:0c:29:5f:87:17  txqueuelen 1000  (Ethernet)      
        RX packets 75  bytes 8456 (8.2 KiB)      
        RX errors 0  dropped 0  overruns 0  frame 0      
        TX packets 124  bytes 15417 (15.0 KiB)      
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536     
        inet 127.0.0.1  netmask 255.0.0.0      
        inet6 ::1  prefixlen 128  scopeid 0x10<host>      
        loop  txqueuelen 0  (Local Loopback)      
        RX packets 8  bytes 764 (764.0 B)      
        RX errors 0  dropped 0  overruns 0  frame 0      
        TX packets 8  bytes 764 (764.0 B)      
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


附:RedHat 7.0 文档

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/





本文转自 taojin1240 51CTO博客,原文链接:http://blog.51cto.com/taotao1240/1680479,如需转载请自行联系原作者
目录
相关文章
|
Linux 数据安全/隐私保护
|
Oracle 关系型数据库 Linux
|
测试技术 Linux 网络安全