howtogeek at April 23rd, 2013 16:03 — #1
Originally published at: http://www.howtogeek.com/149227/whats-the-difference-between-127.0.0.0-and-127.0.0.1/
Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.
iszi at April 23rd, 2013 16:12 — #2
I get why
127.0.0.0 won't work, because that's the network ID - it doesn't actually target any device. But what I find an interesting oddity is that neither will the broadcast address of
127.255.255.255. I suppose it makes sense when I think about it, but I can't quite explain it.
mrpaul at April 23rd, 2013 17:42 — #3
Just as you have said. The 127.255.255.255 is a broadcast address. It's mean to be used for things that expect all hosts on the network to respond (like arp). The only network that use can use the subnet id & broadcast on is anything with a netmask of 255.255.255.254 (/31 for us router folks).
aviad_raviv at April 25th, 2013 10:26 — #4
The one thing to note, is that when you use 127.0.0.x, your packet doesn't actually leave the TCP/IP stack of your OS. This makes it so many firewall/Anti-Virus programs that affect "regular" communications, wouldn't impede loopback tests but WILL, for said "regular" traffic... making the "diagnostic" designation of this network, utterly useless... :\
taygibb at April 25th, 2013 10:40 — #5
@aviad_raviv it will allow you to make sure your TCP/IP stack is properly initialized though. Technically, this is still a "diagnostic" test.
netpilot at May 1st, 2013 03:02 — #6
@aviad_raviv I agree with @taygibb - Testing with a loopback address can tell you if your TCP/IP stack is working in spite of any misbehaving firewall/Anti-Virus programs.
On a related note, one advantage of using the loopback address rather than the IP of the host for internal communications is that does 'shortcut' the firewall, anti-virus, hardware drivers, and their filters, and is, therefore, much faster.
@MrPaul That's interesting. I wasn't aware of that. I was always under the impression that the broadcast address was the address one used to broadcast to all on the current subnet.