Hacker News new | ask | show | jobs
by trumpdong 6 days ago
How would the receiving host know which 127 address you imagined belongs to it?
1 comments

What do you mean “receiving host?” 127/8 is reserved for loopback. If you bind a socket to an interface with an address in that range, you can only use it to communicate with yourself. The sending and receiving hosts are the same.
I mean the host that receives the packet. Weren't you suggesting to use 127/8 as an alternative to link-local addresses?
No, I was saying that you can assign different loopback addresses to different interfaces even if the interfaces have been assigned the same routable IP address. This lets you distinguish them.

On my Mac, however, loopback addresses are only assigned to the `lo0` interface, not to physical interfaces. I don’t know anything about how other platforms handle it, so I caveated my explanation with “maybe nobody does this in practice.”

How does a loopback address for each interface help you do link-local stuff?