Testing the DNS Name Resolution: Difference between revisions
From SambaWiki
Mmuehlfeld (talk | contribs) (Rewrote page) |
m (→Forward Lookup) |
||
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> |
|||
= Introduction = |
= Introduction = |
||
</noinclude> |
|||
To verify that your DNS settings are correct and your client or server is able to resolve IP addresses and host names use the |
To verify that your DNS settings are correct and your client or server is able to resolve IP addresses and host names use the <code>nslookup</code> or <code>host</code> commands. The <code>nslookup</code> command is available on Linux and Windows. |
||
⚫ | |||
⚫ | |||
To resolve a host name its IP address: |
To resolve a host name its IP address: |
||
Line 18: | Line 16: | ||
Address: 10.99.0.1 |
Address: 10.99.0.1 |
||
alternatively you can use the <code>host</code> command: |
|||
# host DC1.samdom.example.com |
|||
⚫ | |||
⚫ | |||
⚫ | |||
To resolve a IP address to its host name: |
To resolve a IP address to its host name: |
||
Line 32: | Line 31: | ||
1.0.99.10.in-addr.arpa name = DC1.samdom.example.com. |
1.0.99.10.in-addr.arpa name = DC1.samdom.example.com. |
||
or |
|||
⚫ | |||
⚫ | |||
1.0.99.10.in-addr.arpa domain name pointer DC1.samdom.example.com |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
Default Server: 10.99.0.1 |
|||
⚫ | |||
> set type=SRV |
> set type=SRV |
||
> _ldap._tcp.samdom.example.com |
> _ldap._tcp.samdom.example.com |
||
Server: |
Server: 192.168.0.4 |
||
Address: |
Address: 192.168.0.4#53 |
||
_ldap._tcp.samdom.example.com |
_ldap._tcp.samdom.example.com service = 0 100 389 dc2.samdom.example.com. |
||
⚫ | |||
priority = 0 |
|||
> exit |
|||
weight = 100 |
|||
port = 389 |
|||
svr hostname = dc1.samdom.example.com |
|||
⚫ | |||
⚫ | |||
or |
|||
$ host -t SRV _ldap._tcp.samdom.example.com |
|||
_ldap._tcp.samdom.example.com has SRV record 0 100 389 dc1.samdom.example.com. |
|||
_ldap._tcp.samdom.example.com has SRV record 0 100 389 dc2.samdom.example.com. |
|||
= Error Messages = |
== Error Messages == |
||
* The DNS server is not able to resolve the host name: |
* The DNS server is not able to resolve the host name: |
Latest revision as of 12:11, 6 March 2022
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
or host
commands. The nslookup
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
alternatively you can use the host
command:
# host DC1.samdom.example.com DC1.samdom.example.com has 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.
or
# host 10.99.0.1 1.0.99.10.in-addr.arpa domain name pointer 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 > set type=SRV > _ldap._tcp.samdom.example.com Server: 192.168.0.4 Address: 192.168.0.4#53 _ldap._tcp.samdom.example.com service = 0 100 389 dc2.samdom.example.com. _ldap._tcp.samdom.example.com service = 0 100 389 dc1.samdom.example.com. > exit
or
$ host -t SRV _ldap._tcp.samdom.example.com _ldap._tcp.samdom.example.com has SRV record 0 100 389 dc1.samdom.example.com. _ldap._tcp.samdom.example.com has SRV record 0 100 389 dc2.samdom.example.com.
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