- 论坛徽章:
- 0
|
猪八戒网上的地址是:http://task.zhubajie.com/2027837,
需求详情:
一个虚拟机,linux as5系统,其中 一些文件如下:
[root@host1 named]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 host1.localdomain host1
::1 localhost6.localdomain6 localhost6
IP地址是192.168.4.111。
[root@host1 named]# service named status
number of zones: 6
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/1000
tcp clients: 0/100
server is up and running
named (pid 290 正在运行...
[root@host1 named]# cat /etc/resolv.conf
search grid.example.com example.com
nameserver 192.168.4.111
需要:能达到的效果是:
[root@rhel1 ~]# nslookup rhel-cluster-scan.grid.example.com
Server: 192.168.4.102
Address: 192.168.4.102#53
Name: rhel-cluster-scan.grid.example.com
Address: 192.168.4.151
Name: rhel-cluster-scan.grid.example.com
Address: 192.168.4.152
Name: rhel-cluster-scan.grid.example.com
Address: 192.168.4.150
即:域名rhel-cluster-scan.grid.example.com域名能被解析为3个不同的IP地址。
我已经建立了如下3个文件:
第一个:
[root@host1 named]# cat /etc/named.conf
zone "." IN {
type hint;
file "named.ca";
};
zone "4.168.192.in-addr.arpa." IN {#创建example.com的反向解析
type master;
file "192.168.4.db";
};
zone "example.com." IN {#创建example.com域
type master;
file "example.com.db";
};
第二个:
[root@host1 named]# cat /var/named/example.com.db
$TTL 1H
@ SOA host1.localdomain. root.host1.localdomain. ( 5
3H
1H
1W
1H )
NS host1.localdomain.
rhel-cluster-scan.grid IN 1H A 192.168.4.149
IN 1H A 192.168.4.150
IN 1H A 192.168.4.151
第三个:
[root@host1 named]# cat /var/named/192.168.4.db
$TTL 1H
@ SOA host1.localdomain.grid.example.com.
root.host1.localdomain.grid.example.com. ( 2
3H
1H
1W
1H )
NS host1.localdomain.grid.example.com.
149 PTR rhel-cluster-scan.grid.example.com.
150 PTR rhel-cluster-scan.grid.example.com.
151 PTR rhel-cluster-scan.grid.example.com.
为什么这3个文件,没有能够解析出来rhel-cluster-scan.grid.example.com的地址呢?
运行结果如下:
[root@host1 named]# nslookup rhel-cluster-scan.grid.example.com
;; connection timed out; no servers could be reached |
|