免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1388 | 回复: 1
打印 上一主题 下一主题

[系统管理] 50元求最简单的dns配置,搞不定,已经在猪八戒网上发布,请大家赐教,给我可用的文件 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-09-16 09:15 |只看该作者 |倒序浏览
猪八戒网上的地址是: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

论坛徽章:
0
2 [报告]
发表于 2012-09-16 10:34 |只看该作者
                          
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP