10 压力测试工具与根服务器提示文件
10.1 DNS压力测试
10.1.1 测试工具queryperf
进入bind源代码的contrib/queryperf目录./configure
make
cp queryperf /usr/bin
编译安装完成
10.1.2 测试
准备一个数据文件data.txt,内容包括“www.google.com A”,10万行queryperf -d data.txt -s 192.168.198.222
解释:
-d data,指定查询的数据文件
-s 192.168.198.222,指定查询的dns服务器
-q 1000,一般用以指定并发数,准确的意思为同时保持1000个查询未响应
-t 2000,表示qps,每秒查询数
10.2 获取根服务器文件(hint file)
10.2.1 生成根服务器文件
dig @a.root-servers.net ns . +bufsiz=4000 > my.hint.file10.2.2 下载根服务器文件
ftp://ftp.internic.net/domain/named.rootftp://ftp.internic.net/domain/named.cache
例如:
curl -u ftp:ftp 'ftp://ftp.rs.internic.net/domain/db.cache' -o ./root.hints