当前位置: 技术问答>linux和unix
DNS服务器端可以使用DNS服务,但客户端无法使用
来源: 互联网 发布时间:2015-10-07
本文导语: DNS服务器运行在192.168.1.21上,在192.168.1.21上可以使用DNS服务,比如: [root@atslxt001 named]# nslookup atslxt002 Server: 192.168.1.21 Address: 192.168.1.21#53 Name: atslxt002.tcs.com Address: 192.168.1.22 但是从客户...
DNS服务器运行在192.168.1.21上,在192.168.1.21上可以使用DNS服务,比如:
[root@atslxt001 named]# nslookup atslxt002
Server: 192.168.1.21
Address: 192.168.1.21#53
Name: atslxt002.tcs.com
Address: 192.168.1.22
但是从客户端atslxt002却无法使用DNS服务,比如:
[root@atslxt002 ~]# nslookup atslxt002
;; connection timed out; no servers could be reached
[root@atslxt002 ~]# nslookup atslxt001
;; connection timed out; no servers could be reached
客户端atslxt002上面的配置为:
[root@atslxt002 ~]# more /etc/resolv.conf
search tcs.com
nameserver 192.168.1.21
[root@atslxt002 ~]# ping 192.168.1.21
PING 192.168.1.21 (192.168.1.21) 56(84) bytes of data.
64 bytes from 192.168.1.21: icmp_seq=0 ttl=64 time=0.322 ms
64 bytes from 192.168.1.21: icmp_seq=1 ttl=64 time=0.296 ms
64 bytes from 192.168.1.21: icmp_seq=2 ttl=64 time=0.288 ms
--- 192.168.1.21 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.288/0.302/0.322/0.014 ms, pipe 2
[root@atslxt002 ~]# more /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=atslxt002.tcs.com
[root@atslxt002 ~]# more /etc/sysconfig/networking/devices/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.168.1.22
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
IPV6INIT=no
高手,请问是什么原因?
[root@atslxt001 named]# nslookup atslxt002
Server: 192.168.1.21
Address: 192.168.1.21#53
Name: atslxt002.tcs.com
Address: 192.168.1.22
但是从客户端atslxt002却无法使用DNS服务,比如:
[root@atslxt002 ~]# nslookup atslxt002
;; connection timed out; no servers could be reached
[root@atslxt002 ~]# nslookup atslxt001
;; connection timed out; no servers could be reached
客户端atslxt002上面的配置为:
[root@atslxt002 ~]# more /etc/resolv.conf
search tcs.com
nameserver 192.168.1.21
[root@atslxt002 ~]# ping 192.168.1.21
PING 192.168.1.21 (192.168.1.21) 56(84) bytes of data.
64 bytes from 192.168.1.21: icmp_seq=0 ttl=64 time=0.322 ms
64 bytes from 192.168.1.21: icmp_seq=1 ttl=64 time=0.296 ms
64 bytes from 192.168.1.21: icmp_seq=2 ttl=64 time=0.288 ms
--- 192.168.1.21 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.288/0.302/0.322/0.014 ms, pipe 2
[root@atslxt002 ~]# more /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=atslxt002.tcs.com
[root@atslxt002 ~]# more /etc/sysconfig/networking/devices/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
IPADDR=192.168.1.22
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
IPV6INIT=no
高手,请问是什么原因?
|
防火墙允许外部机器访问dns服务吗,应该是它的问题
|
nslookup 192.168.1.21
不要用名字,名字在没从DNS或HOSTS中取到之前,地址根本解不出来
不要用名字,名字在没从DNS或HOSTS中取到之前,地址根本解不出来