- 论坛徽章:
- 0
|
[root@localhost root]# rpm -aq|grep bind
redhat-config-bind-1.9.0-13
bind-9.2.1-16
bind-utils-9.2.1-16
ypbind-1.11-4
[root@localhost root]# rpm -aq|grep caching-nameserver
caching-nameserver-7.2-7
[root@localhost etc]# vi named.conf
// generated by named-bootconf.pl
options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
#add by xjy 20060220
zone "cdfun.net" {
type master;
file "cdfun.net";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "1.168.192.in-addr.arpa";
};
include "/etc/rndc.key";
vi cdfun.net
$TTL 86400
cdfun.net. IN SOA localhost. root (
10 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expire
86400 ; ttl
)
cdfun.net. IN NS dns.cdfun.net.
dns IN A 192.168.1.68
gateway IN A 192.168.1.1
rh9 IN A 192.168.1.67
winxp1 IN A 192.168.1.167
[root@localhost named]# vi 1.168.192.in-addr.arpa
$TTL 86400
@ IN SOA localhost. root (
10 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expire
86400 ; ttl
)
@ IN NS dns.cdfun.net.
1 IN PTR gateway.cdfun.net.
68 IN PTR dns.cdfun.net.
67 IN PTR rh9.cdfun.net.
167 IN PTR winxp1.cdfun.net.
[root@localhost local]# rndc status
number of zones: 6
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
server is up and running
3台机器
dns:192.168.1.68
rh9:192.168.1.67
winxp1:192.168.1.167
192.168.1.167:
D:\>nslookup 192.168.1.167
*** Can't find server name for address 192.168.1.68: No response from server
Server: ns.ahhfptt.net.cn
Address: 202.102.192.68
*** ns.ahhfptt.net.cn can't find 192.168.1.167: Non-existent domain
192.168.16.67:
[root@localhost root]# host 192.168.1.67
Host 67.1.168.192.in-addr.arpa not found: 2(SERVFAIL)
[root@localhost root]# host rh9
Host rh9 not found: 3(NXDOMAIN)
[ 本帖最后由 xy-coordinate 于 2006-2-21 08:47 编辑 ] |
|