VirtualBox下Centos6 配置eth0 提示Device does not see...

故障现象

重启网络: html

service network restart

获得如下提示信息: linux

Shutting down loopback insterface:                                                                          [   OK  ]
Bringing up loopback insterface:                                                                            [   OK  ]
Bringing up interface eth0:  Device eth0 does not seem to be present,delaying initialization.               [   FAILED  ]

解决问题的过程

运行ifconfig命令查看网卡设备: centos

ifconfig -a

个人到了如下信息: 服务器

只出现了eth1而没有出现eth0, 网络

而后经过查看虚拟机的网卡配置,咱们能够获得网卡的mac地址: ide

然后经过查看 /etc/sysconfig/network-scripts/ 文件夹下的网卡配置: oop

ll /etc/sysconfig/network-scripts/ | grep "ifcfg-"

我发现能够能获得ifcfg-eth0的信息: ui

尝试把ifcfg-eth0重命名成ifcfg-eth1,而且把文件里的 DEVICE 参数值从 eth0 改为 eth1 ,重启网络。至此,问题搞定。 spa

反思和总结

Centos网络配置文件

RedHat系列的linux全部有关网络的配置文件,都放在了 /etc/sysconfig/network-scripts/ 文件夹下。这个文件夹下一共有三类脚本: rest

  1. 网络接口配置文件(Interface configuration files)
  2. 网络接口控制脚本(Interface control scripts)
  3. 网络功能脚本(Network function files)

/etc/hosts

本地的域名和ip地址解析文件。e.g. 127.0.0.1 localhost

/etc/resolv.conf

DNS域名解析的配置文件,它包含了主机的域名搜索顺序和DNS服务器的地址,每一行应包含一个关键字和一个或多个的由空格隔开的参数。

/etc/sysconfig/network

这个文件包含了全部网络接口共享的路由以及主机名信息。

更多信息能够参考 Section 27.1.22, “/etc/sysconfig/network”Linux经常使用网络配置文件介绍

/etc/sysconfig/network-scripts/ifcfg-

系统网络接口设备的配置文件。关于这些网络接口设备的配置参数,参考文档:Section 13.2, “Interface Configuration Files”

参考文档

  1. Centos 配置eth0 提示Device does not seem to be present
  2. CentOS 6.0找不到ifcfg-eth0解决方案
  3. Deployment Guide Chapter 13. Network Interfaces
  4. Linux经常使用网络配置文件介绍
  5. Red_Hat_Enterprise_Linux-6-Deployment_Guide
  6. Red_Hat_Enterprise_Linux-6-Deployment_Guide
相关文章
相关标签/搜索