Difference between revisions of "Testing the DNS Name Resolution"

m (Mmuehlfeld moved page Testing DNS Name Resolution to Testing the DNS Name Resolution without leaving a redirect: Fix title)
(Rewrote page)
Line 1: Line 1:
On Windows and *nix, you can use „nslookup“ to test if your computer can resolve records by using your DNS. Try resolving the name of your Domain Controller into its IP:
+
= Introduction =
 +
 
 +
To verify that your DNS settings are correct and your client or server is able to resolve IP addresses and host names use the "nslookup" command. The command is available on Linux and Windows.
 +
 
 +
 
 +
 
 +
 
 +
 
 +
= Forward Lookup =
 +
 
 +
To resolve a host name its IP address:
  
 
  # nslookup DC1.samdom.example.com
 
  # nslookup DC1.samdom.example.com
  Server:        192.168.1.1
+
  Server:        10.99.0.1
  Address:        192.168.1.1#53
+
  Address:        10.99.0.1#53
 
   
 
   
 
  Name:  DC1.samdom.example.com
 
  Name:  DC1.samdom.example.com
  Address: 192.168.1.1
+
  Address: 10.99.0.1
 +
 
 +
 
 +
 
  
Nslookup will show you, which server was asked (192.168.1.1) and the result of your query (DC1.samdom.example.com has IP 192.168.1.1)
 
  
To query a SVR record, you have to start nslookup and set the type to „SRV“, to retrieve the values (works on Windows and *nix):
+
= Reverse Lookup =
 +
 
 +
To resolve a IP address to its host name:
 +
 
 +
# nslookup 10.99.0.1
 +
Server:        10.99.0.1
 +
Address: 10.99.0.1#53
 +
 +
1.0.99.10.in-addr.arpa name = DC1.samdom.example.com.
 +
 
 +
Note that in a Samba AD, the reverse zone is not automatically configured. To set up a reverse zone, see [[DNS_Administration|DNS Administration]].
 +
 
 +
 
 +
 
 +
 
 +
 
 +
= Resolving SRV Records =
 +
 
 +
Active Directory (AD) uses SRV records to locate services, such as Kerberos and LDAP. To verify that SRV records are resolved correctly, use the "nslookup" interactive shell:
  
 
  # nslookup
 
  # nslookup
  Default Server:  UnKnown
+
  Default Server:  10.99.0.1
  Address:  192.168.1.1
+
  Address:  10.99.0.1
 
   
 
   
 
  > set type=SRV
 
  > set type=SRV
 
  > _ldap._tcp.samdom.example.com.
 
  > _ldap._tcp.samdom.example.com.
 
  Server:  UnKnown
 
  Server:  UnKnown
  Address:  192.168.1.1
+
  Address:  10.99.0.1
 
   
 
   
 
  _ldap._tcp.samdom.example.com  SRV service location:
 
  _ldap._tcp.samdom.example.com  SRV service location:
Line 27: Line 57:
 
           svr hostname  = dc1.samdom.example.com
 
           svr hostname  = dc1.samdom.example.com
 
  samdom.example.com      nameserver = dc1.samdom.example.com
 
  samdom.example.com      nameserver = dc1.samdom.example.com
  dc1.samdom.example.com  internet address = 192.168.1.1  
+
  dc1.samdom.example.com  internet address = 10.99.0.1  
  
If your query can't be answered, because it doesn't exist, you'll receive
+
 
 +
 
 +
 
 +
 
 +
= Error Messages =
 +
 
 +
* The DNS server is not able to resolve the host name:
  
 
  ** server can't find DC1.samdom.example.com: NXDOMAIN
 
  ** server can't find DC1.samdom.example.com: NXDOMAIN
  
If you query a none existing DNS server, it would result in
+
* The DNS server is not able to resolve the IP address:
 +
 
 +
** server can't find 1.0.99.10.in-addr.arpa: NXDOMAIN
 +
 
 +
* The DNS server used is not available:
  
 
  ;; connection timed out; no servers could be reached
 
  ;; connection timed out; no servers could be reached

Revision as of 03:43, 25 September 2016

Introduction

To verify that your DNS settings are correct and your client or server is able to resolve IP addresses and host names use the "nslookup" command. The command is available on Linux and Windows.



Forward Lookup

To resolve a host name its IP address:

# nslookup DC1.samdom.example.com
Server:         10.99.0.1
Address:        10.99.0.1#53

Name:   DC1.samdom.example.com
Address: 10.99.0.1



Reverse Lookup

To resolve a IP address to its host name:

# nslookup 10.99.0.1
Server:        10.99.0.1
Address:	10.99.0.1#53

1.0.99.10.in-addr.arpa	name = DC1.samdom.example.com.

Note that in a Samba AD, the reverse zone is not automatically configured. To set up a reverse zone, see DNS Administration.



Resolving SRV Records

Active Directory (AD) uses SRV records to locate services, such as Kerberos and LDAP. To verify that SRV records are resolved correctly, use the "nslookup" interactive shell:

# nslookup
Default Server:  10.99.0.1
Address:  10.99.0.1

> set type=SRV
> _ldap._tcp.samdom.example.com.
Server:  UnKnown
Address:  10.99.0.1

_ldap._tcp.samdom.example.com   SRV service location:
          priority       = 0
          weight         = 100
          port           = 389
          svr hostname   = dc1.samdom.example.com
samdom.example.com      nameserver = dc1.samdom.example.com
dc1.samdom.example.com  internet address = 10.99.0.1 



Error Messages

  • The DNS server is not able to resolve the host name:
** server can't find DC1.samdom.example.com: NXDOMAIN
  • The DNS server is not able to resolve the IP address:
** server can't find 1.0.99.10.in-addr.arpa: NXDOMAIN
  • The DNS server used is not available:
;; connection timed out; no servers could be reached