Thread: ping website

  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    23

    ping website

    ping www.yahoo.com
    ping: unknown host www.yahoo.com
    if i ping a website and the web server is down, i will get a response like the above. however, it took like 16 seconds to get the message, anyone know why?

  2. #2
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    If I'm correct, "ping" sents a requests via UDP and simply counts the time until it gets an Ack message. After 16 seconds, I suppose it just gives up.
    Sent from my iPad®

  3. #3
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    If ping receives server name instead of ip, it should firstly resolve the name...
    So before actual ICMP packet the NBNS is sent, asking what is the IP of the server

    If no response is received during the timeout then message is printed that the host is unknown

    If the host ip is resolved sucessully but it does not respons to the ICMP request the timeout message is printed (4 times by default)
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How's my new Website
    By asbo60 in forum General Discussions
    Replies: 53
    Last Post: 07-10-2009, 10:10 AM
  2. ping script doesn't work?
    By userpingz in forum C Programming
    Replies: 3
    Last Post: 05-31-2009, 07:53 PM
  3. Replies: 8
    Last Post: 05-07-2009, 11:31 AM
  4. IPv6 ping in windows...problem..lots of ode:(
    By Neill KElly in forum C Programming
    Replies: 3
    Last Post: 04-27-2009, 11:50 PM