jiaoyj 发表于 2006-11-8 18:15:27

域名解析的问题

我用 Sargelinux准备做一个动态域名解析。我设完了以后,发现出了用本系统可以 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

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


resolv.conf
domain home.
nameserver 192.168.11.13


named.conf

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";
};


在 var/cache/bind 下的 192.168.11。rev

$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.


home.hosts

$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

我用的是 bind 9

会游泳的鱼 发表于 2006-11-23 11:01:59

似乎你对架设dns的基本知识都没有搞清楚。
/etc/hosts是绝对不要加对应条目的。(用hosts就不会解析dns了)
判断是否解析成功用dig命令!
页: [1]
查看完整版本: 域名解析的问题