Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pinging personal IP versus pinging loopback

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!

like image 854
Jon Phenow Avatar asked Sep 15 '25 00:09

Jon Phenow


1 Answers

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.

like image 76
Brad Avatar answered Sep 17 '25 18:09

Brad