LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 02-10-2009, 11:37 PM   #1
Ole Juul
Member
 
Registered: Sep 2008
Location: Coalmont, Canada
Distribution: Kubuntu
Posts: 48
Blog Entries: 1

Rep: Reputation: 15
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?
 
Old 02-11-2009, 12:38 AM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

It's entirely implementation dependent.

I believe the default value for most versions of Linux is 10 seconds.

'Hope that helps .. PSM
 
Old 02-11-2009, 12:50 AM   #3
j-osh
Member
 
Registered: Nov 2008
Location: Madison, WI
Posts: 34

Rep: Reputation: 16
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.
 
Old 02-11-2009, 01:22 AM   #4
Ole Juul
Member
 
Registered: Sep 2008
Location: Coalmont, Canada
Distribution: Kubuntu
Posts: 48
Blog Entries: 1

Original Poster
Rep: Reputation: 15
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.
 
Old 02-18-2009, 06:48 AM   #5
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
Minor point: Are you sure it's "Kubuntu 6.04" not "Kubuntu 6.06" like the rest of 'buntu Dapper?
 
Old 02-20-2009, 10:05 PM   #6
Ole Juul
Member
 
Registered: Sep 2008
Location: Coalmont, Canada
Distribution: Kubuntu
Posts: 48
Blog Entries: 1

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by archtoad6 View Post
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.
 
Old 02-20-2009, 11:17 PM   #7
chort
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: Reputation: 69
Quote:
Originally Posted by Ole Juul View Post
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.
 
Old 02-21-2009, 04:35 AM   #8
Ole Juul
Member
 
Registered: Sep 2008
Location: Coalmont, Canada
Distribution: Kubuntu
Posts: 48
Blog Entries: 1

Original Poster
Rep: Reputation: 15
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?
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ping and timeout sjuk Linux - Newbie 5 10-31-2006 03:44 AM
Setting GRUB default timeout duration Pax Digita Linux - Newbie 2 04-13-2006 02:21 PM
Eggdrop has quit (Ping timeout: 181 seconds) Kroppus Linux - Software 0 11-13-2003 11:32 AM
setting default page size and default tray lived4eva Linux - General 1 11-04-2003 02:39 PM
lan problems (ping timeout) Bungholio Linux - Networking 11 07-07-2003 01:29 PM


All times are GMT -5. The time now is 09:55 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration