Networking Forums

Networking Forums > Computer Networking > Linux Networking > ping <hostname>

Reply
Thread Tools Display Modes

ping <hostname>

 
 
Kamir Wolfgang
Guest
Posts: n/a

 
      09-15-2003, 02:23 PM
i installed LFS during the last week just to learn some linux. it worked
rather fine and was a lot of fun (and RTFM'ing).

my problem is, that name resolution doesnot work.

ping <ip-adress> works fine, ping <hostname> complains: unknown host:
www.wcm.at

i tried to install bind (nslookup/dig/host) and configured the
/etc/resolv.conf just as on the other linux-machine where name resolution
works

//////
cat resolv.conf

serach localdoman

nameserver 195.3.96.67
nameserver 195.3.96.68
///////

i can reach the DNS-Servers by pinging the ip-adress.

also "nslookup www.wcm.at" works fine.

ping, tracerout, lynx and everything i try gives me the message: unknown
host: <hostname>

does anyone know why this is and what i could do to fix it?


 
Reply With Quote
 
 
 
 
Bill Marcum
Guest
Posts: n/a

 
      09-15-2003, 04:25 PM
On Mon, 15 Sep 2003 16:23:17 +0200, Kamir Wolfgang
<(E-Mail Removed)> wrote:
> i installed LFS during the last week just to learn some linux. it worked
> rather fine and was a lot of fun (and RTFM'ing).
>
> my problem is, that name resolution doesnot work.
>
> ping <ip-adress> works fine, ping <hostname> complains: unknown host:
> www.wcm.at
>
> i tried to install bind (nslookup/dig/host) and configured the
> /etc/resolv.conf just as on the other linux-machine where name resolution
> works
>
> //////
> cat resolv.conf
>
> serach localdoman

search
>
> nameserver 195.3.96.67
> nameserver 195.3.96.68
> ///////
>
> i can reach the DNS-Servers by pinging the ip-adress.
>
> also "nslookup www.wcm.at" works fine.
>
> ping, tracerout, lynx and everything i try gives me the message: unknown
> host: <hostname>
>
> does anyone know why this is and what i could do to fix it?
>

What is in /etc/hosts? Does the first line look like this?
127.0.0.1 localhost

What is the output of "ifconfig" and "route -n"?

--
Commander Spiral Pyjama Pseudo-Rhinocerous Feline Thingamajig Bill Marcum
(the First)
Ozy and Millie Name Generator http://heifong.phase.org/omname.php
 
Reply With Quote
 
Juha Laiho
Guest
Posts: n/a

 
      09-15-2003, 04:47 PM
"Kamir Wolfgang" <(E-Mail Removed)> said:
>i installed LFS during the last week just to learn some linux. it worked
>rather fine and was a lot of fun (and RTFM'ing).
>
>my problem is, that name resolution doesnot work.
>
>ping <ip-adress> works fine, ping <hostname> complains: unknown host:
>www.wcm.at
>
>i tried to install bind (nslookup/dig/host) and configured the
>/etc/resolv.conf just as on the other linux-machine where name resolution
>works

....
>i can reach the DNS-Servers by pinging the ip-adress.
>
>also "nslookup www.wcm.at" works fine.


Could be problems with /etc/nsswitch.conf. "nslookup" will always do a DNS
lookup; the others will do as is configured in nsswitch.conf.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
 
Reply With Quote
 
Gokul
Guest
Posts: n/a

 
      09-15-2003, 05:48 PM

> ping <ip-adress> works fine, ping <hostname> complains: unknown host:
> www.wcm.at


by hostname here, do you mean actual hostname (FQDN) or windows computer
names ? if its a windows name, then you need to use ip or actual hostname.
alternatively, you can add the ip address and hostname to /etc/hosts

--
Gokul
http://pod.homelinux.net


 
Reply With Quote
 
Kamir Wolfgang
Guest
Posts: n/a

 
      09-16-2003, 06:27 AM
no i mean not the local computernames in my lan... it's quite plain to me
that i need to put these into the hosts-file.. the problem i have concerns
"real" nameresolution with the nameservers located on the internet (the two
of my provider)

but thanks for your hint

Wolfgang

"Gokul" <(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...
>
> > ping <ip-adress> works fine, ping <hostname> complains: unknown host:
> > www.wcm.at

>
> by hostname here, do you mean actual hostname (FQDN) or windows computer
> names ? if its a windows name, then you need to use ip or actual hostname.
> alternatively, you can add the ip address and hostname to /etc/hosts
>
> --
> Gokul
> http://pod.homelinux.net
>
>



 
Reply With Quote
 
Kamir Wolfgang
Guest
Posts: n/a

 
      09-16-2003, 06:32 AM
Oh! It could be that there is actually no /etc/nsswitch.conf on my system
At least i didn't create it... (It is Linux From Scratch )

Unfortunately i can try it not until today evening because i'm at the office
and my system isn't running

But thank you for your advise, this could really be the solution

regards, wolfgang

"Juha Laiho" <(E-Mail Removed)> schrieb im Newsbeitrag
news:bk4q8g$dgg$(E-Mail Removed)-int...
> "Kamir Wolfgang" <(E-Mail Removed)> said:
> >i installed LFS during the last week just to learn some linux. it worked
> >rather fine and was a lot of fun (and RTFM'ing).
> >
> >my problem is, that name resolution doesnot work.
> >
> >ping <ip-adress> works fine, ping <hostname> complains: unknown host:
> >www.wcm.at
> >
> >i tried to install bind (nslookup/dig/host) and configured the
> >/etc/resolv.conf just as on the other linux-machine where name resolution
> >works

> ...
> >i can reach the DNS-Servers by pinging the ip-adress.
> >
> >also "nslookup www.wcm.at" works fine.

>
> Could be problems with /etc/nsswitch.conf. "nslookup" will always do a DNS
> lookup; the others will do as is configured in nsswitch.conf.
> --
> Wolf a.k.a. Juha Laiho Espoo, Finland
> (GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
> PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
> "...cancel my subscription to the resurrection!" (Jim Morrison)



 
Reply With Quote
 
Peteris Krumins
Guest
Posts: n/a

 
      09-16-2003, 08:12 PM
"Kamir Wolfgang" <(E-Mail Removed)> wrote in news:1063634497.30586
@newsmaster-03.atnet.at:

>
> does anyone know why this is and what i could do to fix it?
>


Do yourself a favor, install 'strace' and see why the program
cannot resolve the host.

Me to think you are missing 'libnss_dns' and 'libresolv' libraries.


P.Krumins
 
Reply With Quote
 
Kamir Wolfgang
Guest
Posts: n/a

 
      09-17-2003, 06:37 AM
Hello Guys!

The hint from Juha Laiho was a direct hit

in the file /etc/nsswitch.conf the line looked like
hosts: files
and i had to change this into
hosts: files dns

Now all programs will use name resolution instead of just looking into my
/etc/hosts file.

thank you all for your kind help!

regards, wolfgang


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/bin/hostname Vwaju Linux Networking 4 08-25-2008 07:56 PM
Nslookup succeeds, but ping fails to resolve hostname Curt McNamee Windows Networking 1 11-07-2006 03:04 PM
Can't ping by hostname from Fedora Core 5 PostName06@aol.com Linux Networking 2 04-12-2006 03:49 PM
can't get internal ip address when ping hostname Fong Windows Networking 2 02-17-2006 03:04 AM
Hostname Bit Twister Linux Networking 26 09-23-2004 06:27 AM



1 2 3 4 5 6 7 8 9 10 11