Source:How to check DNS configuration: Difference between revisions

From SEPsesam
Line 23: Line 23:
  Login incorrect. Client resolves his IP address [X.X.X.X] to [RANDOM_HOSTNAME], but server resolves it to [X.X.X.X]. Please adjust your name resolution.  (0)
  Login incorrect. Client resolves his IP address [X.X.X.X] to [RANDOM_HOSTNAME], but server resolves it to [X.X.X.X]. Please adjust your name resolution.  (0)


=== Hosts Files ===
==== Linux ====
If an hosts file has to be used because of no proper DNS server, the file on the system is placed
in:
/etc/hosts
==== Windows ====
If you want to use a hosts file on windows Systems for working around DNS problems, the
file can be found in:
C:\Windows\system32\drivers\etc\hosts


=== Tools to check DNS Resolution ===
=== Tools to check DNS Resolution ===

Revision as of 13:51, 13 July 2011

How to check DNS configuration

General

Most of our customers face problems while configuring new clients. Often the source of the problems are misconfigured DNS Servers, or no functional DNS at all. This document describes how to use Sesam with DNS names and how to check wether if you DNS configuration is OK.

Requirements and Rules

  • Sesam needs a propper DNS names to work, it will NOT work with IP Adresses
  • All DNS Names have to correctly resolve forward and reverse
  • If no DNS Server is available, the hosts file of the client and backup server have to be used for make systems available via DNS name

Configuration

Common Error Messages

There are some common error messages which are an indication for errors in your name resolution:

CLIENT_HOSTNAME: Login to stpd from <CLIENT_HOSTNAME> to <SESAM_SERVER_HOSTNAME> incorrect.
Login incorrect. Client resolves his IP address [X.X.X.X] to [RANDOM_HOSTNAME], but server resolves it to [X.X.X.X]. Please adjust your name resolution.  (0)

Hosts Files

Linux

If an hosts file has to be used because of no proper DNS server, the file on the system is placed in:

/etc/hosts

Windows

If you want to use a hosts file on windows Systems for working around DNS problems, the file can be found in:

C:\Windows\system32\drivers\etc\hosts

Tools to check DNS Resolution

There are various tools which can be used to check the DNS resolution, they have up and downsides.

nslookup (windows and linux)

This tool can be used to query and existing DNS Server for a certain hostname or ip address. It will NOT check the hosts file of the System. As such, you may get different results if you choose to use nslookup. Sesam resolves its hostnames via common library function and will first use the hostname specified in the hostsfile of the system.

host (linux only)

As nslookup, host can be used to forward and reverse resolve hostnames and ip adresses. It defaults to the DNS server configured in /etc/resolv.conf but can also be used wit a certain DNS Server as additional argument. It will query the DNS Server of the System first.

sm_setup check_resolution (recommended)

This is the recommended way to check your DNS Resolution. Both client and backup servers come with the sesam tool "sm_setup" installed. It can be used to forward and reverse resolve DNS names from the Command Line.

Before you can use this tool, be sure to execute the Sesam Profile like shown in this FAQ entry:

English_FAQ#A_support_staff_member_told_me_to_set_a_profile.2C_what_does_he_mean.3F

It is recommended to run this command on the backup server AND on the client with different arguments. On the backup server, the second argument will be the desired hostname of the client. If executing the command at the client, the second argument will be the hostname of the backup server.

The output of the command looks like this:

backup_server:~ # sm_setup check_resolution client
Calling gethostbyname with ' client '

        Official name: client.sep.de
        Address type: AF_INET
        Address length: 4
        First IP Address: 172.16.1.145

Calling gethostbyaddr with '172.16.1.145'

        Official name: client.sep.de
        Address type: AF_INET
        Address length: 4
        First IP Address: 172.16.1.145

As you can see the command will output the forward and reverse resolved hostname of the system. Both the addresses and hostnames which are returned have to match. For example if the Official name which is returned from the reverse resolve is different from the on specified on the command line, this will result in problems backing up the client.

The same values have to match on the client for the hostname of the backup server:

client:~ # sm_setup check_resolution backup_server
Calling gethostbyname with 'backup_server'

        Official name: backup_server.sep.de
        Address type: AF_INET
        Address length: 4
        First IP Address: 172.16.1.146

Calling gethostbyaddr with '172.16.1.146'

        Official name: backup_server.sep.de
        Address type: AF_INET
        Address length: 4
        First IP Address: 172.16.1.146