LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-17-2004, 12:32 PM   #1
irfanhab
Member
 
Registered: Jan 2004
Location: Pakistan
Distribution: OpenSuse 10.2, Slackware 11, Solaris 10
Posts: 415

Rep: Reputation: 34
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
 
Old 09-17-2004, 12:41 PM   #2
Buto
Member
 
Registered: Sep 2004
Location: So Cal
Distribution: Slackware 12
Posts: 60

Rep: Reputation: 16
try pinging google by google.com instead of http://www.google.com
 
Old 09-17-2004, 02:12 PM   #3
irfanhab
Member
 
Registered: Jan 2004
Location: Pakistan
Distribution: OpenSuse 10.2, Slackware 11, Solaris 10
Posts: 415

Original Poster
Rep: Reputation: 34
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
 
Old 09-17-2004, 02:23 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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


Last edited by Tinkster; 09-17-2004 at 02:27 PM.
 
Old 09-17-2004, 02:37 PM   #5
irfanhab
Member
 
Registered: Jan 2004
Location: Pakistan
Distribution: OpenSuse 10.2, Slackware 11, Solaris 10
Posts: 415

Original Poster
Rep: Reputation: 34
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...
 
Old 09-17-2004, 02:45 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why doesnt my USB mouse doesnt work? barkha Linux - Hardware 2 08-16-2005 11:31 AM
x86 board PCM 6892 with dual ethernet port.eth1 doesnt ping if eth0 cable removed rani_162 Linux - Newbie 0 07-23-2005 12:29 PM
'ping -b' / ping <switch> doesn't work bmike1 Linux - Networking 2 01-10-2005 02:48 PM
xmame doesnt work unluckyman Linux - Newbie 2 07-14-2004 07:28 AM
gethostbyname() doesnt always work nodger Programming 1 01-22-2004 10:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration