原因
FreeBSD (also OS X, and I believe NetBSD & OpenBSD) will respond to requests sent to configuredaddresses on the loopback interface, just as they would for addresses on any other interface – If you want an answer you need to assign the address first:
1 | mgraziano@monitor ~]$ ifconfig lo0 |
解决
1 | sudo ifconfig lo0 alias 127.0.0.2 netmask 0xFFFFFFFF |
via serverfault.com