Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jul 2000 22:29:58 -0700
From:      "Crist J. Clark" <cristjc@earthlink.net>
To:        Jeff <jeff@wilkshire.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Multiple Ip Addresses on single Nic
Message-ID:  <20000707222958.C416@dialin-client.earthlink.net>
In-Reply-To: <000501bfe849$35c19940$058039cf@noc.wilkshire.net>; from jeff@wilkshire.net on Fri, Jul 07, 2000 at 03:26:11PM -0400
References:  <000501bfe849$35c19940$058039cf@noc.wilkshire.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 07, 2000 at 03:26:11PM -0400, Jeff wrote:
> Hello,
> 
> I was wondering if anyone could help with a question concerning
> a virtual hosting server I am creating with FreeBSD 4.0
> 
> I wish to add multiple Ip Addresses to a single nic card for
> virtual hosting services. In the past I have used the following with no
> problem:
> (Note that I am substituting my real ip addresses with fake ones)
> 
> /etc/rc.conf entry
> 
> ifconfig fxp0 inet 192.168.10.5 netmask 255.255.255.0
> ifconfig fxp0 inet 192.168.10.6 netmask 255.255.255.255 alias
> route add -host 192.168.10.6 127.0.0.1 0

OK, I guess you are saying that you put those _commands_ in
/etc/rc.conf? Don't do that. DO NOT PUT COMMANDS IN /etc/rc.conf,
On the manpage, rc.conf(5),

     The purpose of rc.conf is not to run commands or perform system startup
     actions directly.  Instead, it is included by the various generic startup
     scripts in /etc which conditionalize their internal actions according to
     the settings found there.

rc.conf is not guaranteed to be run only once during startup. It is
also run during normal operation (by periodic(8) for example).

You should have,

  ifconfig_fxp0="inet 192.168.10.5 netmask 255.255.255.0"
  ifconfig_fxp0_alias0="192.168.10.6 netmask 255.255.255.255"

Your third command in rc.conf is extraneous and is not needed.
-- 
Crist J. Clark                           cjclark@alum.mit.edu


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000707222958.C416>