百度空间 | 百度首页 
 
查看文章
 
linux 登陆慢的解决方法
2008-11-08 12:28

前一段时间装了一个RHEL。但是发现不管是telnet 还是ssh都登陆很慢,这让我很郁闷,在网上找了很久,终于找到了,将文件/etc/resolv.conf里面的DNS服务注释了就好了。这也可能是在虚拟机上没有DNS的原因吧。

[root@leshy ~]# cat /etc/resolv.conf
#nameserver 200.1.1.1
[root@leshy ~]#

网上高人的回复原因是:

Its your /etc/resolv.conf
i bet if u go to the comp in a web browser its instant, yeah? why? because your PC doesnt do a reverse DNS lookup on ur IP then... when u telnet/ftp into ur linux box, it'll do a dns lookup on you, to see who you are, if u either correct the settings in the /etc/resolve.conf file, or just back it up, then delete the contents all together, it should be fine !

我猜原因就是当有登陆就去DNS去找相应信息,直至超时返回。将DNS信息删了,就可以正常。

更多关于resolv.conf的讨论可以去http://bbs.chinaunix.net/viewthread.php?tid=491886看看。


类别:Linux | 添加到搜藏 | 浏览() | 评论 (2)
 
最近读者:
 
网友评论:
1
2008-12-15 17:41 | 回复
那就上不去网了吧。
 
2
2008-12-19 11:10 | 回复
这个是在没有外网连接的情况下。而且还配了主机名的情况。呵呵。。。它要等DNS超时返回。所以时间比较长。。。
 
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码: 请点击后输入四位验证码,字母不区分大小写
      

     

©2009 Baidu