How to bind a range of IP’s on BSD based hosts ( FreeBSD, OpenBSD )

First login to your FreeBSD host as a ‘non-root’ user. You should have an account in the ‘wheel’ group that you can do this with. Once you have logged in run the following commands to switch users to ‘root’

su –

The prompt should have a # in it now meaning you are the ‘root’ user.

Now run these commands.

ee /etc/rc.conf

Using – as an example

ifconfig_fxp0=”inet netmask″
ifconfig_fxp0_alias0=”inet netmask″
ifconfig_fxp0_alias1=”inet netmask″
ifconfig_fxp0_alias2=”inet netmask″
ifconfig_fxp0_alias3=”inet netmask″

Note that changes to the ‘_aliasNN’ and also the ‘netmask’ changes to ‘’ from ‘’. The IP’s will not work unless you use a ‘’ netmask for the alias IP’s.

Once you have added the enteries to your file you need to press ‘ESC’ and then select the ‘Save File’ option. You can then reboot the server and the IP’s will be bound and ready to use.

You can also use ‘ifconfig’ on the command line to add them without a reboot.

Please see the following man pages for more information.

man ifconfig
man rc.conf
man netstat