When I do ping stackoverflow.com from command window in Windows, how does it get the ip address of stackoverflow. Basically how does the entire thing work ?

  • 7
    Isn't anybody going to start w/ the keyboard controller and work out from there? He did say "the entire thing"... Jul 15, 2010 at 14:39
  • 1
    Heh, I was thinking about it, Evan, but then realized it would be a big pain in the rear to explain. :)
    – EEAA
    Jul 15, 2010 at 14:40
  • 1
    Sometimes the time and effort is not deserved.
    – Warner
    Jul 15, 2010 at 14:41
  • Evan, I would have thought you could explain all of it, including the keyboard controller within 5 mins of the question being asked! Jul 15, 2010 at 14:44
  • @Evan Anderson = sic
    – Campo
    Jul 15, 2010 at 14:49

4 Answers 4


For @Evan (because I'm waiting for rm -rf to finish before i can do work):

Here is the process of ping resolving a website:

  1. An electrical signal in your brain generates what is known as an idea.
  2. This idea is converted to another electrical signal, that travels from your brain, down your spine and into the nerves in your hands where it is processed by the muscles in your fingers.
  3. Your fingers convert this electrical energy into mechanical energy which forces the proper key down on your keyboard.
  4. The depression of the switch on the keyboard triggers another electrical signal to travel down the wire (or over the airwaves) from your keyboard which triggers an interrupt at the hardware level.
  5. This interrupt alerts the operating system of a pending action it needs to take.
  6. The kernel process the signal from the keyboard and outputs feed back to the screen
  7. the light energy on the screen is converted into electrical energy by your eye and sent to the brain for processing
  8. Once the brain has processed and confirmed the readout from the screen is what you want, repeat steps 1-8 until you send the signal to depress the "enter" key
  9. The ping command then takes the input - in this case ping serverfault.com - and sends a signal to the Operating system to do a DNS LOOKUP
  10. The operating system sends a signal to the DNS subsystem, which generates a packet and sends it down the OSI model until it reaches the hardware
  11. an electrical signal is generated on the nic and sent out the ethernet cable (or whatever physical connectivity if fiber s/electrical/optical )
  12. The signal goes through intermediary network connectivity (switches/routes/etc) until it reaches the DNS SERVER
  13. The DNS SERVER processes the request and reverses steps 10-11 to get back to your machines where it is processed by the OS and passed back to ping.

(I skimped on a couple of places mostly because i ran out of juice and only have 1/2 a cup of coffee in me)

  • Skimping or no skimping, that was impressive considering it's not even Friday. Jul 15, 2010 at 15:01
  • @Zypher = > was a great answer. Though when I said the entire thing I did not expect electric signal from brain in the answer :).
    – Prashant
    Jul 15, 2010 at 17:52

It is called DNS.

  • and en.wikipedia.org/wiki/Ping Jul 15, 2010 at 14:36
  • If I wouldn't have hit the captcha, it would have been a simul-post. :) +1.
    – jscott
    Jul 15, 2010 at 14:37
  • Yah damn thing! hahaha. I think you beat me.. +1 for you too!
    – Campo
    Jul 15, 2010 at 14:37

First it uses your local host file then it uses your primary dns server, if that fails it goes to the secondary dns server.

  • Why others forget the host file.
    – Pipe
    Jul 15, 2010 at 16:29

Take a look at the following...



Also look up routing metric's

These are some fundemental networking

  • 2
    Although these links may answer the question, it is preferred for you to summarize the links so we have a actual answer here Oct 8, 2012 at 18:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.