From owner-freebsd-questions Wed Apr 2 16:51:27 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id QAA11653 for questions-outgoing; Wed, 2 Apr 1997 16:51:27 -0800 (PST) Received: from delos.stuttgart.netsurf.de ([194.163.56.1]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id QAA11636 for ; Wed, 2 Apr 1997 16:51:17 -0800 (PST) Received: by delos.stuttgart.netsurf.de (Smail3.1.29.1/delos.LF.net) via LF.net GmbH Internet Services from localhost with smtp for freefall.freebsd.org id m0wCaih-0000UCC; Thu, 3 Apr 97 02:49 WET DST Date: Thu, 3 Apr 1997 02:49:38 +0200 (MET DST) From: Joachim Kuebart To: sweeting@tm.net.my cc: freebsd-questions@freebsd.org, softweyr@xmission.com, langfod@dihelix.com Subject: Re: [Q] why not use routed ? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Tue, 1 Apr 1997 sweeting@tm.net.my wrote: > A lot of thanks to David Langford and Wes Peters for the advice on routing. > Switching routed off and adding the route works fine. > At the moment i call a simple script from /etc/rc.local, which is : > > ifconfig ep0 202.184.153.5 netmask 255.255.255.255 alias > ifconfig ep0 202.184.153.30 netmask 255.255.255.255 alias > ifconfig ep0 202.184.153.31 netmask 255.255.255.255 alias > route add -host 202.184.153.13 127.0.0.1 > /usr/local/sbin/httpd > > No problems. I was just wondering if it should be possible to > do the ifconfig aliasing and addition of the route within /etc/sysconfig. > > I tried this in /etc/sysconfig : > ifconfig_lo0="inet localhost" > ifconfig_ep0="inet 202.184.153.13 netmask 255.255.255.0" > ifconfig_ep0="inet 202.184.153.5 netmask 255.255.255.255 alias" > > and that didn't work. should it ? > > chas If you look at the interpreting code in /etc/netstart it will become clear that this approach won't work: what you are doing is defining one variable (ifconfig_ep0) and right after that redefining it. The code will only see the last definition and do just that - your earlier definitions are ignored. In RELEASE-2.2 which I'm using there is a specific solution for your problem: Define ifconfig_ep0="inet 202.184.153.13 netmask 255.255.255.0" ifconfig_ep0_alias0="inet 202.184.153.5 netmask 255.255.255.255" Note: you do NOT specify the "alias" in the ifconfig_XXX_alias lines! You can define as many aliases as you like (just number them - ...alias0, ...alias1, ...) c u Jo