- 论坛徽章:
- 0
|
请教各位网友!
我在CU,google和baidu 都搜索过了! 没有找到答案!
还请各位朋友帮帮忙!
谢谢.........
系统是刚装的,想学习学习! 所以,开始配置DNS Server! 结果..................
我的设置:
#cat /etc/named.conf
options {
directory "/var/named";
};
controls {
inet * port 52 allow { any; }; // a bad idea
unix "/var/run/ndc" perm 0600 owner 0 group 0; // the default
};
zone "." in {
type hint;
file "root.cache";
};
zone "abc.com" in {
type master;
file "db.abc.com";
};
zone "1.168.192.in-addr.arpa" in {
type master;
file "db.192.168.1";
masters { 10.0.0.53; };
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "loop.back";
};
#cat /etc/resolv.conf
domainname abc.com
name server 192.168.1.198
# cat /etc/defaultdomain
www.abc.com
# cat /etc/inet/hosts
#
# Internet host table
#
127.0.0.1 localhost
192.168.1.198 root www.abc.com
#cat /var/named/named.cache
;/var/named/root file for the one sub-domain server. This file should
; contain the name and IP address of the root (.) domain nameserver
;
. IN NS instructor.thirty.edu.
instructor.thirty.edu. IN A 192.168.30.30
;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 IN NS B.ROOT-SERVERS.NET.
B.ROOT-SERVERS.NET. 3600000 A 128.9.0.107
;
; formerly C.PSI.NET
;
. 3600000 IN NS C.ROOT-SERVERS.NET.
C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
< Part of file truncated >
; housed in Japan, operated by WIDE
;
. 3600000 IN NS M.ROOT-SERVERS.NET.
M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
;End of File
# cat /var/named/db.192.168.1
$TTL 8h
@ IN SOA www.abc.com. root.www.abc.com.(
20011229;
10800;
3600;
432000;
86400 );
IN NS www.abc.com.
198 IN PTR www.abc.com.
# cat /var/named/db.abc.com
$TTL 8h
@ IN SOA www.abc.com. root.www.abc.com.(
20011229;
10800;
3600;
691200;
86400 );
IN NS www.abc.com.
localhost IN A 127.0.0.1
www IN A 192.168.1.198
# cat /var/named/loop.back
$TTL 8h
@ IN SOA www.abc.com. root.www.abc.com. (
20011335;
10800;
3600;
43200;
3600 );
IN NS www.abc.com.
1 IN PTR localhost.
#vi /etc/nsswitch.conf
# /etc/nsswitch.files:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.
passwd: files
group: files
hosts: files dns
ipnodes: files
ping 自己和ping 网关都能通!
# ping 192.168.1.198
192.168.1.198 is alive
# ping 192.168.1.1
192.168.1.1 is alive
但是ping外网就不通!
# ping www.baidu.com
ping: unknown host www.baidu.com
# nslookup
*** Can't find server name for address 192.168.1.198: No response from server
*** Default servers are not available
希望各位朋友帮我看看,问题出在哪里!!
谢谢......................
忘记了:
# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.198 netmask ffffff00 broadcast 192.168.1.255
ether 0:50:56:c0:0:1
# netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
192.168.1.0 192.168.1.198 U 1 10 hme0
224.0.0.0 192.168.1.198 U 1 0 hme0
default 192.168.1.1 UG 1 0
127.0.0.1 127.0.0.1 UH 38 39954 lo0
#
# /usr/sbin/in.named start
can't open 'start'
# ps -ef | grep in.named
root 1041 836 0 13:54:55 pts/7 0:00 grep in.named
[ 本帖最后由 狼性领导原则 于 2006-8-10 11:34 编辑 ] |
|