Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm running the example in hiredis, which is using "" as the redis server IP, and it is running properly. Actually, the redis server is running on the same machine. I know that "" is the IP address of "lo", but how about ""? Is it the same as ""?

share|improve this question

migrated from Feb 24 '12 at 18:03

This question came from our site for professional and enthusiast programmers.

1 Answer 1


The most commonly used IP address on the loopback device is for IPv4, although any address in the range to is mapped to it.

or from the RFC itself: - This block is assigned for use as the Internet host loopback address. A datagram sent by a higher level protocol to an address anywhere within this block should loop back inside the host. This is ordinarily implemented using only for loopback, but no addresses within this block should ever appear on any network anywhere [RFC1700, page 5].

For fun, try by pinging:

$ ping
PING ( 56(84) bytes of data.
64 bytes from icmp_req=1 ttl=64 time=0.110 ms
64 bytes from icmp_req=2 ttl=64 time=0.065 ms
--- ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.065/0.087/0.110/0.024 ms
share|improve this answer
The Wikipedia page has since changed, and now says "although any address in the range to is mapped to it", rendering the gist of this answer in direct conflict with Wikipedia. – SilverSkin Sep 18 '12 at 12:06
@SilverSkin Would you mind explaining what you mean? The only difference between what's in answer and what's in Wikipedia now is that they (correctly) excluded and, which are network / broadcast addresses. The gist is still the same - 127.x.x.x == (except for and, which is expected on any /8 network). – Sep 20 '12 at 1:17
So there's no difference between binding to versus binding to So why does the hiredis bother with, if it's the just the same address? Also what happens if you did send a message to – CMCDragonkai Jun 14 '14 at 5:30
Need to mention that it is not the same in OS X, which only route to loopback. See here. – Bruce Li Sep 8 '14 at 0:54
Interesting, thanks for the info @BruceLi! – Sep 28 '14 at 14:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.