When I ping my network address the loopback interface answers

On my computer if I ping the address associated to my network card (enp0s31f6 - 192.168.1.15) the loopback device will be the device from where the answer actually come.

I know what the loopback device is, but why does this relationship exist? It is because in every case there must be an out interface?

1 Answer

192.168.1.15 is the IPv4 address of your device assigned in that particular network. By pinging that address you are actually pinging the localhost or the same "server" on which you are currently working on. There are basically 3 ways to access localhost;

  1. 127.0.0.1
  2. localhost
  3. IPv4 assigned within the network (here 192.168.1.15)

So, when you access/ping 192.168.1.15, the request goes to the device with that IPv4. But here it is the same device, thus acts as a loopback device. Consider pinging the same IP from another device. You'll get reply from the earlier said device and at that time it will not work as loopback device.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like