Unable to connect to internal servers via DNS

Hi,
Just recently installed SUSE on my system after my Arch install was taken down due to HDD failure, however unlike Arch SUSE seems to have an issue accessing internal servers via their DNS name, I can resolve them via nslookup correctly but when I try traceroute I get an error though I can access the server correctly via IP address. Any ideas? Here is the output from the following commands I’ve ran.

$ nslookup intranet.bosc.local
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:   intranet.bosc.local
Address: 172.16.0.6

$ traceroute intranet.bosc.local
intranet.bosc.local: Name or service not known
Cannot handle "host" cmdline arg `intranet.bosc.local' on position 1 (argc 1)

$ ping intranet.bosc.local
ping: unknown host intranet.bosc.local

$ ping 172.16.0.6
PING 172.16.0.6 (172.16.0.6) 56(84) bytes of data.
64 bytes from 172.16.0.6: icmp_req=1 ttl=64 time=0.340 ms
64 bytes from 172.16.0.6: icmp_req=2 ttl=64 time=0.181 ms

Thanks

What’s in “/etc/resolv.conf”? And please use a code box to post that.

On 09/07/2012 10:26 AM, nrickert wrote:
>
> What’s in “/etc/resolv.conf”? And please use a code box to post that.

In addition, please post the contents of /etc/hosts, also in a code box.

may be this is help you:

perl -pi -e ‘s/local/locaz/g’ /lib/libresolv.so.2

Hi,
Sorry for the delay in getting back, forgot to run SSHD…

Here is the contains of resolv.conf and hosts:

Resolv.conf


search bosc.local
nameserver 172.16.0.20
nameserver 172.16.0.21

hosts


127.0.0.1 localhost

::1 localhost ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts

Try this and see if it works :


ping intranet

Hi,
Pinging intranet works.

Ok so either remove this line from /etc/resolv.conf :


search bosc.local

and ping the hostnames you want with the suffix or leave it the way it is and use names without suffix bosc.local for hosts with this suffix.

Fixed the issue:

Under /etc/nsswitch.conf, I changed the hosts line to “files dns” from minimal_dns, I can now resolve addresses with a FDQN. Any reason as to why SUSE ships like this? I can ping with just the host name alone still so I can’t see the advantage of having minimal_dns.

Thanks

Glad to hear you fixed it and thanks for the feedback. As to the question I’ve got no idea why it ships like this by default but I guess there is some reasoning behind. Maybe lwfinger will shed some light on this :slight_smile:

On 09/10/2012 03:16 AM, glistwan wrote:
>
> braingravyuk;2485597 Wrote:
>> Fixed the issue:
>>
>> Under /etc/nsswitch.conf, I changed the hosts line to “files dns” from
>> minimal_dns, I can now resolve addresses with a FDQN. Any reason as to
>> why SUSE ships like this? I can ping with just the host name alone still
>> so I can’t see the advantage of having minimal_dns.
>>
>> Thanks
> Glad to hear you fixed it and thanks for the feedback. As to the
> question I’ve got no idea why it ships like this by default but I guess
> there is some reasoning behind. Maybe lwfinger will shed some light on
> this :slight_smile:

I’m not sure that it does ship like that. My system has


hosts:          files mdns4_minimal [NOTFOUND=return] dns

On 2012-09-07 14:26, braingravyuk wrote:

> Code:
> --------------------
> $ nslookup intranet.bosc.local
> --------------------

I know the issue is solved, but I should note that .local domains are incompatible with hosts
attempting to join an AD domain.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))