See: how to setup multi ip address on one network card for Linux /MAC MACBOOK
OS X, by default, only appears to configure 127.0.0.1 as loopback. To add others, run
sudo ifconfig lo0 alias 127.0.0.2/32 up
On Linux, this would look like
ifconfig lo:5 127.0.0.5 netmask 255.0.0.0 up