Have you wondered what is local host’s IP and 127.0.0.1 what it actually is?How does 127.0.0.1 work? Why is it called so?

The basic logic behind this address is that it is used to establish a connection to the same computer used by the end-user. Below is a detailed answer by a user on Super User forum.

How does 127.0.0.1 work? Why is it called so?

Here is a geeky answer from a techie : Most developers use local host 127.0.0.1 to test their applications before actually deploying it. When you try to establish a network connection to the 127.0.0.1 loopback address, it works in the same manner as making a connection with any remote device. However, it avoids connection to the local network interface hardware. But, why does the localhost IP address starts with 127? Well, 127 is the last network number in a class A network. It has a subnet mask of 255.0.0.0. So, the first assignable address in the subnet is 127.0.0.1. However, if you use any other numbers from the host portions, it should work fine and revert to 127.0.0.1. So, you can ping 127.1.0.1 if you like. You might also ask why the last network number was chosen to implement this. Well, the earliest mention of 127 as loopback dates back to November 1986 RFC 990. And, by 1981, 0 and 127 were the only reserved Class A networks. You can find more information and discussion about local host from Stack Exchange users here.