当前位置:首页 > Linux

Determining IP Information for eth0...failed

canca14年前 (2012-08-18)Linux862

虚拟机的网络采用NAT方式,始终不能上网,纠结了好几天的问题终于解决了。
VM虚拟机中装了redhatlinux9.0,准备与主机共享文件,结果网络不通! 
      无法激活,在输入ifup eth0后总提示: 
      Dertermining IP information for eth0....failed - no link present check cable 
      解决办法:

      在 /etc/sysconfig/network-scripts/ifcfg-eth0 
      中添加以下script: 
      check_link_down() { 
      return 1; 
     
      具体操作: 
      [root@localhost root]# cd /etc/sysconfig/network-scripts/ 
      [root@localhost network-scripts]# vi ifcfg-eth0 
      # Please read /usr/share/doc/initscripts-*/sysconfig.txt 
      # for the documentation of these parameters. 
      ONBOOT=yes 
      USERCTL=no 
      PEERDNS=yes 
      TYPE=Ethernet 
      DEVICE=eth0 
      HWADDR=00:0c:29:64:c2:5f #此处可以不添加,根据自己机器而定(建议先不添加) 
      BOOTPROTO=dhcp   
      #以下为添加部分,具体操作方法:先按a,在光标后插入下面文本,最后 :wq 保存退出(或用Gedit编辑) 
      check_link_down(){ 
      return 1; 
     
      接下来,重起网络(如果重起网络不行,则重启系统!) 
      [root@localhost network-scripts]# ifup eth0 
      Determining IP information for eth0... done. 
      好了,看到上面的提示说明已经成功,可用ifconfig检查自己是否已获得有效IP。 

Windwos XP + VMWare 5.0.0 build-13124 + Red Hat Linux 9.0,使用DHCP,系统启动时,启动网卡失败;手动设置IP、网关、DNS等则无问题。在网上搜到以下内容:
——————————————————————————————————————
the RH9 on VMWare Eth0 "No Link Present"
I am not able to setup my eth0 on RH linux 9 installed on a vmware GSX server 3.
I recieve the error message : Determining IP information for eth0... Failed! no link present. Check Cable.
- I use Bridged networking
- Card detected : AMD PCnet 32 Lance
- Driver : AMD PCnet 32
Can someone help???
-------------------------------------------
Oh! Sorry, I was assuming your host was Linux.
I found this on VMware's site:
Getting a DHCP Address in a Red Hat Linux 9.0 Virtual Machine
When a Red Hat Linux 9.0 guest operating system tries to get a DHCP address, the attempt may fail with an error message that states the link is down. On ESX Server, this happens only if you are using the vlance driver for your network connection.
To work around this problem, become root (su -) and use a text editor to edit the following files in the guest operating system. If only one of these file* **ist, make the change for that file only.
/etc/sysconfig/network-scripts/ifcfg-eth[n]
/etc/sysconfig/networking/devices/ifcfg-eth[n]
In both cases, [n] is the number of the Ethernet adapter — for example, eth0.
Add the following section to each of these two files:
check_link_down () {
return 1;
}
Then run the command ifup eth[n] (where [n] is the number of the Ethernet adapter) or restart the guest operating system.
——————————————————————————————————————
说是RedHat Linux的一个BUG,修改 /etc/sysconfig/network-scripts/ifcfg-eth0 或 /etc/sysconfig/networking/devices/ifcfg-eth0 或 /etc/sysconfig/networking/profiles/default/ifcfg-eth0 任意一个即可(事实上,修改任何一个文件,其余两个文件都会自动更新内容)。

扫描二维码推送至手机访问。

版权声明:本文由Ant.Master's Blog发布,如需转载请注明出处。

本文链接:https://iant.work/post/156.html

标签: Linux
分享给朋友:

“Determining IP Information for eth0...failed” 的相关文章

Linux常用命令集锦

查看所有已安装前缀为samba的RPM包      rpm -qa samba*删除目录或文件   rm -r 文件名linux解压bz2文件使用   bunzip2   linux-2-4-2.tar.bz2 &nbs…

crontab命令

crontab命令

前一天学习了 at 命令是针对仅运行一次的任务,循环运行的例行性计划任务,linux系统则是由 cron (crond) 这个系统服务来控制的。Linux 系统上面原本就有非常多的计划性工作,因此这个系统服务是默认启动的…

linux shell下除了某个文件外的其他文件全部删除的命令

linux shell下除了某个文件外的其他文件全部删除的命令

Linux反选删除文件最简单的方法是# shopt -s extglob      (打开extglob模式)# rm -fr !(file1) 如果是多个要排除的,可以这样:# rm -rf !(file1|file2) Lin…

CentOS增加swap分区大小

1. 查看当前分区情况free -m2. 增加 swap 大小, 2G 左右dd if=/dev/zero of=/var/swap bs=1024 count=2048000  3. 设置交换文件mkswap /var/swap 4. 立即激活启用交换分区swapon /var…

linux强制结束tomcat进程

tomcatId=`ps -ef | grep java | grep tomcat|awk '{print $2}'`  echo $tomcatId  echo "---------------"  for id in $tomcatId  do &nbs…

centos 7 crontab定时器及开机自启

crontab 建议直接采用centos7 自带得cronteb包,定时器:就是定时去执行干某一件事在这里我以脚本为媒介1 当然是创建一个脚本,创建目录随意但是你一定要记得。。直接通过vi来创建一个test.sh脚本!…

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。