| ▲ | szszrk 4 days ago | |||||||||||||
one thing I always forget about, is that you have a whole network of 127.0.0.0/8 , not just one IP. So you can create multiple addresses with multiple separate "domains" mapped statically in /etc/hosts, and allow multiple apps to listen on "the same" port without conflicts. | ||||||||||||||
| ▲ | dietr1ch 2 days ago | parent | next [-] | |||||||||||||
Unlike IPv6 localhost that's just the [::1] address. I'm not sure if you can abuse IPv4 in IPv6 to do the same | ||||||||||||||
| ▲ | chasd00 4 days ago | parent | prev [-] | |||||||||||||
I never thought of using localhost like that, I'm surprised that works actually. Typically, if you want a private /8 you would use 10.0.0.0/8 but the standard 192.168.0.0/16 gives you a lot of address space ( 255^2 - 2 IPs (iirc) ) too. ..actually this is very weird. Are you saying you can bind to 127.0.0.2:80 without adding a virtual IP to the NIC? So the concept of "localhost" is really an entire class A network? That sounds like a network stack bug to me heh. edit: yeah my route table on osx confirms it. very strange (at least to me) | ||||||||||||||
| ||||||||||||||