From owner-freebsd-questions Fri Jul 7 22:32: 9 2000 Delivered-To: freebsd-questions@freebsd.org Received: from penguin.prod.itd.earthlink.net (penguin.prod.itd.earthlink.net [207.217.120.134]) by hub.freebsd.org (Postfix) with ESMTP id 3F7E437B70B for ; Fri, 7 Jul 2000 22:32:07 -0700 (PDT) (envelope-from cjc@earthlink.net) Received: from dialin-client.earthlink.net (pool0625.cvx21-bradley.dialup.earthlink.net [209.179.194.115]) by penguin.prod.itd.earthlink.net (8.9.3-EL_1_3/8.9.3) with ESMTP id WAA07922; Fri, 7 Jul 2000 22:32:05 -0700 (PDT) Received: (from cjc@localhost) by dialin-client.earthlink.net (8.9.3/8.9.3) id WAA00901; Fri, 7 Jul 2000 22:30:29 -0700 (PDT) Date: Fri, 7 Jul 2000 22:29:58 -0700 From: "Crist J. Clark" To: Jeff Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Multiple Ip Addresses on single Nic Message-ID: <20000707222958.C416@dialin-client.earthlink.net> Reply-To: cjclark@alum.mit.edu References: <000501bfe849$35c19940$058039cf@noc.wilkshire.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <000501bfe849$35c19940$058039cf@noc.wilkshire.net>; from jeff@wilkshire.net on Fri, Jul 07, 2000 at 03:26:11PM -0400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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