LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   ping doesnt work (http://www.linuxquestions.org/questions/linux-general-1/ping-doesnt-work-231838/)

irfanhab 09-17-2004 12:32 PM

ping doesnt work
 
Hi all,


I was working on a utility which plays a sound when the internet connection is disconnected, well I though I would ping a site, until I get an error, then provoke the sound function. But then I found out that ping doesnt work at all although all other services work.

Even when I'm connected it says

root@darkstar:~# ping http://www.google.com
ping: unknown host http://www.google.com

It says the same when I'm not connected, Whats the problem

Buto 09-17-2004 12:41 PM

try pinging google by google.com instead of http://www.google.com

irfanhab 09-17-2004 02:12 PM

root@darkstar:~# ping google.com
PING google.com (216.239.39.99) 56(84) bytes of data.

it worked! But why, doesnt it accept the full address

Tinkster 09-17-2004 02:23 PM

Because http is not part of an address, it's a protocol
that you instruct the browser to use for contacting an
actual ip address ... similariliy, if you tried
ping www.google.com/linux it wouldn't work either,
because /linux is just a reference to a location on
the server with the IP address www.google.com


The example is a bit far fetched, but think of the address
(www.xxx.com) as a TV set, http and https are different
access-methods and the bits after the first / are the channels.


Cheers,
Tink


irfanhab 09-17-2004 02:37 PM

Quote:

The example is a bit far fetched, but think of the address
(www.xxx.com) as a TV set, http and https are different
access-methods and the bits after the first / are the channels.
I aint that nooB...

Tinkster 09-17-2004 02:45 PM

Quote:

Originally posted by irfanhab
Quote:

But why, doesnt it accept the full address
I aint that nooB...
Sorry....
it wasn't that obvious ...


Cheers,
Tink


All times are GMT -5. The time now is 12:13 AM.