- 论坛徽章:
- 0
|
我以前在RHEL3中配置DNS没问题,但在换成RHEL4后怎么配也不行了,百思不得其解。以下是我的所有配置,有请大虾指点。谢谢!
[root@ns rhel4]# rpm -qa | grep bind
bind-9.2.4-2
bind-utils-9.2.4-2
bind-libs-9.2.4-2
ypbind-1.17.2-3
bind-chroot-9.2.4-2
#ip ad sh
1: lo: <LOOPBACK,UP>; mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP>; mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:e0:4c:71:8c:fd brd ff:ff:ff:ff:ff:ff
inet 192.168.0.1/24 brd 192.168.0.255 scope global eth0
inet6 fe80::2e0:4cff:fe71:8cfd/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP>; mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:e0:4c:b0:60:bf brd ff:ff:ff:ff:ff:ff
inet 192.168.2.1/24 brd 192.168.2.255 scope global eth1
inet6 fe80::2e0:4cff:feb0:60bf/64 scope link
valid_lft forever preferred_lft forever
4: eth2: <BROADCAST,MULTICAST,UP>; mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:0d:61:96:b5:6d brd ff:ff:ff:ff:ff:ff
inet6 fe80::20d:61ff:fe96:b56d/64 scope link
valid_lft forever preferred_lft forever
5: sit0: <NOARP>; mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0
6: ppp0: < OINTOPOINT,MULTICAST,NOARP,UP>; mtu 1492 qdisc pfifo_fast qlen 3
link/ppp
inet 59.191.11.79 peer 61.237.135.1/32 scope global ppp0
[root@ns rhel4]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 ns.yjr.cc ns localhost.localdomain localhost
[root@ns rhel4]# cat /etc/host.conf
order hosts,bind
multi on
nospoof on
[root@ns rhel4]# cat /etc/resolv.conf
nameserver 192.168.0.1
domain yjr.cc
search yjr.cc
#cat /etc/named.conf
zone "yjr.cc" IN {
type master;
notify yes;
file "yjr.cc.zone";
};
zone "0.168.192.in-addr.arpa" IN {
type master;
notify yes;
file "192.168.0.rev";
};
[root@ns rhel4]# cat /var/named/yjr.cc.zone
$TTL 86400
@ IN SOA ns.yjr.cc. root.ns.yjr.cc. (
1053892104
3H
15M
1W
1D )
IN NS ns.yjr.cc.
www IN A 192.168.0.2
ns IN A 192.168.0.1
[root@ns rhel4]# cat /var/named/192.168.0.rev
$TTL 86400
@ IN SOA ns.yjr.cc. root.ns.yjr.cc. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS ns.yjr.cc.
1 IN PTR ns.yjr.cc.
[root@ns rhel4]# /etc/rc.d/init.d/named restart
Stopping named: [ OK ]
Starting named: [ OK ]
[root@ns rhel4]# host www.yjr.cc 127.0.0.1
Using domain server:
Name: 127.0.0.1
Address: 127.0.0.1#53
Aliases:
Host www.yjr.cc not found: 2(SERVFAIL)
完 |
|