5 ms·
Interesting. Linux also does that with any other address/subnet added to "lo": # ping -c 1 10.10.10.10 1 packets transmitted, 0 received # ip addr add 1
by nousermane 5y ago
Interesting. Linux also does that with any other address/subnet added to "lo":
# ping -c 1 10.10.10.10
1 packets transmitted, 0 received
# ip addr add 10.10.10.1/24 dev lo
# ping -c 1 10.10.10.10
64 bytes from 10.10.10.10: time=0.023 ms
1 packets transmitted, 1 received
- edoceo 5y agoThe 127 I get. This one seems odd though.
- toast0 5y agoIt seems to me (based on reported behavior), that Linux is special casing the loopback interface: when you add an address with a netmask to the loopback interface, it considers all of those addresses as local addresses. As opposed to a normal interface where only the specific address is a local address, but the rest of the network specified are accessible through that interface. Maybe one /8 wasn't enough addresses for you, so you added more? Doesn't seem like an unreasonable way to behave, even if it's different than BSD behavior; it certainly makes it easier to use lots of loopback addresses.