Date: Thu, 3 Apr 1997 02:49:38 +0200 (MET DST) From: Joachim Kuebart <joa@delos.stuttgart.netsurf.de> To: sweeting@tm.net.my Cc: freebsd-questions@freebsd.org, softweyr@xmission.com, langfod@dihelix.com Subject: Re: [Q] why not use routed ? Message-ID: <Pine.NEB.3.95.970403024307.1996C-100000@delos.stuttgart.netsurf.de> In-Reply-To: <v01540b0caf673bb43fea@[202.184.153.110]>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.95.970403024307.1996C-100000>