DNS视图以及日志压力测试
1 访问控制列表 配置在/etc/named.conf文件的最顶端
acl innct {
192.168.1.0/24;
127.0.0.0/8;
};
allow query { innct; };
2- 视图
named.conf
acl telecom {
192.168.1.0/24;
127.0.0.8;
};
acl unicom {
192.161.14.0/24;
127.0.0.8;
};
options {
directory "/var/named";
allow-recursion { innet; };
};
view telecom {
match-clients { telecom; };
zone "xingxing.com" IN {
type master;
file "telecom.xingxing.com.zone";
};
zone "xx.com" IN {
type master;
file "xx.com.zone";
};
};
view unicom {
match-clients { unicom; };
zone "xingxing.com" IN {
type master;
file "unicom.xingxing.com.zone";
};
zone "xx.com" IN {
type master;
file "xx.com.zone";
};
};
vim /var/named/telecom.xingxing.com.zone
$TTL 43200
@ IN SOA dns.xingxing.com. root (
2
1H
10M
7D
1D)
@ IN NS dns
@ IN MX 10 mail
dns IN A 192.168.1.5
mail IN A 192.168.1.5
na IN A 192.168.1.3
vim /var/named/iunicom/unicom.xingxing.com.zone
$TTL 43200
@ IN SOA dns.xingxing.com. root (
2
1H
10M
7D
1D)
@ IN NS dns
@ IN MX 10 mail
dns IN A 192.168.1.5
mail IN A 192.168.1.5
na IN A 192.161.14.3
3- 启用dnsLog日志
vim /etc/named.conf
options {
querylog yes;
}
测试
dig -t A na.xingxing.com @192.168.1.5
6 21:57:37 nagios named[16147]: client 192.168.1.3#33698: view telecom: query: na.xingxing.com IN A + (192.168.1.5)
16 21:58:21 nagios named[16147]: client 192.161.14.3#47972: view unicom: query: na.xingxing.com IN A + (192.161.14.5)
vim /etc/named.conf
logging {
channel querylog {
file "/var/log/named/bind_query.log" versions 5 size 10M; //模式为file,名称为log.msgs,保存3个版本,大小为10k滚动
severity dynamic; //日志级别
print-time yes;//打印时间
print-category yes;//打印种类
print-severity yes;//打印级别
};
channel my_syslog {
syslog local0;
severity info;
};
category queries { querylog; };//查询日志
category xfer-out { my_file; };//传输出去日志 dig -t axfs xingxing.com @192.168.1.1
category update { my_syslog; };
};
queryperf :压力测试
tar -zxvf bind-9.11.0.tgz
cd bind-9.11.0/contrib
./configure
make
vi test
ns.xingxing.com A
xingxing.com NS
nagios.xingxing.com A
queryperf -d test -s 192.168.1.5
DNS Query Performance Testing Tool
Version: $Id: queryperf.c,v 1.12 2007/09/05 07:36:04 marka Exp $
[Status] Processing input data
[Status] Sending queries (beginning with 192.168.1.5)
[Status] Testing complete
Statistics:
Parse input file: once
Ended due to: reaching end of file
Queries sent: 3 queries
Queries completed: 3 queries
Queries lost: 0 queries
Queries delayed(?): 0 queries
RTT max: 0.002752 sec
RTT min: 0.002543 sec
RTT average: 0.002648 sec
RTT std deviation: 0.000082 sec
RTT out of range: 0 queries
Percentage completed: 100.00%
Percentage lost: 0.00%
Started at: Sun Oct 16 23:34:52 2016
Finished at: Sun Oct 16 23:34:52 2016
Ran for: 0.002870 seconds
Queries per second: 1045.296167 qps
安装dnstop
dnstop -4 -Q -R eth0
DNS视图以及日志压力测试的更多相关文章
- DNS主从服务,子域授权,view视图,日志系统,压力测试
DNS主从服务,子域授权,view视图,日志系统,压力测试 DNS性能测试工具queryperfDNS查询过程: DNS主从建立: 环境: 主服务器:10.140.165.93 从服务器:10.140 ...
- DNS视图及压力测试(四)
Bind安全控制选项 Allow-transfer {}; #用于控制区域传送文件 Allow-query {}; #通常用于服务器是缓存名称服务器时,控制查询客户端 Allow-recursion ...
- 使用queryperf对DNS服务器作压力测试
一.querperf简介 当我们把DNS服务器配置好后,我们肯定会想测试一下DNS服务器的性能如何,上线后如果请求数够多服务器还能否响应?于是,我们可以使用软件模拟环境,对DNS服务器作评估性的测试. ...
- Android APP压力测试(三)之Monkey日志自动分析脚本
Android APP压力测试(三) 之Monkey日志自动分析脚本 前言 上次说要分享Monkey日志的分析脚本,这次贴出来分享一下,废话不多说,请看正文. [目录] 1.Monkey日志分析脚本 ...
- DNS压力测试工具dnsperf简介
dnsperf是我最近写的一个开源的DNS压力测试工具,用户可以用它来对DNS服务器或者Local DNS做压力测试.dnsperf目前的实现是单进程模式,通过epoll非阻塞地处理网络事件. dns ...
- 山东BOSS性能压力测试
1. 概述 在山东BOSS性能压力测试过程中,发现脚本对于整个压力测试过程的重要性,一个压力测试脚本录制和编辑修改得怎么样直接影响后面压力测试的执行.通常情况下,脚本应尽可能的精简,就像写代码一样.针 ...
- 使用Microsoft Web Application Stress Tool对web进行压力测试
Web压力测试是目前比较流行的话题,利用Web压力测试可以有效地测试一些Web服务器的运行状态和响应时间等等,对于Web服务器的承受力测试是个非常好的手法.Web 压力测试通常是利用一些工具,例如微软 ...
- Web Capacity Analysis Tool 压力测试工具使用笔记
一.背景介绍 Web Capacity Analysis Tool是微软轻量级Web压力测试工具, 早先是IIS 6.0Resource Tool kit 工具包中的一个组件,现在独立出来有一个社区版 ...
- (转)使用Microsoft Web Application Stress Tool对web进行压力测试
http://www.blogjava.net/crespochen/archive/2009/06/02/279538.html Web压力测试是目前比较流行的话题,利用Web压力测试可以有效地测试 ...
随机推荐
- Node.js学习
1. 下载 网址:https://nodejs.org/download/ 2. 添加express框架 如下图,运行Node.js command prompt 在命令行中输入:npm instal ...
- OpenResty 简单编写一个Module
使用 Lua module 来进行 Lua 代码的复用是推荐的做法.然后在用户代码中直接用require()来调用 module代码: local myTest = {} function myTes ...
- 为OpenResty增加nginx_upload_module模块
1.下载 http://www.grid.net.ru/nginx/download/nginx_upload_module-2.2.0.tar.gz 或 http://pan.baidu.com/s ...
- Codeforces Round #216 (Div. 2) B. Valera and Contest
#include <iostream> #include <algorithm> #include <vector> using namespace std; in ...
- ACM: I Hate It 解题报告 - 线段树
I Hate It Time Limit:3000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Des ...
- 5分钟windows wamp php安装phpunit 2015最新安装实践
16:11 2015/11/235分钟windows wamp php安装phpunit 2015最新安装实践我花了一个下午和一个上午的时间注意:步骤中添加环境变量多的时候要保存很多步,知道窗口都自动 ...
- 【BZOJ】3052: [wc2013]糖果公园
http://www.lydsy.com/JudgeOnline/problem.php?id=3052 题意:n个带颜色的点(m种),q次询问,每次询问x到y的路径上sum{w[次数]*v[颜色]} ...
- 【HDU】1846 Brave Game
http://acm.hdu.edu.cn/showproblem.php?pid=1846 题意:二人博弈,1堆石子每次取1~m个,没有石子可取的输,输出先手胜利还是后手胜利. #include & ...
- CSS:z-index层级在IE中无效
引用地址:http://apps.hi.baidu.com/share/detail/19853262 在CSS中,只能通过代码改变层级,这个属性就是z-index,要让z-index起作用有个小小前 ...
- 【BZOJ1088】[SCOI2005]扫雷Mine 递推
调LCT奔溃,刷水调节一下. #include <iostream> #include <cstdio> #include <cstring> using name ...