在局域网中有一台DNS服务器(运行BIND),对网内的机器进行域名解析,请问该如何设置这台服务器,使之在网内的客户机在该服务器上找不到DNS记录时自动到外网的DNS服务器上查找,不要告诉我在客户机上设置二个DNS服务器地址.
请老大们指教,谢谢!
| 阿骁 回复于:2003-01-13 10:12:55 |
| 如果你的dns配置好了,自动就会实现你要的功能啊! |
| torrent 回复于:2003-01-13 10:16:55 |
| 不是吧,楼上;应该是使用FORWORD命令来实现。 |
| 戈壁-胡杨 回复于:2003-01-13 10:27:43 |
| #vi/etc/named.conf options { directory "/var/named"; datasize 2098; forward only; forwarders { 99.11.33.44;#第二个解析主机 }; recursion no; transfers-in 10; transfers-per-ns 2; allow-transfer { 127.0.1.1/24; }; }; |
| 阿骁 回复于:2003-01-13 10:31:44 |
| 楼上的,如果使用了 forward 指令,那么dns收到用户的查询请求时并不在本机上进行查询解析,而是将查询请求转发到你指定的那台dns server上去! :) (不信,你可以查查bind 的用户手册!) |
| laoxia 回复于:2003-01-13 10:42:57 |
| [quote][b]下面引用由[u]阿骁[/u]在 [i]2003/01/13 10:31am[/i] 发表的内容:[/b] 楼上的,如果使用了 forward 指令,那么dns收到用户的查询请求时并不在本机上进行查询解析,而是将查询请求转发到你指定的那台dns server上去! :) (不信,你可以查查bind 的用户手册!) [/quote] 本域内的它还解析,超出本域的FORWARD到外边 |
| 阿骁 回复于:2003-01-13 10:49:03 |
| [quote][b]下面引用由[u]laoxia[/u]在 [i]2003/01/13 10:42am[/i] 发表的内容:[/b] 本域内的它还解析,超出本域的FORWARD到外边 [/quote] 对的! |
| hanccy 回复于:2003-01-13 10:59:17 |
| 是呀!是这样的!通过实践的!呵呵!阿骁知错了?^-^ |
| 阿骁 回复于:2003-01-13 11:01:40 |
| 呵呵 。。。 我是理解错了。 |
| hrcxf 回复于:2003-01-13 11:30:56 |
| A. 我们的机器环境: Solaris 8 sparc + Bind 8 (Solaris 8 附带) B. IP规划: domain: abc.com DNS Server: solaris8.abc.com 132.254.254.76 网段: 132.254.254.xxx umask 255.255.255.0 客户机器: RedHat 6.2 u2.abc.com 132.254.254.120 SCO unxi5.0.5 sco.abc.com 132.254.254.92 HP-UX 11.0 punk.abc.com 132.254.254.7 win98 kun.abc.com 132.254.254.70 C.配置文件 1.在Solaris8 上建立文件: (这个文件一般需要自己手工输入) /etc/named.conf // // BIND Version 8 configuration file. // options { directory "/etc/named.data"; //用户自己随便定义一个目录 dump-file "/etc/named.data/tmp/named_dump.db"; }; zone "abc.com" in { type master; file "db.abc.com"; }; zone "254.254.132.in-addr.arpa" in { type master; file "db.132.254.254"; }; zone "0.0.127.in-addr.arpa" in { type master; file "db.127.0.0"; }; zone "." in { type hint; file "db.cache"; }; // // // The following file contains real examples of how special BIND 8 // configurations can be created. These configurations will get // appended to the /etc/named.conf file after all of the standard // DNS entries are created. In most cases it will not be necessary // to add anything here, but if it is necessary, here are a couple // of examples. // // server 204.33.116.7 { // transfers 2; // }; // // topology { // 15/8; // 172.88/16; // }; // // 2.Solaris8 上注意修改这个文件/etc/nsswitch.conf # You must also set up the /etc/resolv.conf file for DNS name # server lookup. See resolv.conf(4). hosts: files dns #注意那个dns,必须有哦 3./etc/resolc.conf nameserver 132.254.254.76 #你的DNS server ip domain abc.com #默认的domain 4.编辑 /etc/named.data/127.0.0 @ IN SOA ns.abc.com. ben.abc.com. ( 2000091311 10800 3600 604800 864 00  ![]() IN NS ns.abc.com. IN NS u2.abc.com. 1 IN PTR localhost. 5.编辑 /etc/named.data/db.132.254.254 254.254.132.in-addr.arpa. IN SOA ns.abc.com. ben.abc.com. ( 2000091322 10800 3600 604800 86400  ![]() 254.254.132.in-addr.arpa. IN NS ns.abc.com. 254.254.132.in-addr.arpa. IN NS u2.abc.com. 76.254.254.132.in-addr.arpa. IN PTR solaris8.abc.com. 70.254.254.132.in-addr.arpa. IN PTR kun.abc.com. 77.254.254.132.in-addr.arpa. IN PTR punk.abc.com. 6.编辑 /etc/named.data/db.abc.com //From here.... abc.com.INSOA ns.abc.com. ben.abc.com. ( 2000091328 10800 3600 604800 86400  ![]() madebyunxiaid IN TXT "This map made by unixaid.net" //一个optional,可以不要 abc.com. IN NS ns.abc.com. abc.com. IN MX 20 solaris8.abc.com. localhost IN A 127.0.0.1 solaris8.abc.com. IN A 132.254.254.76 http://www.abc.com./ IN CNAME solaris8.abc.com. //CNAME代表这个是一个机器solaris8.abc.com的别名 kun.abc.com. IN A 132.254.254.70 linux.abc.com. IN CNAME U2.abc.com. ftp.abc.com. IN CNAME solaris8.abc.com. mail.abc.com. IN CNAME solaris8.abc.com. punk.abc.com. IN A 132.254.254.77 u2.abc.com. IN A 132.254.254.120 7.编辑 /etc/named.data/db.cache //From here.... ; This file holds the information on root name servers needed to ; initialize cache of Internet domain name servers ; (e.g. reference this file in the "cache . <file>" ; configuration file of BIND domain name servers). ; ; This file is made available by InterNIC registration services ; under anonymous FTP as ; file /domain/named.root ; on server FTP.RS.INTERNIC.NET ; -OR- under Gopher at RS.INTERNIC.NET ; under menu InterNIC Registration Services (NSI) ; submenu InterNIC Registration Archives ; file named.root ; ; last update: Aug 22, 1997 ; related version of root zone: 1997082200 ; ; ; formerly NS.INTERNIC.NET ; . 3600000 IN NS A.ROOT-SERVERS.NET. A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4 ; ; formerly NS1.ISI.EDU ; . 3600000 NS B.ROOT-SERVERS.NET. B.ROOT-SERVERS.NET. 3600000 A 128.9.0.107 ; ; formerly C.PSI.NET ; . 3600000 NS C.ROOT-SERVERS.NET. C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12 ; ; formerly TERP.UMD.EDU ; . 3600000 NS D.ROOT-SERVERS.NET. D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90 ; ; formerly NS.NASA.GOV ; . 3600000 NS E.ROOT-SERVERS.NET. E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10 ; ; formerly NS.ISC.ORG ; . 3600000 NS F.ROOT-SERVERS.NET. F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241 ; ; formerly NS.NIC.DDN.MIL ; . 3600000 NS G.ROOT-SERVERS.NET. G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4 ; ; formerly AOS.ARL.ARMY.MIL ; . 3600000 NS H.ROOT-SERVERS.NET. H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53 ;
本文关键:dns的问题,请教各位老大...
|


