Adding an additional IP to FreeBSD

To bind an additional IP to a FreeBSD server:

  1. Add an entry to the /etc/rc.conf
    ifconfig_$INTERFACE_alias0="inet $IP netmask 255.255.255.255
    This makes sure the IP is recognized on a reboot.
  2. Run the command:
    ifconfig $INTERFACE inet $IP netmask 255.255.255.255 alias
    This should create the alias for immediate use.

The $INTERFACE is the interface of your card. If you run ifconfig you will see all of your available interfaces listed.

$IP is the new IP you want to bind to the server.