From Wikipedia:
The most commonly used IP address on the loopback device is 127.0.0.1
for IPv4, although any address in the range 127.0.0.0 to
127.255.255.255 is mapped to it.
This is not true, at least on FreeBSD:
$ ping 127.1.1.1
PING 127.1.1.1 (127.1.1.1): 56 data bytes
ping: sendto: Can't assign requested address
Is this correct behaviour?
Best Answer
FreeBSD (also OS X, and I believe NetBSD & OpenBSD) will respond to requests sent to configured addresses on the loopback interface, just as they would for addresses on any other interface -- If you want an answer you need to assign the address first:
On the logic behind this implementation, see RFC 3330:
(emphasis mine)
Linux and Windows are being "helpful" here, however from my chair answering a request that was sent to an address not assigned to this host is not correct behavior...