# Problem with resolving host names

## steveb

Hi all.

I have a problem on one of my Gentoo computers (let's call this computer A).

The computer A is using DHCP to get the IP from another Gentoo computer (let's call this computer B). The same computer B wich runs DHCP has as well Bind installed.

When I try to ping any computer in the network on computer A, then I get a error "unknown host". If I use dig on computer A to query the DNS server, I get an answer with no IP address. When I query the FQDN, then I get an answer.

The problem exists only on computer A. Other computers have no problem to get an answer from the DNS server. On other coputer I can ping only the hostname or the FQDN and I get an answer. But not on computer A.

I don't know what the problem is with computer A.

Can any1 help me out with this one?

cheers

SteveB

----------

## adaptr

What is its IP address and does pinging the IP work both ways ?

----------

## steveb

i am killing my self over here:

```
steveb@gentoo ~ $ ping ns2

ping: unknown host ns2

steveb@gentoo ~ $ ping ns2.vunet.local

ping: unknown host ns2.vunet.local

steveb@gentoo ~ $ dig ns2

; <<>> DiG 9.2.3 <<>> ns2

;; global options:  printcmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 2004

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:

;ns2.                           IN      A

;; AUTHORITY SECTION:

.                       150     IN      SOA     A.ROOT-SERVERS.NET. NSTLD.VERISIGN-GRS.COM. 2004101301 1800 900 604800 86400

;; Query time: 18 msec

;; SERVER: 192.168.0.254#53(192.168.0.254)

;; WHEN: Thu Oct 14 14:59:34 2004

;; MSG SIZE  rcvd: 96

steveb@gentoo ~ $ dig ns2.vunet.local

; <<>> DiG 9.2.3 <<>> ns2.vunet.local

;; global options:  printcmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18715

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:

;ns2.vunet.local.               IN      A

;; ANSWER SECTION:

ns2.vunet.local.        86400   IN      A       192.168.0.111

;; AUTHORITY SECTION:

vunet.local.            86400   IN      NS      optiplex.vunet.local.

;; ADDITIONAL SECTION:

optiplex.vunet.local.   86400   IN      A       192.168.0.254

;; Query time: 1 msec

;; SERVER: 192.168.0.254#53(192.168.0.254)

;; WHEN: Thu Oct 14 14:59:38 2004

;; MSG SIZE  rcvd: 88

steveb@gentoo ~ $ dig -x 192.168.0.111

; <<>> DiG 9.2.3 <<>> -x 192.168.0.111

;; global options:  printcmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57693

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:

;111.0.168.192.in-addr.arpa.    IN      PTR

;; ANSWER SECTION:

111.0.168.192.in-addr.arpa. 86400 IN    PTR     ns2.vunet.local.

;; AUTHORITY SECTION:

0.168.192.in-addr.arpa. 86400   IN      NS      optiplex.vunet.local.

;; ADDITIONAL SECTION:

optiplex.vunet.local.   86400   IN      A       192.168.0.254

;; Query time: 1 msec

;; SERVER: 192.168.0.254#53(192.168.0.254)

;; WHEN: Thu Oct 14 14:59:45 2004

;; MSG SIZE  rcvd: 112

steveb@gentoo ~ $ hostname

gentoo

steveb@gentoo ~ $ hostname -f

gentoo.vunet.local

steveb@gentoo ~ $ hostname -y

vunet.local

steveb@gentoo ~ $ cat /etc/resolv.conf

domain vunet.local

nameserver 192.168.0.254

nameserver 192.168.0.254

search vunet.local

steveb@gentoo ~ $
```

on my laptop everything is working! but the desktop (the above output is from the desktop) has trouble!

cheers

SteveBLast edited by steveb on Thu Oct 14, 2004 1:00 pm; edited 1 time in total

----------

## adaptr

You have to set your local domain in /etc/hosts:

```
domain vunet.local

nameserver bla

nameserver bla
```

----------

## steveb

 *adaptr wrote:*   

> You have to set your local domain in /etc/hosts:
> 
> ```
> domain vunet.local
> 
> ...

 

in /etc/hosts?? not resolv.conf??

----------

## steveb

i don't understand it!

```
root@gentoo / # ping ns2.vunet.local

ping: unknown host ns2.vunet.local

root@gentoo / # dig ns2.vunet.local

; <<>> DiG 9.2.3 <<>> ns2.vunet.local

;; global options:  printcmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39941

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:

;ns2.vunet.local.               IN      A

;; ANSWER SECTION:

ns2.vunet.local.        86400   IN      A       192.168.0.111

;; AUTHORITY SECTION:

vunet.local.            86400   IN      NS      optiplex.vunet.local.

;; ADDITIONAL SECTION:

optiplex.vunet.local.   86400   IN      A       192.168.0.254

;; Query time: 1 msec

;; SERVER: 192.168.0.254#53(192.168.0.254)

;; WHEN: Thu Oct 14 15:38:34 2004

;; MSG SIZE  rcvd: 88

root@gentoo / #
```

why is that?

----------

## kashani

I can't say I've ever see anything like it. And when nothing makes sense it's time to start looking at packets. 

I would do a local tcpdump on the Computer A and see if it actually querying the nameservers and if it is, exactly what it's sending to them. This may tell us at least what is really happening if not how to fix it.

kashani

----------

## steveb

ping does NOT use the dns server at all!

dig ns2.vunet.local produces the following output:

```
; <<>> DiG 9.2.3 <<>> ns2.vunet.local

;; global options:  printcmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54998

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:

;ns2.vunet.local.               IN      A

;; ANSWER SECTION:

ns2.vunet.local.        86400   IN      A       192.168.0.111

;; AUTHORITY SECTION:

vunet.local.            86400   IN      NS      optiplex.vunet.local.

;; ADDITIONAL SECTION:

optiplex.vunet.local.   86400   IN      A       192.168.0.254

;; Query time: 1 msec

;; SERVER: 192.168.0.254#53(192.168.0.254)

;; WHEN: Thu Oct 14 20:21:45 2004

;; MSG SIZE  rcvd: 88
```

the log on the server (after the dig):

```
root@optiplex / # tail -F /var/log/bind/query.log

Oct 14 20:32:56.284 client 192.168.0.11#32865: query: ns2.vunet.local IN A
```

looks like the ping does NOT use dns to resolve the hostname. and I don't know why.

cheers

steve

----------

## steveb

ping does NOT produce any output on tcpdump!

dig does:

```
20:37:01.310231 IP 192.168.0.11.32865 > 192.168.0.254.53:  21639+[|domain]

20:37:01.311145 IP 192.168.0.254.53 > 192.168.0.11.32865:  21639*[|domain]
```

strange!!!

----------

## steveb

remerged iputils with no effect:

```
root@gentoo / # FEATURES="-distcc" MAKEOPTS="-j2" emerge -v net-misc/iputils

Calculating dependencies ...done!

>>> emerge (1 of 1) net-misc/iputils-021109-r3 to /

>>> md5 src_uri ;-) iputils-ss021109-try.tar.bz2

>>> Unpacking source...

>>> Unpacking iputils-ss021109-try.tar.bz2 to /var/tmp/portage/iputils-021109-r3/work

 * Applying 021109-gcc34.patch...                                                                                                        [ ok ]

 * Applying 021109-no-pfkey-search.patch...                                                                                              [ ok ]

 * Applying iputils-021109-linux-udp-header.patch...                                                                                     [ ok ]

>>> Source unpacked.

cc -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt-falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -include ../include-glibc/glibc-bugs.h -I../include-glibc -I//usr/include -DIPSEC_DEBUG -DIPSEC -DINET6 -Wall   -c -o ipsec_dump_policy.o ipsec_dump_policy.c

cc -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt-falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -include ../include-glibc/glibc-bugs.h -I../include-glibc -I//usr/include -DIPSEC_DEBUG -DIPSEC -DINET6 -Wall   -c -o key_debug.o key_debug.c

bison -y -d -p __libyy policy_parse.y

mv y.tab.c policy_parse.c

mv y.tab.h policy_parse.h

cc -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt-falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -include ../include-glibc/glibc-bugs.h -I../include-glibc -I//usr/include -DIPSEC_DEBUG -DIPSEC -DINET6 -Wall   -c -o ipsec_get_policylen.o ipsec_get_policylen.c

cc -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt-falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -include ../include-glibc/glibc-bugs.h -I../include-glibc -I//usr/include -DIPSEC_DEBUG -DIPSEC -DINET6 -Wall   -c -o pfkey.o pfkey.c

lex -P__libyy policy_token.l

mv lex.__libyy.c policy_token.c

cc -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt-falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -include ../include-glibc/glibc-bugs.h -I../include-glibc -I//usr/include -DIPSEC_DEBUG -DIPSEC -DINET6 -Wall   -c -o ipsec_strerror.o ipsec_strerror.c

cc -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt-falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -include ../include-glibc/glibc-bugs.h -I../include-glibc -I//usr/include -DIPSEC_DEBUG -DIPSEC -DINET6 -Wall   -c -o pfkey_dump.o pfkey_dump.c

cc -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt-falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -include ../include-glibc/glibc-bugs.h -I../include-glibc -I//usr/include -DIPSEC_DEBUG -DIPSEC -DINET6 -Wall   -c -o policy_parse.o policy_parse.c

cc -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt-falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -include ../include-glibc/glibc-bugs.h -I../include-glibc -I//usr/include -DIPSEC_DEBUG -DIPSEC -DINET6 -Wall   -c -o policy_token.o policy_token.c

ar rcs libipsec.a ipsec_dump_policy.o    key_debug.o   policy_parse.o ipsec_get_policylen.o  pfkey.o       policy_token.o ipsec_strerror.o  pfkey_dump.o

cc -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt-falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -include ../include-glibc/glibc-bugs.h -I../libipsec -I../include-glibc -I//usr/include -DIPSEC_DEBUG -DINET6 -DYY_NO_UNPUT -I. -Wall   -c -o setkey.o setkey.c

bison -d parse.y -o parse.c

bison -d parse.y -o parse.c

lex  -t token.l > token.c

cc -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt-falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -include ../include-glibc/glibc-bugs.h -I../libipsec -I../include-glibc -I//usr/include -DIPSEC_DEBUG -DINET6 -DYY_NO_UNPUT -I. -Wall   -c -o pfkey.o pfkey.c

cc -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt-falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -include ../include-glibc/glibc-bugs.h -I../libipsec -I../include-glibc -I//usr/include -DIPSEC_DEBUG -DINET6 -DYY_NO_UNPUT -I. -Wall   -c -o pfkey_dump.o pfkey_dump.c

cc -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt-falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -include ../include-glibc/glibc-bugs.h -I../libipsec -I../include-glibc -I//usr/include -DIPSEC_DEBUG -DINET6 -DYY_NO_UNPUT -I. -Wall   -c -o key_debug.o key_debug.c

cc -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt-falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -include ../include-glibc/glibc-bugs.h -I../libipsec -I../include-glibc -I//usr/include -DIPSEC_DEBUG -DINET6 -DYY_NO_UNPUT -I. -Wall   -c -o ipsec_strerror.o ipsec_strerror.c

cc -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt-falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -include ../include-glibc/glibc-bugs.h -I../libipsec -I../include-glibc -I//usr/include -DIPSEC_DEBUG -DINET6 -DYY_NO_UNPUT -I. -Wall   -c -o parse.o parse.c

parse.y: In function `setkeymsg':

parse.y:635: warning: dereferencing type-punned pointer will break strict-aliasing rules

parse.y:651: warning: dereferencing type-punned pointer will break strict-aliasing rules

cc -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt-falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -include ../include-glibc/glibc-bugs.h -I../libipsec -I../include-glibc -I//usr/include -DIPSEC_DEBUG -DINET6 -DYY_NO_UNPUT -I. -Wall   -c -o token.o token.c

cc -o setkey setkey.o parse.o token.o pfkey.o pfkey_dump.o key_debug.o ipsec_strerror.o -L../libipsec -lipsec -lfl

rm token.c

gcc -D_GNU_SOURCE -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -Wstrict-prototypes -Wall -g -Iinclude-glibc -include include-glibc/glibc-bugs.h -I//usr/include -I../include       tracepath.c  -lresolv -o tracepath

gcc -D_GNU_SOURCE -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -Wstrict-prototypes -Wall -g -Iinclude-glibc -include include-glibc/glibc-bugs.h -I//usr/include -I../include      -c -o ping.o ping.c

gcc -D_GNU_SOURCE -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -Wstrict-prototypes -Wall -g -Iinclude-glibc -include include-glibc/glibc-bugs.h -I//usr/include -I../include      -c -o ping_common.o ping_common.c

gcc -D_GNU_SOURCE -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -Wstrict-prototypes -Wall -g -Iinclude-glibc -include include-glibc/glibc-bugs.h -I//usr/include -I../include       clockdiff.c  -lresolv -o clockdiff

gcc -D_GNU_SOURCE -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -Wstrict-prototypes -Wall -g -Iinclude-glibc -include include-glibc/glibc-bugs.h -I//usr/include -I../include       rdisc.c  -lresolv -o rdisc

gcc -D_GNU_SOURCE -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -Wstrict-prototypes -Wall -g -Iinclude-glibc -include include-glibc/glibc-bugs.h -I//usr/include -I../include       arping.c  -lresolv -o arping

/var/tmp/portage/iputils-021109-r3/temp/ccA7AfoI.o(.text+0xc6): In function `logperror':

/var/tmp/portage/iputils-021109-r3/work/iputils/rdisc.c:1507: warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead

gcc -D_GNU_SOURCE -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -Wstrict-prototypes -Wall -g -Iinclude-glibc -include include-glibc/glibc-bugs.h -I//usr/include -I../include      -c -o tftpd.o tftpd.c

gcc -D_GNU_SOURCE -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -Wstrict-prototypes -Wall -g -Iinclude-glibc -include include-glibc/glibc-bugs.h -I//usr/include -I../include      -c -o tftpsubs.o tftpsubs.c

gcc -D_GNU_SOURCE -march=athlon-xp -O2 -pipe -mmmx -m3dnow -msse -mfpmath=sse,387 -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -maccumulate-outgoing-args -ffast-math -fprefetch-loop-arrays -Wstrict-prototypes -Wall -g -Iinclude-glibc -include include-glibc/glibc-bugs.h -I//usr/include -I../include       rarpd.c  -lresolv -o rarpd

gcc   ping.o ping_common.o  -lresolv -o ping

gcc   tftpd.o tftpsubs.o  -lresolv -o tftpd

make -C doc man

make[1]: Entering directory `/var/tmp/portage/iputils-021109-r3/work/iputils/doc'

make[1]: Nothing to be done for `man'.

make[1]: Leaving directory `/var/tmp/portage/iputils-021109-r3/work/iputils/doc'

>>> Install iputils-021109-r3 into /var/tmp/portage/iputils-021109-r3/image/ category net-misc

man:

prepallstrip:

strip:

strip:

   usr/bin/setkey

   usr/sbin/tracepath

   usr/sbin/clockdiff

   usr/sbin/rarpd

   usr/sbin/rdisc

   usr/sbin/tftpd

   bin/ping

   sbin/arping

>>> Completed installing into /var/tmp/portage/iputils-021109-r3/image/

./

./usr/

./usr/bin/

./usr/bin/setkey

./usr/sbin/

./usr/sbin/tracepath

./usr/sbin/clockdiff

./usr/sbin/rarpd

./usr/sbin/rdisc

./usr/sbin/ipg

./usr/sbin/tftpd

./usr/share/

./usr/share/doc/

./usr/share/doc/iputils-021109-r3/

./usr/share/doc/iputils-021109-r3/INSTALL.gz

./usr/share/doc/iputils-021109-r3/RELNOTES.gz

./usr/share/man/

./usr/share/man/man8/

./usr/share/man/man8/arping.8.gz

./usr/share/man/man8/clockdiff.8.gz

./usr/share/man/man8/pg3.8.gz

./usr/share/man/man8/ping.8.gz

./usr/share/man/man8/rarpd.8.gz

./usr/share/man/man8/rdisc.8.gz

./usr/share/man/man8/setkey.8.gz

./usr/share/man/man8/tftpd.8.gz

./usr/share/man/man8/tracepath.8.gz

./bin/

./bin/ping

./sbin/

./sbin/arping

>>> Done.

>>> extracting info

>>> extracting iputils-021109-r3

>>> Merging net-misc/iputils-021109-r3 to /

--- /usr/

--- /usr/bin/

>>> /usr/bin/setkey

--- /usr/sbin/

>>> /usr/sbin/tracepath

>>> /usr/sbin/clockdiff

>>> /usr/sbin/rarpd

>>> /usr/sbin/rdisc

>>> /usr/sbin/ipg

>>> /usr/sbin/tftpd

--- /usr/share/

--- /usr/share/doc/

--- /usr/share/doc/iputils-021109-r3/

>>> /usr/share/doc/iputils-021109-r3/INSTALL.gz

>>> /usr/share/doc/iputils-021109-r3/RELNOTES.gz

--- /usr/share/man/

--- /usr/share/man/man8/

>>> /usr/share/man/man8/arping.8.gz

>>> /usr/share/man/man8/clockdiff.8.gz

>>> /usr/share/man/man8/pg3.8.gz

>>> /usr/share/man/man8/ping.8.gz

>>> /usr/share/man/man8/rarpd.8.gz

>>> /usr/share/man/man8/rdisc.8.gz

>>> /usr/share/man/man8/setkey.8.gz

>>> /usr/share/man/man8/tftpd.8.gz

>>> /usr/share/man/man8/tracepath.8.gz

--- /bin/

>>> /bin/ping

--- /sbin/

>>> /sbin/arping

>>> Safely unmerging already-installed instance...

<<<        obj /usr/share/man/man8/traceroute6.8.gz

--- !mtime obj /usr/share/man/man8/tracepath.8.gz

--- !mtime obj /usr/share/man/man8/tftpd.8.gz

--- !mtime obj /usr/share/man/man8/setkey.8.gz

--- !mtime obj /usr/share/man/man8/rdisc.8.gz

--- !mtime obj /usr/share/man/man8/rarpd.8.gz

--- !mtime obj /usr/share/man/man8/ping.8.gz

--- !mtime obj /usr/share/man/man8/pg3.8.gz

--- !mtime obj /usr/share/man/man8/clockdiff.8.gz

--- !mtime obj /usr/share/man/man8/arping.8.gz

--- !mtime obj /usr/share/doc/iputils-021109-r3/RELNOTES.gz

--- !mtime obj /usr/share/doc/iputils-021109-r3/INSTALL.gz

--- !mtime obj /usr/sbin/tftpd

--- !mtime obj /usr/sbin/rdisc

--- !mtime obj /usr/sbin/rarpd

--- !mtime obj /usr/sbin/ipg

--- !mtime obj /usr/sbin/clockdiff

<<<        obj /usr/bin/traceroute6

<<<        obj /usr/bin/tracepath6

<<<        obj /usr/bin/tracepath

--- !mtime obj /usr/bin/setkey

--- !mtime obj /sbin/arping

<<<        obj /bin/ping6

--- !mtime obj /bin/ping

--- !empty dir /usr/share/man/man8

--- !empty dir /usr/share/man

--- !empty dir /usr/share/doc/iputils-021109-r3

--- !empty dir /usr/share/doc

--- !empty dir /usr/share

--- !empty dir /usr/sbin

--- !empty dir /usr/bin

--- !empty dir /usr

--- !empty dir /sbin

--- !empty dir /bin

>>> original instance of package unmerged safely.

 * Caching service dependencies...

>>> net-misc/iputils-021109-r3 merged.

>>> clean: No packages selected for removal.

>>> Auto-cleaning packages ...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

root@gentoo / #
```

ping still does not work:

```
root@gentoo / # ping ns2.vunet.local

ping: unknown host ns2.vunet.local

root@gentoo / # ping ns2

ping: unknown host ns2

root@gentoo / #
```

iptuils is not unmasked or anything else in my portage files:

```
root@gentoo / # grep -i -R "iputils" /etc/portage/*

root@gentoo / #
```

revdep-rebuild does not have any packages needed for rebuild (okay... opera. but this is because of the motif stuff):

```
root@gentoo / # rm -f /root/.revdep-rebuild.*

root@gentoo / # revdep-rebuild -- -p

Checking reverse dependencies...

Packages containing binaries and libraries broken by any package update,

will be recompiled.

Collecting system binaries and libraries... done.

  (/root/.revdep-rebuild.1_files)

Collecting complete LD_LIBRARY_PATH... done.

  (/root/.revdep-rebuild.2_ldpath)

Checking dynamic linking consistency...

  broken /opt/opera/lib/opera/plugins/operamotifwrapper-1 (requires libXm.so.1)

 done.

  (/root/.revdep-rebuild.3_rebuild)

Assigning files to ebuilds... done.

  (/root/.revdep-rebuild.4_ebuilds)

Evaluating package order... done.

  (/root/.revdep-rebuild.5_order)

All prepared. Starting rebuild...

emerge --oneshot --nodeps -p =net-www/opera-7.54

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild   R   ] net-www/opera-7.54

Now you can remove -p (or --pretend) from arguments and re-run revdep-rebuild.

root@gentoo / #   
```

cheers

SteveB

----------

## kashani

I hate when my plans work, but don't actually fix anything. 

http://forums.devshed.com/archive/t-180597

"nearly all programs including browsers on a system makes a system call "gethostbyname" to resolve domains. gethostbyname resolves the domain first from the hosts file, then using the dns servers in resolv.conf. This is true for both linux and windows (even windows can have a resolv.conf, but normally this info is stored in the registry). This is why dig can work, but a browser may fail. dig doesn't call gethostbyname, and instead communicates via sockets to resolve domains."

That tells us why, but does really tell us what's wrong. At this point, my only guess is that /etc/nsswitch.conf is broken or missing. IIRC you should have these two lines in that file.

```

hosts:       files dns

networks:    files dns

```

Flash of insight or wild ass guess here. I've seen Linux systems that don't know their own hostname or can't resolv it do really odd things. Make sure /etc/hosts /etc/hostname /etc/dnsdomainname etc are all correct. Might even want to reboot just to clear the air. 

kashani

----------

## steveb

no joy:

```
root@gentoo / # cat /etc/nsswitch.conf

# /etc/nsswitch.conf:

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/nsswitch.conf,v 1.4 2002/11/18 19:39:22 azarah Exp $

passwd:      compat

shadow:      compat

group:       compat

# passwd:    db files nis

# shadow:    db files nis

# group:     db files nis

hosts:       files dns

networks:    files dns

services:    db files

protocols:   db files

rpc:         db files

ethers:      db files

netmasks:    files

netgroup:    files

bootparams:  files

automount:   files

aliases:     files

root@gentoo / # cat /etc/hosts

# /etc/hosts:  This file describes a number of hostname-to-address

#              mappings for the TCP/IP subsystem.  It is mostly

#              used at boot time, when no name servers are running.

#              On small systems, this file can be used instead of a

#              "named" name server.  Just add the names, addresses

#              and any aliases to this file...

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.8 2003/08/04 20:12:25 azarah Exp $

#

127.0.0.1       localhost

192.168.0.11    gentoo.vunet.local      gentoo

192.168.0.108   domino01.vunet.local    domino01

# IPV6 versions of localhost and co

::1 ip6-localhost ip6-loopback

fe00::0 ip6-localnet

ff00::0 ip6-mcastprefix

ff02::1 ip6-allnodes

ff02::2 ip6-allrouters

ff02::3 ip6-allhosts

root@gentoo / # cat /etc/hostname

gentoo

root@gentoo / # cat /etc/dnsdomainname

vunet.local

root@gentoo / #
```

i know, i know...

192.168.0.11    gentoo.vunet.local      gentoo

192.168.0.108   domino01.vunet.local    domino01

is not needed. but i need to work (need access to my domino server) and for that reason i added my host and the domino server into the hosts file.

cheers

steve

----------

## steveb

WAIT A MINUTE!!!

```
root@gentoo / # hostname -i

192.168.0.1

root@gentoo / #      
```

this is wrong!

----------

## steveb

WOW!!

```
root@gentoo / # /etc/init.d/net.eth0 restart

 * Bringing eth0 down...

 *   Removing inet6 addresses

 *     eth0 inet6 del fe80::2a0:24ff:fea8:42b4/64      [ ok ]

 *   Releasing DHCP lease for eth0                     [ ok ]

 *   Stopping eth0                                     [ ok ]

 * Bringing eth0 up...

 *   eth0 dhcp                                         [ ok ]

 *     eth0 received address 192.168.0.11

root@gentoo / # hostname -i

192.168.0.1

root@gentoo / #     
```

what the hell is going on?

----------

## steveb

okay... one problem solved (other still open):

```
root@gentoo / # /etc/init.d/nscd stop

 * Shutting down Name Service Cache Daemon...                                [ ok ]

root@gentoo / # hostname -i

192.168.0.11

root@gentoo / # ping ns2

ping: unknown host ns2

root@gentoo / # ping ns2.vunet.local

ping: unknown host ns2.vunet.local

root@gentoo / # /etc/init.d/hostname restart

 * WARNING:  you are stopping a boot service.

 * WARNING:  you are stopping a boot service.

 * Stopping vixie-cron...                                                    [ ok ]

 * Stopping metalog...                                                       [ ok ]

 * WARNING:  you are stopping a boot service.

 * WARNING:  you are stopping a boot service.

 * WARNING:  you are stopping a boot service.

 * Stopping acpid...                                                         [ ok ]

 * WARNING:  you are stopping a boot service.

 * Syncing hardware clock to system clock [UTC]...                           [ ok ]

 * WARNING:  you are stopping a boot service.

 * WARNING:  you are stopping a boot service.

 * WARNING:  you are stopping a boot service.

 * WARNING:  you are stopping a boot service.

 * Saving random seed...                                                     [ ok ]

 * WARNING:  you are stopping a boot service.

 * Stopping input hotplugging...                                             [ ok ]

 * Stopping pci hotplugging...                                               [ ok ]

 * Stopping usb hotplugging...                                               [ ok ]

 * Setting hostname to gentoo...                                             [ ok ]

 * Calculating module dependencies...                                        [ ok ]

 * Using /etc/modules.autoload.d/kernel-2.6 as config:

 *   Loading module nvidia...                                                [ ok ]

 *   Loading module 3c59x...                                                 [ ok ]

 *   Loading module b44...                                                   [ ok ]

 *   Loading module ide_core...                                              [ ok ]

 *   Loading module via82cxxx...                                             [ ok ]

 *   Loading module ide-cd...                                                [ ok ]

 *   Loading module sr_mod...                                                [ ok ]

 *   Loading module sg...                                                    [ ok ]

 * Autoloaded 8 module(s)

 * Checking all filesystems...                                               [ ok ]

 * Mounting local filesystems...                                             [ ok ]

 * Mounting USB device filesystem (usbfs)...                                 [ ok ]

 * Activating (possibly) more swap...                                        [ ok ]

 * Starting acpid...                                                         [ ok ]

 * Setting system clock to hardware clock [UTC]...                           [ ok ]

 * Setting user font...

putfont: PIO_FONT: Invalid argument                                          [ ok ]

 * Setting DNS domainname to vunet.local...                                  [ ok ]

 * Starting input hotplugging...                                             [ ok ]

 * Starting pci hotplugging...                                               [ ok ]

 * Starting usb hotplugging...                                               [ ok ]

 * Loading key mappings...                                                   [ ok ]

 * Starting metalog...                                                       [ ok ]

 * Initializing random number generator...                                   [ ok ]

 * Starting vixie-cron...                                                    [ ok ]

root@gentoo / # /etc/init.d/domainname restart

 * Setting DNS domainname to vunet.local...                                  [ ok ]

root@gentoo / # /etc/init.d/net.eth0 restart

 * Bringing eth0 down...

 *   Removing inet6 addresses

 *     eth0 inet6 del fe80::2a0:24ff:fea8:42b4/64                            [ ok ]

 *   Releasing DHCP lease for eth0                                           [ ok ]

 *   Stopping eth0                                                           [ ok ]

 * Bringing eth0 up...

 *   eth0 dhcp                                                               [ ok ]

 *     eth0 received address 192.168.0.11

root@gentoo / # ping ns2

ping: unknown host ns2

root@gentoo / # ping ns2.vunet.local

ping: unknown host ns2.vunet.local

root@gentoo / # dig ns2.vunet.local

; <<>> DiG 9.2.3 <<>> ns2.vunet.local

;; global options:  printcmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50488

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:

;ns2.vunet.local.               IN      A

;; ANSWER SECTION:

ns2.vunet.local.        86400   IN      A       192.168.0.111

;; AUTHORITY SECTION:

vunet.local.            86400   IN      NS      optiplex.vunet.local.

;; ADDITIONAL SECTION:

optiplex.vunet.local.   86400   IN      A       192.168.0.254

;; Query time: 1 msec

;; SERVER: 192.168.0.254#53(192.168.0.254)

;; WHEN: Thu Oct 14 22:17:28 2004

;; MSG SIZE  rcvd: 88

root@gentoo / # hostname

gentoo

root@gentoo / # hostname -i

192.168.0.11

root@gentoo / # hostname -f

gentoo.vunet.local

root@gentoo / # hostname -y

vunet.local

root@gentoo / # hostname -s

gentoo

root@gentoo / # hostname -a

gentoo

root@gentoo / # cat /etc/resolv.conf

nameserver 192.168.0.254

nameserver 192.168.0.254

search vunet.local

root@gentoo / #
```

cheers

SteveB

----------

## kashani

for the hell of it try this in your /etc/resolv.conf

domain vunet.local 

search vunet.local 

nameserver 192.168.0.254

nameserver 192.168.0.254

If that doesn't work I've got no other ideas other then to try a reboot since it's about the only thing you haven't done one yet.  Either that or start looking for the Indian burial ground this computer is obviously sitting on.  :Smile: 

kashani

----------

## hlandgar

Are you by any chance running the new glibc-2.3.4.20041006. If you are that is your problem. The new glibc breaks resolution of local hosts. It also is very slow resolving internet addresses. Go back to 2.3.4.20040808-r1 and the problem will go away.

Harris

----------

## steveb

 *hlandgar wrote:*   

> Are you by any chance running the new glibc-2.3.4.20041006. If you are that is your problem. The new glibc breaks resolution of local hosts. It also is very slow resolving internet addresses. Go back to 2.3.4.20040808-r1 and the problem will go away.
> 
> Harris

 F**K! YES! I'am using it!

going back with glibc?? hmm... i don't know if this is possible!

WOW! portage is nice with me:

```

root@gentoo / # FEATURES="-distcc" MAKEOPTS="-j2" emerge -v =sys-libs/glibc-2.3.4.20040808-r1

Calculating dependencies ...done!

>>> emerge (1 of 1) sys-libs/glibc-2.3.4.20040808-r1 to /

>>> md5 src_uri ;-) glibc-2.3.3.tar.bz2

>>> md5 src_uri ;-) glibc-manpages-2.3.4.tar.bz2

>>> md5 src_uri ;-) glibc-infopages-2.3.4.tar.bz2

>>> md5 src_uri ;-) glibc-2.3.4-branch-update-20040808.patch.bz2

>>> Unpacking source...

nptl

x86

 * Checking gcc for __thread support ... yes

 * Checking kernel version (>=2.6.5) ... yes

 * Checking linux-headers version (>=2.6.5) ... yes

>>> Unpacking glibc-2.3.3.tar.bz2 to /var/tmp/portage/glibc-2.3.4.20040808-r1/work

>>> Unpacking glibc-manpages-2.3.4.tar.bz2 to /var/tmp/portage/glibc-2.3.4.20040808-r1/work/glibc-2.3.3/man

 * Applying glibc-2.3.4-branch-update-20040808.patch.bz2...                                                                                            [ ok ]

 * Patching version to display snapshot date ...

>>> Unpacking glibc-infopages-2.3.4.tar.bz2 to /var/tmp/portage/glibc-2.3.4.20040808-r1/work/glibc-2.3.3

 * Applying glibc-sec-hotfix-20040804.patch...                                                                                                         [ ok ]

 * Applying glibc-2.3.2-propolice-guard-functions-v3.patch...                                                                                          [ ok ]

 * Applying glibc-2.3.3-frandom-detect.patch...                                                                                                        [ ok ]

 * Applying glibc-2.3.3-localedef-fix-trampoline.patch...                                                                                              [ ok ]

 * Applying glibc-2.3.3-dl_execstack-PaX-support.patch...                                                                                              [ ok ]

 * Applying glibc-2.3.3_pre20040117-pt_pax.diff...                                                                                                     [ ok ]

 * Applying glibc-2.3.4.20040808-i386-got-fix.diff...                                                                                                  [ ok ]

x86

 * Applying glibc-gentoo-libdir.patch...                                                                                                               [ ok ]

 * Applying glibc-2.3.4-ld.so-brk-fix.patch...                                                                                                         [ ok ]

 * Applying glibc-2.3.4-nptl-pthread.h-g++-fix.patch...                                                                                                [ ok ]

 * Applying glibc-2.3.3-tempfile.patch...                                                                                                              [ ok ]

>>> Source unpacked.

 * -march=pentium-m seems to be broken in gcc 3.4, changing to -mtune=pentium3

nls

erandom

nptl

x86

x86

x86

x86

 * Configuring GLIBC...

checking build system type... i686-pc-linux-gnu

checking host system type... i686-pc-linux-gnu

running configure fragment for add-on nptl

checking sysdep dirs... sysdeps/i386/elf nptl/sysdeps/unix/sysv/linux/i386/i686 nptl/sysdeps/unix/sysv/linux/i386 nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread nptl/sysdeps/unix/sysv nptl/sysdeps/unix nptl/sysdeps/i386/i686 nptl/sysdeps/i386 sysdeps/unix/sysv/linux/i386 sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet sysdeps/unix/sysv/i386 sysdeps/unix/sysv sysdeps/unix/i386 sysdeps/unix sysdeps/posix sy
```

cool  :Wink: 

----------

## steveb

anyway... can you explain this?:

```
thinkpad / # for foo in portage baselayout glibc gcc iputils ; do qpkg -I -nc -v ${foo} ; done

app-portage/gentoolkit-0.2.0_pre8

app-portage/ufed-0.34

sys-apps/portage-2.0.50-r11

sys-apps/baselayout-1.9.4-r3

sys-libs/glibc-2.3.4.20041006

sys-devel/gcc-3.3.4-r1

sys-devel/gcc-3.4.2-r2

sys-devel/gcc-config-1.3.6-r3

net-misc/iputils-021109-r3

thinkpad / # ping -c 4 ns2

PING ns2.vunet.local (192.168.0.111) 56(84) bytes of data.

64 bytes from ns2.vunet.local (192.168.0.111): icmp_seq=1 ttl=64 time=0.170 ms

64 bytes from ns2.vunet.local (192.168.0.111): icmp_seq=2 ttl=64 time=0.153 ms

64 bytes from ns2.vunet.local (192.168.0.111): icmp_seq=3 ttl=64 time=0.153 ms

64 bytes from ns2.vunet.local (192.168.0.111): icmp_seq=4 ttl=64 time=0.161 ms

--- ns2.vunet.local ping statistics ---

4 packets transmitted, 4 received, 0% packet loss, time 2999ms

rtt min/avg/max/mdev = 0.153/0.159/0.170/0.011 ms

thinkpad / # cat /etc/resolv.conf

nameserver 192.168.0.254

nameserver 192.168.0.254

search vunet.local

thinkpad / # cat /etc/hosts

127.0.0.1       localhost

# IPV6 versions of localhost and co

::1 ip6-localhost ip6-loopback

fe00::0 ip6-localnet

ff00::0 ip6-mcastprefix

ff02::1 ip6-allnodes

ff02::2 ip6-allrouters

ff02::3 ip6-allhosts

thinkpad / #    
```

new glibc and it still works (to be honest: i don't know if i rebooted since i installed glibc. will test that after openoffice 1.1.3 is finished with the install).

cheers

SteveB

----------

## steveb

okay... before:

```
root@gentoo / # etcat -v glibc

[ Results for search key           : glibc ]

[ Candidate applications found : 7 ]

 Only printing found installed programs.

*  sys-libs/glibc :

        [   ] 2.2.5-r9 (2.2)

        [   ] 2.3.2-r12 (2.2)

        [   ] 2.3.3.20040420-r2 (2.2)

        [ ~ ] 2.3.4.20040619-r2 (2.2)

        [   ] 2.3.4.20040808-r1 (2.2)

        [ ~ ] 2.3.4.20040916 (2.2) OVERLAY

        [ ~I] 2.3.4.20041006 (2.2)

root@gentoo / #
```

now:

```
root@gentoo / # etcat -v glibc

[ Results for search key           : glibc ]

[ Candidate applications found : 7 ]

 Only printing found installed programs.

*  sys-libs/glibc :

        [   ] 2.2.5-r9 (2.2)

        [   ] 2.3.2-r12 (2.2)

        [   ] 2.3.3.20040420-r2 (2.2)

        [M~ ] 2.3.4.20040619-r2 (2.2)

        [  I] 2.3.4.20040808-r1 (2.2)

        [M~ ] 2.3.4.20040916 (2.2) OVERLAY

        [M~ ] 2.3.4.20041006 (2.2)

root@gentoo / #
```

and all is working again:

```
root@gentoo / # ping -c4 ns2

PING ns2.vunet.local (192.168.0.111) 56(84) bytes of data.

64 bytes from ns2.vunet.local (192.168.0.111): icmp_seq=1 ttl=64 time=0.155 ms

64 bytes from ns2.vunet.local (192.168.0.111): icmp_seq=2 ttl=64 time=0.151 ms

64 bytes from ns2.vunet.local (192.168.0.111): icmp_seq=3 ttl=64 time=0.154 ms

64 bytes from ns2.vunet.local (192.168.0.111): icmp_seq=4 ttl=64 time=0.156 ms

--- ns2.vunet.local ping statistics ---

4 packets transmitted, 4 received, 0% packet loss, time 3002ms

rtt min/avg/max/mdev = 0.151/0.154/0.156/0.002 ms

root@gentoo / #
```

geee!!! well hlandgar. you saved my day!  :Smile: 

cheers

SteveB

----------

## saba

Bump.

This is an important issue, and its resolution. It's an infuriating thing that has left be baffled for the last week.

A huge pain in the arse.

----------

