some network discrepancies in suse (dig + ping)

How do you explain this? Dig gives me IP addy of host ‘anarchy’ but ping doesn’t see IP addy? 192.168.0.1 is gateway and DNS caching (‘smoothwall’). Also, “ftp://anarchy:28/” said “unknown host”, but “ftp://192.168.0.69:28/” connects fine. What’s wrong?

felipe@suse-amd:~> dig anarchy

; <<>> DiG 9.4.2 <<>> anarchy
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30913
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;anarchy.                       IN      A

;; ANSWER SECTION:
anarchy.                0       IN      A       192.168.0.69

;; Query time: 1 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Wed Jul  2 13:26:42 2008
;; MSG SIZE  rcvd: 41

felipe@suse-amd:~>ping anarchy
ping: unknown host anarchy
felipe@suse-amd:~> ping 192.168.0.69
PING 192.168.0.69 (192.168.0.69) 56(84) bytes of data.
64 bytes from 192.168.0.69: icmp_seq=1 ttl=64 time=1.17 ms
64 bytes from 192.168.0.69: icmp_seq=2 ttl=64 time=0.085 ms
64 bytes from 192.168.0.69: icmp_seq=3 ttl=64 time=0.085 ms
^C
--- 192.168.0.69 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 0.085/0.449/1.179/0.516 ms
felipe@suse-amd:~>   

felipe1982 wrote:
> How do you explain this? Dig gives me IP addy of host ‘anarchy’ but ping
> doesn’t see IP addy? 192.168.0.1 is gateway and DNS caching
> (‘smoothwall’). Also, “ftp://anarchy:28/” said “unknown host”, but
> “ftp://192.168.0.69:28/” connects fine. What’s wrong?
>

cat /etc/resolv.conf

What does your /etc/nsswitch.conf say about how hosts are
resolved?

*hang on , made a big typo *

felipe@suse-amd:~> cat /etc/resolv.conf
nameserver 192.168.0.1
search local
felipe@suse-amd:~> cat /etc/nsswitch.conf
nsswitch.conf     nsswitch.confbak
felipe@suse-amd:~> cat /etc/nsswitch.conf
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
#       compat                  Use compatibility setup
#       nisplus                 Use NIS+ (NIS version 3)
#       nis                     Use NIS (NIS version 2), also called YP
#       dns                     Use DNS (Domain Name Service)
#       files                   Use the local files
#       [NOTFOUND=return]       Stop searching if not found so far
#
# For more information, please read the nsswitch.conf.5 manual page.
#

# passwd: files nis
# shadow: files nis
# group:  files nis

passwd: compat
group:  compat

hosts:          files mdns4_minimal [NOTFOUND=return] dns
networks:       files dns

services:       files
protocols:      files
rpc:            files
ethers:         files
netmasks:       files
netgroup:       files nis
publickey:      files

bootparams:     files
automount:      files nis
aliases:        files


felipe@suse-amd:~>

felipe1982 wrote:

>
> Code:
> --------------------
> felipe@suse-amd:~> cat /etc/resolv.conf
> nameserver 192.168.0.1
> search local
> felipe@suse-amd:~> cat /etc/nsswitch.conf
> nsswitch.conf nsswitch.confbak
> felipe@suse-amd:~> cat /etc/nsswitch.conf
> #
> # /etc/nsswitch.conf
> #
> # An example Name Service Switch config file. This file should be
> # sorted with the most-used services at the beginning.
> #
> # The entry ‘[NOTFOUND=return]’ means that the search for an
> # entry should stop if the search in the previous entry turned
> # up nothing. Note that if the search failed due to some other reason
> # (like no NIS server responding) then the search continues with the
> # next entry.
> #
> # Legal entries are:
> #
> # compat Use compatibility setup
> # nisplus Use NIS+ (NIS version 3)
> # nis Use NIS (NIS version 2), also called YP
> # dns Use DNS (Domain Name Service)
> # files Use the local files
> # [NOTFOUND=return] Stop searching if not found so far
> #
> # For more information, please read the nsswitch.conf.5 manual page.
> #
>
> # passwd: files nis
> # shadow: files nis
> # group: files nis
>
> passwd: compat
> group: compat
>
> hosts: files mdns4_minimal [NOTFOUND=return] dns
> networks: files dns
>
> services: files
> protocols: files
> rpc: files
> ethers: files
> netmasks: files
> netgroup: files nis
> publickey: files
>
> bootparams: files
> automount: files nis
> aliases: files
>
>
> felipe@suse-amd:~>
> --------------------
>
>

Your /etc/resolv.conf contains the line “search local”… which tells the
system to append ‘.local’ to any address that is not a FQDN (Fully Qualified
Domain Name). Basically, any name without any periods in it.

So your ‘anarchy’, is being searched for as ‘anarchy.local’. Of course, this
doesn’t exist.

If you look at the dig output, you’ll see that it actually returns information
for “anarchy.” <— see the period? now it’s a FQDN.

remove the ‘search local’ line (or comment it out with a ‘#’ in front), and
all should work as you expect.

Loni

L R Nix
lornix@lornix.com

‘anarchy.local’ exists. so does ‘anarchy’

i removed all lines, and left only ‘nameserver 192.168.0.1’ and it works fine. I read about keywords ‘domain’ and ‘search’ and appending ‘.local’ would be nice. It seems like that is what they are supposed to do, but it isn’t recognising the ‘anarchy.local’ exists.

felipe@suse-amd:~> ping anarchy
PING anarchy (192.168.0.69) 56(84) bytes of data.
64 bytes from anarchy (192.168.0.69): icmp_seq=1 ttl=64 time=0.958 ms
64 bytes from anarchy (192.168.0.69): icmp_seq=2 ttl=64 time=0.396 ms
64 bytes from anarchy (192.168.0.69): icmp_seq=3 ttl=64 time=0.111 ms
^C
--- anarchy ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 0.111/0.488/0.958/0.352 ms
felipe@suse-amd:~> ping anarchy.local
ping: unknown host anarchy.local
felipe@suse-amd:~> nslookup anarchy.local
Server:         192.168.0.1
Address:        192.168.0.1#53

Name:   anarchy.local
Address: 192.168.0.69

felipe@suse-amd:~>

felipe1982 wrote:

>
> ‘anarchy.local’ exists. so does ‘anarchy’
>
> i removed all lines, and left only ‘nameserver 192.168.0.1’ and it
> works fine. I read about keywords ‘domain’ and ‘search’ and appending
> ‘.local’ would be nice. It seems like that is what they are supposed to
> do, but it isn’t recognising the ‘anarchy.local’ exists.
>
>

I’m afraid I’m at a loss then. Which Domain Name server are you using? How
is it configured? I’ve used dnsmasq quite a bit, bind somewhat (put it this
way, I understand sendmail configs… but bind confuses me, weird huh?)

I have my own domain too (lornix.com), so it tends to simplify things
somewhat, and the ‘domain’ and ‘search’ keywords do work as expected then.

Loni

Oops, went back and reread your posts, smoothwall…

Where are anarchy and anarchy.local defined? In your smoothwall setup? or
somewhere upstream like DynDNS.com, zoneedit.com, or elsewhere?

what is output of ‘dig anarchy’ and ‘dig anarchy.local’ ?

L

L R Nix
lornix@lornix.com

smoothwall (root) ~ $ cat /etc/hosts/
127.0.0.1      localhost
192.168.0.1    smoothwall smoothwall.local
192.168.0.69   anarchy anarchy.local

‘anarchy’ and ‘anarchy.local’ are defined in the smoothwall hosts file. In smoothwall, I added “DNS suffix” as “local” and windows box (another PC on my network) miraculously plays well with this new addition. I used to have to type “anarchy.” with the dot to get it to work (on both SUSE and Windows) but I hated having to type “ftp://anarchy.:28” The dot & colon looked so ugly, and awkward to type. After adding “DNS Suffix local” wow the windows machine can ping ‘anarchy’ (no dot) and connect to FTP (no dot).

“local” suffix works in SUSE, too, by having ONLY"nameserver" declaration in /etc/resolv.conf. “search local” and “domain local” fail to resolve with ping and fail in Konqueror (ftp and sftp and fish and ssh), but resolve 100% fine with ‘nslookup’ ‘dig’ ‘ssh’ ‘ftp’ in a console.

felipe@suse-amd:~> cat /etc/resolv.conf
#
#/etc/resolv.conf
#search declaration enabled
search local
nameserver 192.168.0.1
felipe@suse-amd:~> dig anarchy

; <<>> DiG 9.4.2 <<>> anarchy
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61734
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;anarchy.                       IN      A

;; ANSWER SECTION:
anarchy.                0       IN      A       192.168.0.69

;; Query time: 14 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Thu Jul 10 23:40:44 2008
;; MSG SIZE  rcvd: 41

felipe@suse-amd:~> dig anarchy.local

; <<>> DiG 9.4.2 <<>> anarchy.local
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62445
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;anarchy.local.                 IN      A

;; ANSWER SECTION:
anarchy.local.          0       IN      A       192.168.0.69

;; Query time: 1 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Thu Jul 10 23:40:46 2008
;; MSG SIZE  rcvd: 47
felipe@suse-amd:~> ping anarchy.local
ping: unknown host anarchy.local
felipe@suse-amd:~> ping anarchy
ping: unknown host anarchy
felipe@suse-amd:~>
felipe@suse-amd:~> cat /etc/resolv.conf ; dig anarchy ; dig anarchy.local ; ping -c 2 anarchy ; ping -c 2 anarchy.local
#
#/etc/resolv.conf
#search declaration DISABLED
#search local
nameserver 192.168.0.1

; <<>> DiG 9.4.2 <<>> anarchy
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8643
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;anarchy.                       IN      A

;; ANSWER SECTION:
anarchy.                0       IN      A       192.168.0.69

;; Query time: 1 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Thu Jul 10 23:43:44 2008
;; MSG SIZE  rcvd: 41


; <<>> DiG 9.4.2 <<>> anarchy.local
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56985
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;anarchy.local.                 IN      A

;; ANSWER SECTION:
anarchy.local.          0       IN      A       192.168.0.69

;; Query time: 1 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Thu Jul 10 23:43:44 2008
;; MSG SIZE  rcvd: 47

PING anarchy (192.168.0.69) 56(84) bytes of data.
64 bytes from anarchy (192.168.0.69): icmp_seq=1 ttl=64 time=4.77 ms
64 bytes from anarchy (192.168.0.69): icmp_seq=2 ttl=64 time=0.118 ms

--- anarchy ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1003ms
rtt min/avg/max/mdev = 0.118/2.444/4.771/2.327 ms
ping: unknown host anarchy.local
felipe@suse-amd:~>

felipe1982 wrote:

>
> Code:
> --------------------
> smoothwall (root) ~ $ cat /etc/hosts/
> 127.0.0.1 localhost
> 192.168.0.1 smoothwall smoothwall.local
> 192.168.0.69 anarchy anarchy.local
> --------------------
> ‘anarchy’ and ‘anarchy.local’ are defined in the smoothwall hosts file.
> In smoothwall, I added “DNS suffix” as “local” and windows box (another
> PC on my network) miraculously plays well with this new addition. I used
> to have to type “anarchy.” with the dot to get it to work (on both SUSE
> and Windows) but I hated having to type “ftp://anarchy.:28” The dot &
> colon looked so ugly, and awkward to type. After adding “DNS Suffix
> local” wow the windows machine can ping ‘anarchy’ (no dot) and connect
> to FTP (no dot).
>
> “local” suffix works in SUSE, too, by having -ONLY-“nameserver”
> declaration in /etc/resolv.conf. “search local” and “domain local” fail
> to resolve with ping and fail in Konqueror (ftp and sftp and fish and
> ssh), but resolve 100% fine with ‘nslookup’ ‘dig’ ‘ssh’ ‘ftp’ in a
> console.
> Code:
> --------------------
> felipe@suse-amd:~> cat /etc/resolv.conf
> #
> #/etc/resolv.conf
> #search declaration enabled
> search local
> nameserver 192.168.0.1
> felipe@suse-amd:~> dig anarchy
>
> ; <<>> DiG 9.4.2 <<>> anarchy
> ;; global options: printcmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61734
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
>
> ;; QUESTION SECTION:
> ;anarchy. IN A
>
> ;; ANSWER SECTION:
> anarchy. 0 IN A 192.168.0.69
>
> ;; Query time: 14 msec
> ;; SERVER: 192.168.0.1#53(192.168.0.1)
> ;; WHEN: Thu Jul 10 23:40:44 2008
> ;; MSG SIZE rcvd: 41
>
> felipe@suse-amd:~> dig anarchy.local
>
> ; <<>> DiG 9.4.2 <<>> anarchy.local
> ;; global options: printcmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62445
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
>
> ;; QUESTION SECTION:
> ;anarchy.local. IN A
>
> ;; ANSWER SECTION:
> anarchy.local. 0 IN A 192.168.0.69
>
> ;; Query time: 1 msec
> ;; SERVER: 192.168.0.1#53(192.168.0.1)
> ;; WHEN: Thu Jul 10 23:40:46 2008
> ;; MSG SIZE rcvd: 47
> felipe@suse-amd:~> ping anarchy.local
> ping: unknown host anarchy.local
> felipe@suse-amd:~> ping anarchy
> ping: unknown host anarchy
> felipe@suse-amd:~>
> --------------------
>
> Code:
> --------------------
> felipe@suse-amd:~> cat /etc/resolv.conf ; dig anarchy ; dig
> anarchy.local ; ping -c 2 anarchy ; ping -c 2 anarchy.local
> #
> #/etc/resolv.conf
> #search declaration DISABLED
> #search local
> nameserver 192.168.0.1
>
> ; <<>> DiG 9.4.2 <<>> anarchy
> ;; global options: printcmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8643
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
>
> ;; QUESTION SECTION:
> ;anarchy. IN A
>
> ;; ANSWER SECTION:
> anarchy. 0 IN A 192.168.0.69
>
> ;; Query time: 1 msec
> ;; SERVER: 192.168.0.1#53(192.168.0.1)
> ;; WHEN: Thu Jul 10 23:43:44 2008
> ;; MSG SIZE rcvd: 41
>
>
> ; <<>> DiG 9.4.2 <<>> anarchy.local
> ;; global options: printcmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56985
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
>
> ;; QUESTION SECTION:
> ;anarchy.local. IN A
>
> ;; ANSWER SECTION:
> anarchy.local. 0 IN A 192.168.0.69
>
> ;; Query time: 1 msec
> ;; SERVER: 192.168.0.1#53(192.168.0.1)
> ;; WHEN: Thu Jul 10 23:43:44 2008
> ;; MSG SIZE rcvd: 47
>
> PING anarchy (192.168.0.69) 56(84) bytes of data.
> 64 bytes from anarchy (192.168.0.69): icmp_seq=1 ttl=64 time=4.77 ms
> 64 bytes from anarchy (192.168.0.69): icmp_seq=2 ttl=64 time=0.118 ms
>
> — anarchy ping statistics —
> 2 packets transmitted, 2 received, 0% packet loss, time 1003ms
> rtt min/avg/max/mdev = 0.118/2.444/4.771/2.327 ms
> ping: unknown host anarchy.local
> felipe@suse-amd:~>
> --------------------
>
>

Hmmm, strange.

I know this isn’t the best answer, but since you’re using static IP’s, why not
put

192.168.0.69 anarchy.local anarchy

into suse-amd’s /etc/hosts file?

Yes, this is not supposed to be needed when using an upstream domain server.
Are you possibly using some sort of proxy on suse-amd? making it parse ‘x’
and ‘x.local’ differently?

Unrelated question: Why have ftp on port 28? Just wondering.

Loni

L R Nix
lornix@lornix.com

Yes, I well aware of the workarounds, but it “should just work” right?! For example, it works just fine with Debian and Debian-based distros (even with or without “search local” added to resolv.conf). And it works in SUSE without “search” keyword. I just don’t get why the SUSE team would automatically add “domain” or “search” keyword if they fail to work as shown in man pages, or other documenation. It causes confusion for many users! And frustrating as HELL! This is windows behaviour (adding “.” to a hostname like anarchy.) and I would expect it to work as (for one example) Debian. In a debian box, resolv.conf shows

search local
nameserver 192.168.0.1

and I can ping anarchy with no problems, ssh, ftp, you name it. Remove search keyword?! OK that works too. Is there something inside SUSE that makes it go retarded when using “domain” or “search” keywords?

(port 28 is legacy - my father had a ftp server on 21 . But now that mine is a private ftp (I used sftp for across the universe (internet) data transfers) I have since switched to 21.)

This still irks me.
htp://smoothwall:81 fails to connect. I need htp://smoothwall.:81 (trailing “.” after hostname)

felipe@suse-amd:~> ping smoothwall
PING smoothwall (192.168.0.1) 56(84) bytes of data.
64 bytes from smoothwall (192.168.0.1): icmp_seq=1 ttl=64 time=0.452 ms
64 bytes from smoothwall (192.168.0.1): icmp_seq=2 ttl=64 time=0.435 ms
^C
--- smoothwall ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1004ms
rtt min/avg/max/mdev = 0.435/0.443/0.452/0.022 ms
felipe@suse-amd:~> dig smoothwall

; <<>> DiG 9.4.2-P1 <<>> smoothwall
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45012
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;smoothwall.                    IN      A

;; ANSWER SECTION:
smoothwall.             0       IN      A       192.168.0.1

;; Query time: 1 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Sun Aug 10 15:11:17 2008
;; MSG SIZE  rcvd: 44

felipe@suse-amd:~> 
felipe@suse-amd:~> cat /etc/resolv.conf

nameserver 192.168.0.1
felipe@suse-amd:~> cat /etc/nsswitch.conf

passwd: compat
group:  compat

hosts:          files mdns4_minimal [NOTFOUND=return] dns
#hosts:         files dns
networks:       files dns

services:       files
protocols:      files
rpc:            files
ethers:         files
netmasks:       files
netgroup:       files nis
publickey:      files

bootparams:     files
automount:      files nis
aliases:        files


felipe@suse-amd:~>

felipe1982 wrote:

>
> This still irks me.
> htp://smoothwall:81 fails to connect. I need htp://smoothwall.:81
> (trailing “.” after hostname)

I’m confused… maybe your thread got moved and I’m just seeing this single
post… but… everything you’ve posted is good and proper.

Are you saying that your browser will not go to ‘smoothwall’ unless you
use ‘smoothwall.’ (with a dot) ?

That’s a ‘feature’ of the browser… items without dots are processed
specially. So if you type ‘yahoo’, most gui browsers nowadays will
stick ‘www’ on the front, and ‘com’ on the back and hope it works,
otherwise they throw it to the default search engine.

I know this behavior can be turned off in firefox, but it does come in
handy once in a while. (not really though, but sometimes)

Have you tried putting a line in your /etc/hosts file:

127.0.0.1 smoothwall smoothwall

This may help, as ‘smoothwall’ seems to be being resolved by your dns at the
moment. Adding it to the hosts file will catch it before it gets to be a
fully-fledged dns query, and should cause things to work as you desire.

Loni


L R Nix
lornix@lornix.com

It not just suse having this problem, at least macos x 10.5 is having same issue. I think that problem is that .local domain is “reserved” for mdns/avahi/zeroconf.

Is there way to configure suse to resolve .local domain via DNS?