找回密码
 注册
查看: 2270|回复: 1

域名解析的问题

[复制链接]
发表于 2006-11-8 18:15:27 | 显示全部楼层 |阅读模式
我用 Sarge  linux准备做一个动态域名解析。我设完了以后,发现出了用本系统可以 ping得到
比如我 作了 2个
ubu.home 192.168.11.13 (本机)
winxp.home 192.168.11.15
就能够ping的到。
但是我从 192.168.11.15就没有办法找到任何一个,系统反映无法解析域名。
我修改的文件包括
hosts
resolv.conf
named.conf
还有哪些 /var/cache/bind/下面的配置文件

hosts
[code:1]
127.0.0.1       localhost

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
192.168.11.13   debian.home     debian
192.168.11.2    workunit.home   debian
192.168.11.15   wintest.home    debian
[/code:1]

resolv.conf
[code:1]domain home.
nameserver 192.168.11.13
[/code:1]

named.conf
[code:1]
include "/etc/bind/named.conf.options";

// prime the server with knowledge of the root servers
zone "." {
        type hint;
        file "/etc/bind/db.root";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
        type master;
        file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
        type master;
        file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
        type master;
        file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
        type master;
        file "/etc/bind/db.255";
};

include "/etc/bind/named.conf.local";

zone "home" {
        type master;
        file "/var/cache/bind/home.hosts";
};

zone "11.168.192.in-addr.arpa" {
        type master;
        file "/var/cache/bind/192.168.11.rev";
};
[/code:1]

在 var/cache/bind 下的 192.168.11。rev
[code:1]
$ttl 38400
11.168.192.in-addr.arpa. IN SOA debian.home. root.debian.home. (
1039102453
10800
3600
604800
38400 )
11.168.192.in-addr.arpa. IN NS debian.home.
2.11.168.192.in-addr.arpa. IN PTR workunit.home.
15.11.168.192.in-addr.arpa. IN PTR wintest.home.
13.11.168.192.in-addr.arpa. IN PTR debian.home.
[/code:1]

home.hosts
[code:1]
$ttl 38400
home.   IN SOA debian.home. root.debian.home. (
        1039102090
        10800
        3600
        604800
        38400 )
home. IN NS debian home.
debian.home. IN A 192.168.11.13
workunit.home. IN A 192.168.11.2
wintest.home. IN A 192.168.11.15
[/code:1]
我用的是 bind 9
发表于 2006-11-23 11:01:59 | 显示全部楼层
似乎你对架设dns的基本知识都没有搞清楚。
/etc/hosts是绝对不要加[IP:主机]对应条目的。(用hosts就不会解析dns了)
判断是否解析成功用dig命令!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2025-7-17 21:02 , Processed in 0.037300 second(s), 16 queries .

© 2001-2025 Discuz! Team. Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表