红联Linux门户
Linux帮助

Red Hat Linux 局域网网络问题

发布时间:2007-12-01 10:40:00来源:红联作者:vuainges
我在读的计算机应用专业正在学习 Linux 系统的应用,学的是 Red Hat Linux 而且我自己对这个操作系统比较有兴趣,正想在自己宿舍的电脑上装个 Linux 玩一下,顺便也学习学习一下。我在高二的时候也用过,并且尝试过配置宽带上网,没什么问题,就以为局域网也不难,但是在宿舍虚拟机装好了 Linux 之后就连接不上了,上不到校园网怎么尝试也没办法,一直到刚才上网找资料才知道这个原来是 Linux 的一个 bug ,哎。解决办法如下:

症状及解决办法英文原文(在VMware的网站上找的):

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 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.

翻译成中文大概就是:

到/etc/sysconfig/network-scripts/ifcfg-eth
/etc/sysconfig/networking/devices/ifcfg-eth 其中表示Ethernet adapter的标识数字,一般为0。当为零的时候,就是
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/networking/devices/ifcfg-eth0 这两个文件中加入

check_link_down () {
return 1;
}

另外如果存在/etc/sysconfig/networking/profiles/default/ifcfg-eth0 文件,则同样在其中加入这一段东西即可,然后重启系统。(注意:重启过程中可能出现死机情况,rest一下就好了。)
文章评论

共有 0 条评论