To add a secondary (virtual) IP address to an existing interface use the following command:
sudo ifconfig lo0 inet 192.168.0.1 netmask 255.255.255.0 alias
to remove it again use:
sudo ifconfig lo0 inet 192.168.0.1 netmask 255.255.255.0 -alias
simple as that 🙂