PDA

View Full Version : order for name resolution?



Bernd
13-Apr-2016, 07:50
Hi,

here are a few SLES11SP4 systems. They run as a semi closed test structure.
Semi closed as far as they has no records in the DNS. The systems use the
/etc/hosts to resolve hostnames / FQDN in IP-Addresses.

It is possible to ping from one of theses test systems to another host of
these structure, even I can use telnet to connect a service (e.g.
postgresql) at another of these hosts.

But nslookup and dig asks only the DNS-Server and do not read the
/etc/hosts. As far as I remember in the early years there was a possibility
to overwrite the DNS with local entries in the /etc/hosts?!

How I can archieve this on SLES11SP4?

Bernd

malcolmlewis
13-Apr-2016, 12:31
On Wed 13 Apr 2016 06:50:06 AM CDT, Bernd wrote:

Hi,

here are a few SLES11SP4 systems. They run as a semi closed test
structure. Semi closed as far as they has no records in the DNS. The
systems use the /etc/hosts to resolve hostnames / FQDN in IP-Addresses.

It is possible to ping from one of theses test systems to another host
of these structure, even I can use telnet to connect a service (e.g.
postgresql) at another of these hosts.

But nslookup and dig asks only the DNS-Server and do not read the
/etc/hosts. As far as I remember in the early years there was a
possibility to overwrite the DNS with local entries in the /etc/hosts?!

How I can archieve this on SLES11SP4?

Bernd


Hi
Via /etc/nsswitch.conf file via hosts and networks lines should sort it
out.

--
Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 SP1|GNOME 3.10.4|3.12.53-60.30-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below... Thanks!

Bernd
13-Apr-2016, 14:45
malcolmlewis wrote on Mittwoch, 13. April 2016 13:31 in
suse.support.server.configure-administer :

>

> On Wed 13 Apr 2016 06:50:06 AM CDT, Bernd wrote:
>
> Hi,
>
> here are a few SLES11SP4 systems. They run as a semi closed test
> structure. Semi closed as far as they has no records in the DNS. The
> systems use the /etc/hosts to resolve hostnames / FQDN in IP-Addresses.
>
> It is possible to ping from one of theses test systems to another host
> of these structure, even I can use telnet to connect a service (e.g.
> postgresql) at another of these hosts.
>
> But nslookup and dig asks only the DNS-Server and do not read the
> /etc/hosts. As far as I remember in the early years there was a
> possibility to overwrite the DNS with local entries in the /etc/hosts?!
>
> How I can archieve this on SLES11SP4?
>
> Bernd
>
>
> Hi
> Via /etc/nsswitch.conf file via hosts and networks lines should sort it
> out.
>

Hi Malcom,
thx. The nsswitch.conf shows 'hosts: files dns' and ping, etc. used it. But
nslookup and dig seems not to use the libc to resolve hostnamens so they can
not anwer with the IP-Address. ... modern times ;-)

Bernd

jmozdzen
15-Apr-2016, 13:49
Hi Bernd,

> But
> nslookup and dig seems not to use the libc to resolve hostnamens so they can
> not anwer with the IP-Address. ... modern times ;-)

well, those two tools are designed to be DNS clients, so they'll always go the DNS route.

Regards,
Jens

Bernd
19-Apr-2016, 17:13
jmozdzen wrote on Freitag, 15. April 2016 14:54 in
suse.support.server.configure-administer :

>
> Hi Bernd,
>
>> But
>> nslookup and dig seems not to use the libc to resolve hostnamens so
> they can
>> not anwer with the IP-Address. ... modern times ;-)
>
> well, those two tools are designed to be DNS clients, so they'll always
> go the DNS route.

So it ended up, with an new bind for this zone on one of the servers in the
test environment and comment out the entrys in the hosts file.

Thx, for your infos!

Bernd