Help - Search - Members - Calendar
Full Version: HOWTO: Bind Additional IPs to your server
The Planet Forums > Operating Systems > BSD > BSD HOWTOs
Eric
To bind IPs to your FreeBSD server:

Open /etc/rc.conf with your editor
# edit /etc/rc.conf

You should see a line which looks like this:

ifconfig_em0="inet 67.15.18.500 netmask 255.255.254.0"

Directly under it add this
ifconfig_em0_alias0="inet 67.15.18.501 netmask 0xffffffff"

Change 67.15.18.501 to whatever your additional IP is.

If you have more then one additional IPs increase the number after alias for each ip
example:

ifconfig_em0_alias0="inet 67.15.18.501 netmask 0xffffffff"
ifconfig_em0_alias1="inet 67.15.18.502 netmask 0xffffffff"
ifconfig_em0_alias2="inet 67.15.18.503 netmask 0xffffffff"
etc...


Save the file and run /etc/netstart
bandido
Reboot? why? only need run /etc/netstart and done icon_biggrin.gif
Eric
QUOTE
Originally posted by bandido
Reboot? why? only need run /etc/netstart and done icon_biggrin.gif


I was not aware of that command.
I guess thats better then rebooting.
bluePrint
For those not familiar with hexadecimal, the 0xffffffff in:
ifconfig_int_alias[0-x]="inet 111.222.333.444 netmask 0xffffffff"

is just 255.255.255.255 in decimal, and can just as well be written in dotted-decimal notation instead of the slightly more complex hex.

/bluePrint
b65ran
QUOTE (bluePrint @ Mar 18 2004, 03:38 AM) *
For those not familiar with hexadecimal, the 0xffffffff in:
ifconfig_int_alias[0-x]="inet 111.222.333.444 netmask 0xffffffff"
is just 255.255.255.255 in decimal, and can just as well be written in dotted-decimal notation instead of the slightly more complex hex.
/bluePrint


How do you know how many ips are assigned to your server ?
eth00
QUOTE (b65ran @ May 28 2007, 02:31 AM) *
How do you know how many ips are assigned to your server ?


You have to request them within orbit or SC and will justify each and every ip. Once they approve the request you will be given the IPs to bind.
b65ran
QUOTE (eth00 @ May 28 2007, 12:19 AM) *
You have to request them within orbit or SC and will justify each and every ip. Once they approve the request you will be given the IPs to bind.


mine is ifconfig_bge0="inet ***.***.**.** netmask ***.***.***.***

so I have to add

ifconfig_bge0_alias0="inet ***.***.**.** netmask 0xffffffff" like this ?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.