Pinging personal IP versus pinging loopback

Jon Phenow picture Jon Phenow · Feb 14, 2011 · Viewed 9k times · Source

What's the conceptual difference? Yes I realize they're both supposed to produce similar results but I thought the idea with the loopback was that it doesn't actually reach the transmission step of the stack. If that's true then why does pinging your own ip work as fast? Does pinging your own address treat it as a loopback? I thought there was a fundamental difference to how the two were treated.

Thanks in advance for any help!

Answer

Brad picture Brad · Feb 14, 2011

Think of it as a different interface. A different network card.

When you ping the loopback, you are pinging yourself, and there is somewhere (where varies from system to system, slightly) something representing a network interface on yourself.

When you ping your IP address, you ping yourself, but it goes through those drivers for that network card first, or at least can.

Implementations of this behavior do in fact vary from system to system, but that's conceptually how it works.

Also, you won't notice a time difference, as both of them are extremely fast.