3 ms·
What I don't understand is why IPv6 only has a single loopback address, instead of a /8 or /16. This would enable cool things like the OS mapping each subdomain
by CodesInChaos 4y ago
What I don't understand is why IPv6 only has a single loopback address, instead of a /8 or /16. This would enable cool things like the OS mapping each subdomain of localhost to a distinct IPv6 address.
- Faaak 4y agoYou can use ::ffff:0:0/96 or fc00::/7 for that.
- kortex 4y agoIs it possible to just use ::ffff:0:0/96 to map them? e.g. ::ffff:7f00:0/104 maps to 127/8
- zinekeller 4y agoEveryone suggesting that ::ffff:0:0/96 is a solution should note that not all network stacks are "unified". Windows' stack isn't unified (try accessing http://[::ffff:7f00:1]/ http://[::ffff:7f00:1]/ while having a loopback server and it won't work) and most non-Linux embedded OSes separate the network stack for size reasons (to the chagrin of IPv6 promoters, but most of them are simply trying to fit something into the half-MB EEPROMS like how most IoT devices don't have 5GHz Wifi support).
- X-Istence 4y agoThe server would need to bind to that address, and then it should work fine as long as that address is assigned to a loopback interface. That's the same as any system right now. If I bind to 127.0.0.1 I don't automatically get traffic for or listen on 127.0.0.2
- zinekeller 4y ago> The server would need to bind to that address, and then it should work fine as long as that address is assigned to a loopback interface. ... you haven't worked on Linux or Windows networking stacks. On Linux, typing http://[::ffff:7f00:1]/ http://[::ffff:7f00:1]/ when you have a bound server on 127.0.0.1 will automatically connect to 127.0.0.1. Conversely, it's a illegal operation in Windows: you cannot legally bind even with SYSTEM privileges.