LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 465|回复: 1

做了几天FC3下DNS,总是出错,哪位做过帮帮我!!!代码在里面!!!

[复制链接]
发表于 2006-4-8 12:27:47 | 显示全部楼层 |阅读模式
[root@why ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:A1:B0:0A:31:F4
          inet addr:192.168.1.200  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::2a1:b0ff:fe0a:31f4/64 Scopeink
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:669 errors:0 dropped:0 overruns:0 frame:0
          TX packets:703 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:136420 (133.2 KiB)  TX bytes:55240 (53.9 KiB)
          Interrupt:9 Base address:0xcc00

lo        Link encapocal Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2343 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2343 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2975378 (2.8 MiB)  TX bytes:2975378 (2.8 MiB)

ppp0      Link encapoint-to-Point Protocol
          inet addr:222.130.215.99  P-t-P:61.148.2.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:153 errors:0 dropped:0 overruns:0 frame:0
          TX packets:167 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:101993 (99.6 KiB)  TX bytes:18295 (17.8 KiB)

[root@why ~]# cat /etc/named.conf
//
// named.conf for Red Hat caching-nameserver
//

options {
        directory "/var/named";
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
         // query-source address * port 53;
};

//
// a caching only nameserver config
//
controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

zone "." IN {
        type hint;
        file "named.ca";
};

zone "localdomain" IN {
        type master;
        file "localdomain.zone";
        allow-update { none; };
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};
zone "jamond.net"IN{
      type master;
      file "jamond.net";
      allow-update {none;};
};
zone "1.168.192.in-addr.arpa"IN{
      type master;
      file "192.168.1.rev";
      allow-update {none;};
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;
        file "named.ip6.local";
        allow-update { none; };
};

zone "255.in-addr.arpa" IN {
        type master;
        file "named.broadcast";
        allow-update { none; };
};

zone "0.in-addr.arpa" IN {
        type master;
        file "named.zero";
        allow-update { none; };
};

include "/etc/rndc.key";
[root@why ~]# cat /var/named/jamond.net
$TTL 86400
@               IN SOA       why.jamond.net.   root.why.jamond.net.(
                                        1053891162
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum

                IN NS           why.jamond.net.
                IN MX           5     why.jamond.net.
why             IN A            192.168.1.200
win01           IN A            192.168.1.201
win02           IN A            192.168.1.88
www             IN CNAME        why.jamond.net.


[root@why ~]# cat /var/named/192.168.1.rev
$TTL 86400
@            IN     SOA  why.jamond.net.    root.why.jamond.net.
                    (
                    1053892104
                    1053892104
                    3H
                    15W
                    1W
                    1D  )

             IN     NS   why.jamond.net.
200          IN     PTR  why.jamond.net.
201          IN     PTR  win01.jamond.net.
88           IN     PTR  win02.jamond.net.

[root@why ~]# cat /etc/re
readahead.early.files  redhat-lsb/            resolv.conf
readahead.files        redhat-release         resolv.conf.bak
[root@why ~]# cat /etc/resolv.conf

nameserver 192.168.1.200
nameserver 202.106.46.151
search jamond.net
[root@why ~]# host why.jamond.net
Host why.jamond.net not found: 2(SERVFAIL)
[root@why ~]# host 192.168.1.200
Host 200.1.168.192.in-addr.arpa not found: 2(SERVFAIL)
[root@why ~]# ping why.jamond.net
ping: unknown host why.jamond.net

[root@why ~]# ping why.jamond.net.hosts
PING why.jamond.net.hosts (192.168.1.200) 56(84) bytes of data.
64 bytes from why.jamond.net.hosts (192.168.1.200): icmp_seq=0 ttl=64 time=0.098 ms
64 bytes from why.jamond.net.hosts (192.168.1.200): icmp_seq=1 ttl=64 time=0.094 ms

--- why.jamond.net.hosts ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.094/0.096/0.098/0.002 ms, pipe 2
我哪里有问题呢? 为什么PING why.jamond.net.hosts就能通呢.ping why.jamond.net就不行呢
我的机器上一个网卡配置上面有,做了几天了都没个结果.
还有谁知道我的ADSL动态获取IP的,每次启机IP都变,我要做FTP的用什么办法解决这个问题 ..
发表于 2006-4-8 14:54:52 | 显示全部楼层
Post by wuhaoyang
[root@why ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:A1:B0:0A:31:F4
          inet addr:192.168.1.200  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::2a1:b0ff:fe0a:31f4/64 Scopeink
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:669 errors:0 dropped:0 overruns:0 frame:0
          TX packets:703 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:136420 (133.2 KiB)  TX bytes:55240 (53.9 KiB)
          Interrupt:9 Base address:0xcc00

lo        Link encapocal Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2343 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2343 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2975378 (2.8 MiB)  TX bytes:2975378 (2.8 MiB)

ppp0      Link encapoint-to-Point Protocol
          inet addr:222.130.215.99  P-t-P:61.148.2.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:153 errors:0 dropped:0 overruns:0 frame:0
          TX packets:167 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:101993 (99.6 KiB)  TX bytes:18295 (17.8 KiB)

[root@why ~]# cat /etc/named.conf
//
// named.conf for Red Hat caching-nameserver
//

options {
        directory "/var/named";
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        /*
         * If there is a firewall between you and nameservers you want
         * to talk to, you might need to uncomment the query-source
         * directive below.  Previous versions of BIND always asked
         * questions using port 53, but BIND 8.1 uses an unprivileged
         * port by default.
         */
         // query-source address * port 53;
};

//
// a caching only nameserver config
//
controls {
        inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

zone "." IN {
        type hint;
        file "named.ca";
};

zone "localdomain" IN {
        type master;
        file "localdomain.zone";
        allow-update { none; };
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};
zone "jamond.net"IN{
      type master;
      file "jamond.net";
      allow-update {none;};
};
zone "1.168.192.in-addr.arpa"IN{
      type master;
      file "192.168.1.rev";
      allow-update {none;};
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;
        file "named.ip6.local";
        allow-update { none; };
};

zone "255.in-addr.arpa" IN {
        type master;
        file "named.broadcast";
        allow-update { none; };
};

zone "0.in-addr.arpa" IN {
        type master;
        file "named.zero";
        allow-update { none; };
};

include "/etc/rndc.key";
[root@why ~]# cat /var/named/jamond.net
$TTL 86400
@               IN SOA       why.jamond.net.   root.why.jamond.net.(
                                        1053891162
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum

                IN NS           why.jamond.net.
                IN MX           5     why.jamond.net.
why             IN A            192.168.1.200
win01           IN A            192.168.1.201
win02           IN A            192.168.1.88
www             IN CNAME        why.jamond.net.


[root@why ~]# cat /var/named/192.168.1.rev
$TTL 86400
@            IN     SOA  why.jamond.net.    root.why.jamond.net.
                    (
                    1053892104
                    1053892104
                    3H
                    15W
                    1W
                    1D  )

             IN     NS   why.jamond.net.
200          IN     PTR  why.jamond.net.
201          IN     PTR  win01.jamond.net.
88           IN     PTR  win02.jamond.net.

[root@why ~]# cat /etc/re
readahead.early.files  redhat-lsb/            resolv.conf
readahead.files        redhat-release         resolv.conf.bak
[root@why ~]# cat /etc/resolv.conf

nameserver 192.168.1.200
nameserver 202.106.46.151
search jamond.net
[root@why ~]# host why.jamond.net
Host why.jamond.net not found: 2(SERVFAIL)
[root@why ~]# host 192.168.1.200
Host 200.1.168.192.in-addr.arpa not found: 2(SERVFAIL)
[root@why ~]# ping why.jamond.net
ping: unknown host why.jamond.net

[root@why ~]# ping why.jamond.net.hosts
PING why.jamond.net.hosts (192.168.1.200) 56(84) bytes of data.
64 bytes from why.jamond.net.hosts (192.168.1.200): icmp_seq=0 ttl=64 time=0.098 ms
64 bytes from why.jamond.net.hosts (192.168.1.200): icmp_seq=1 ttl=64 time=0.094 ms

--- why.jamond.net.hosts ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.094/0.096/0.098/0.002 ms, pipe 2
我哪里有问题呢? 为什么PING why.jamond.net.hosts就能通呢.ping why.jamond.net就不行呢
我的机器上一个网卡配置上面有,做了几天了都没个结果.
还有谁知道我的ADSL动态获取IP的,每次启机IP都变,我要做FTP的用什么办法解决这个问题 ..


I didn't read the other part, but this one is easy, go to 3322.org, apply an account, and you will get a dynamic dns name, they have a tool called ez-ipupdate, run this tool in your rc.local script
回复 支持 反对

使用道具 举报

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

本版积分规则

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