Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-10-2009, 11:37 PM
|
#1
|
|
Member
Registered: Sep 2008
Location: Coalmont, Canada
Distribution: Kubuntu
Posts: 48
Rep:
|
Ping default timeout setting
I am running Kubuntu 6.04 and I've been using ping without setting any switches. When the host is down then it returns "unknown host". According to the man page the -W (timeout) option can be set, but there is no mention of what the default setting is. Can someone please enlighten me?
|
|
|
|
02-11-2009, 12:38 AM
|
#2
|
|
Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,861
Rep: 
|
Hi -
It's entirely implementation dependent.
I believe the default value for most versions of Linux is 10 seconds.
'Hope that helps .. PSM
|
|
|
|
02-11-2009, 12:50 AM
|
#3
|
|
Member
Registered: Nov 2008
Location: Madison, WI
Posts: 34
Rep:
|
For iputils 2007-11-27 it seems to be 10 seconds at least it is the value it is initialized to. I am not sure if it scales that as packets are successfully received or not.
The man page give:
-W timeout
Time to wait for a response, in seconds. The option affects only timeout in absence of any responses, otherwise ping waits for two RTTs.
You can get the source code yourself from iputils if you wanted to dig into it.
|
|
|
|
02-11-2009, 01:22 AM
|
#4
|
|
Member
Registered: Sep 2008
Location: Coalmont, Canada
Distribution: Kubuntu
Posts: 48
Original Poster
Rep:
|
Thankyou for responding paulsm4 and j-osh.
It seems that if I ping my ISP then it goes on forever if I don't stop it. However if there is no response then it goes for a minute or more. That is the time I was interested in right now.
I just pinged a non existant url and it quit after about 5 seconds. Trying it the second time it quit right away. So, yes, there is some scaling factor relating to things beyond my emediate control.
Perhaps I'm not asking the right question since the DNS servers are obviously involved in the time that I'm looking for. I didn't realize that the situation was more complicated.  I'll try an old fashioned stop watch next time it happens.
|
|
|
|
02-18-2009, 06:48 AM
|
#5
|
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
Minor point: Are you sure it's "Kubuntu 6.04" not "Kubuntu 6.06" like the rest of 'buntu Dapper?
|
|
|
|
02-20-2009, 10:05 PM
|
#6
|
|
Member
Registered: Sep 2008
Location: Coalmont, Canada
Distribution: Kubuntu
Posts: 48
Original Poster
Rep:
|
Quote:
Originally Posted by archtoad6
Minor point: Are you sure it's "Kubuntu 6.04" not "Kubuntu 6.06" like the rest of 'buntu Dapper?
|
Perhaps not so minor.
Code:
$ uname -a
Linux SCO 2.6.15-53-386 #1 PREEMPT Mon Nov 24 17:50:35 UTC 2008 i686 GNU/Linux
$ cat /etc/issue
Ubuntu 6.06.2 LTS \n \l
So yes, you're right. 
|
|
|
|
02-20-2009, 11:17 PM
|
#7
|
|
Senior Member
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
|
Quote:
Originally Posted by Ole Juul
I just pinged a non existant[sic] url and it quit after about 5 seconds. Trying it the second time it quit right away. So, yes, there is some scaling factor relating to things beyond my emediate[sic] control.
|
First off, you cannot ping Uniform Resource Locators as they contain extra meta information that is not contained in DNS. What you meant to say was "hostname".
Second, if a hostname cannot be resolved to an IP address, there's no IP to send a packet to, hence one cannot be sent. This is entirely different than trying to ping an IP address that cannot be reached by ICMP messages.
Most DNS caches these days have "negative caching", which is to say they not only remember recent hostname -> IP mappings that they've looked up, but they also remember when they couldn't find an IP for a particular hostname.
|
|
|
|
02-21-2009, 04:35 AM
|
#8
|
|
Member
Registered: Sep 2008
Location: Coalmont, Canada
Distribution: Kubuntu
Posts: 48
Original Poster
Rep:
|
Thank you for the clarification and information chort. (And the spelling/typo corrections too  .) That all makes sense.
I still don't know what the default timeout is for my particular Linux installation's ping executable. Generally I use the one that comes with WATTCP (presumably by Engelke) and it only does one ping by default and spaces multiple pings one second apart - limited perhaps, but friendly. Linux is less accessible and sparsely documented so I have to ask other people about many things.
Being an amateur (and beginner), the incomplete man page for ping is almost useless to me. It is both generic and unfinished. Can someone point me to some practical documentaion for this command as it is compiled into Ubuntu?
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:01 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|