標籤:linux 營運
我所使用 的是centos虛擬機器,在那個環境下有dhcp服務,本來用的好好的,可是突然出現了如下錯誤:錯誤:determining IP information for eth0 ... failed; no link present . Check cable?開始還以為是網線掉了,結果好的。後來去網上百度,google了一下,結果出現的都是
Getting a DHCP Address in a Red Hat Linux 9.0 Virtual MachineWhen 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 files exist, 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.
結果我試了一下還是不行,就是出錯改變了變成了如下錯誤determining IP information for eth0 ... failed;
後來想了一下修改ifcfg-eth0,把原來的dhcp改為static,整個配置改成靜態,然後再重啟網路,就發現可以了。