Linux下网速慢的问题
来源:互联网 发布:手绘板mac驱动 编辑:程序博客网 时间:2024/04/25 21:28
机器是双系统,分别是Windows XP 和 CentOS-5.3,问题是这样的,在windows 下网速很快,然后切换到Linux下网速就变得蜗牛爬一样慢,忍受了有些日子了。试过在Linux下重新装了网卡驱动,效果为零,问题依旧。不废话了,问题的根本原因是dns解析花费了大量时间,解决方法是利用dnsmasq建立dns 缓存。
1、安装dnsmasq
dnsmasq的官方网址是:http://www.thekelleys.org.uk/dnsmasq/doc.html。利用里面的下载链接下载安装即可。
2、配置dnsmasq
配置相当简单,也不用命令行。在CentOS打开System——>Administration——>Network:
到DNS标签下添加一个新的DNS服务器:127.0.0.1,并且放在第一的位置上。原来的保留不变,只是挪一下位置,降一下顺序。
The other way to do this is to edit /etc/resolv.conf file.Add an new line at the top of the /etc/resolv.conf file and the line looks like this nameserver:127.0.0.1 which means add a new dns server.
3、启动、停止dnsmasq
/etc/init.d/dnsmasp start
/etc/init.d/dnsmasp stop
/etc/init.d/dnsmasp restart
利用/etc/init.d/dnsmasp start来启动或者配置修改后用/etc/init.d/dnsmasp restart来重新启动使dnsmasq生效。
4、测试DNS缓存
4.1dnsmasq启动之前执行dig结果
dig www.google.com
;; Query time: 1 msec
;; SERVER: xxx.xxx.xxx.xxx#53(xxx.xxx.xxx.xxx) #这里屏蔽真实DNS地址
;; WHEN: Mon Aug 31 13:13:40 2009
;; MSG SIZE rcvd: 292
4.2dnsmasq启动之后执行dig结果
dig www.google.com
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Aug 31 13:16:02 2009
;; MSG SIZE rcvd: 110
- Linux下网速慢的问题
- 解决linux网速慢问题
- 解决Ubuntu 网速慢的问题
- Ubuntu无线网速奇慢的问题
- 网速慢的原因
- 网速慢的解决方法
- ubuntu linux 网速太慢
- 怎样解决centons6.3系统网速慢的问题
- 使用nat123怎样解决网速慢的问题?
- MAC 网速问题 变慢 的来看看 经验
- linux 下 weblogic 启动慢的问题
- 网速慢的十二大原因
- ubuntu网速慢的原因
- 北京的网速,超级慢
- Linux下查看网速的软件
- linux 下网速缓慢的解决办法
- linux 下查看网速
- Linux下测试网速
- __FILE__ __LINE__
- 动态时间段收发存报表
- iframe链接到父窗口
- 赚点论坛分
- FireBird批量数据导入
- Linux下网速慢的问题
- Oracel 10g 的数据库闪回测试
- 如何使用LdapConnection 类 (1)链接 Ldap服务器
- Yiwu,golden card for the China-made
- Linux下的Oracle 10g安装及配置
- 开始sharepoint+WorkFlowFoundation项目
- PHP建造者模式(Builder Pattern)
- 编程能力的四种境界[转]
- java mianshi