Via the System Preferences: Network pane
- Go to System Preferences → Network.
- Click on Ethernet (or AirPort)
- Click on the Configuration Wheel → Duplicate Service...
You can now configure each instance with different settings, and you're done.
On the Terminal
If you just need to quickly assign an IP/subnet alias to an interface, you can do it with the
ifconfig command in the Terminal.
sudo ifconfig <if> alias 192.168.2.77/24