Web Hosting Talk







View Full Version : ips and freebsd


davidb
08-03-2001, 11:56 PM
Im trying to alias a couple of ip address on my ethernet card. All works fine, until I reboot. Any ideas on how to make it stay on?

allan
08-04-2001, 12:17 AM
Make sure in your interface configuration you add the following line:

ONBOOT=yes

blofish
08-06-2001, 10:06 PM
You simply make a .sh script in /usr/local/etc/rc.d

all your bootup scripts should be here

make it the first one to load by prepending it with the lowest number.

for example
01_network.sh



!/bin/sh

# slurp up computername.conf
#. /usr/local/etc/rc.d/computername.conf
s#tart_only

# comment out the above its simply my routines to start stop daemons and logging on boot

echo -n 'ifconfig: '

# replace <ip> with the ip to alias
# replace fxp0 with your network interface card

/sbin/ifconfig fxp0 alias <ip> netmask 0xffffffff
/sbin/ifconfig fxp0 alias <ip> netmask 0xffffffff
/sbin/ifconfig fxp0 alias <ip> netmask 0xffffffff



and thats about it

cperciva
08-06-2001, 11:15 PM
Edit /etc/rc.conf

ifconfig_fxp0_alias0 = "inet 192.168.0.2 netmask 255.255.255.0"

or whatever numbers are appropriate.

Planet Z
08-07-2001, 12:16 AM
I concur with cperciva (o wise freebsd guru). rc.conf is by far the easiest way. No need to make startup scripts, etc. Just make sure you start off with alias0 and not alias1 (it took me a while to get used to that, don't ask).

cperciva
08-07-2001, 12:28 AM
Originally posted by Planet Z
I concur with cperciva (o wise freebsd guru)
FreeBSD guru? Hardly. I may have my own customized versions of half a dozen of the BSD utilities, but I haven't even submitted them, let alone had my patches committed. And I think getting code into the FreeBSD source tree is an absolute requirement for qualifying as a "FreeBSD guru".

Maybe you meant "FreeBSD evangelist"?

davidb
08-07-2001, 12:43 AM
I found that way a couple of days ago, but thanks for showing me its a good way. I just dont like fillinh rc.conf with a lot of stuff, I had 32 ips to add(thank god for cut and paste). I really hate from going to linux to freebsd. While im at it, someone wanna tell me how to change the freakin date. I change the month, then I change the day, and the month goes back to what it just was. I looked at the man page and I JUST CANT GET IT, IM GOING CRAZY.

As to planets recent post, I am a red hat luser, but im trying to change :)

Planet Z
08-07-2001, 12:43 AM
Originally posted by cperciva
Maybe you meant "FreeBSD evangelist"?

Perhaps. But around here you know more than most. Too many RedHat lusers. :rolleyes: