Page 3 of 6
Is DNS working?
Once you have
confirmed that you can speak to the gateway, the next thing to test is whether
DNS functions. Both the nslookup and dig tools can be
used to troubleshoot DNS issues, but since you need to perform only basic
testing at this point, just use nslookup to see if you can resolve web1 into an
IP:
$ nslookup web1
Server: 10.1.1.3
Address: 10.1.1.3#53
Name: web1.example.net
Address: 10.1.2.5
In this example DNS
is working. The web1 host expands into web1.example.net and resolves to the
address 10.1.2.5. Of course, make sure that this IP matches the IP that web1 is
supposed to have! In this case, DNS works, so we can move on to the next section;
however, there are also a number of ways DNS could fail.
No name server
configured or inaccessible name server
If you see the
following error, it could mean either that you have no name servers configured
for your host or they are inaccessible:
$ nslookup web1
;; connection timed out; no servers
could be reached
In either case you
will need to inspect /etc/resolv.conf and see if any name servers are
configured there. If you don't see any IP addresses configured there, you will
need to add a name server to the file. Otherwise, if you see something like the
following, you need to start troubleshooting your connection with your name
server, starting off with ping:
search example.net nameserver 10.1.1.3
If you can't ping the
name server and its IP address is in the same subnet (in this case, 10.1.1.3 is
within the subnet), the name server itself could be completely down. If you
can't ping the name server and its IP address is in a different subnet, then
skip ahead to the Can I route to the remote host?section, but
only apply those troubleshooting steps to the name server's IP. If you can ping
the name server but it isn't responding, skip ahead to the Is the remote port open? section.
Missing search path
or name server problem
It is also possible
that you will get the following error for your nslookup command:
$ nslookup web1
Server: 10.1.1.3
Address: 10.1.1.3#53
** server can't find web1: NXDOMAIN
Here you see that the
server did respond, since it gave a response: server can't find web1. This could
mean two different things. One, it could mean that web1's domain name is not in
your DNS search path. This is set in /etc/resolv.conf in the line that begins
with search. A good way to test this is to perform the same nslookup command,
only use the fully qualified domain name (in this case, web1.example.net). If
it does resolve, then either always use the fully qualified domain name, or if
you want to be able to use just the hostname, add the domain name to the search
path in /etc/resolv.conf.
If even the fully
qualified domain name doesn't resolve, then the problem is on the name server.
Here are some basic pointers for troubleshooting DNS issues. If the name server
is supposed to have that record, then that zone's configuration needs to be
examined. If it is a recursive name server, then you will have to test whether
or not recursion is working on the name server by looking up some other domain.
If you can look up other domains, then you must check if the problem is on the
remote name server that does contain the zones.
No comments:
Post a Comment
Thank You:)