Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Jun 2001 11:15:48 +0300
From:      Peter Pentchev <roam@orbitel.bg>
To:        ryan beasley <ryanb@enteract.com>
Cc:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/22489: mass IP aliasing via ifconfig broken
Message-ID:  <20010602111548.B24747@ringworld.oblivion.bg>
In-Reply-To: <200105301450.f4UEo2477166@freefall.freebsd.org>; from ryanb@enteract.com on Wed, May 30, 2001 at 07:50:02AM -0700
References:  <200105301450.f4UEo2477166@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 30, 2001 at 07:50:02AM -0700, ryan beasley wrote:
> The following reply was made to PR bin/22489; it has been noted by GNATS.
> 
> From: ryan beasley <ryanb@enteract.com>
> To: Bill Swingle <unfurl@dub.net>
> Cc: freebsd-gnats-submit@freebsd.org
> Subject: Re: bin/22489: mass IP aliasing via ifconfig broken
> Date: Wed, 30 May 2001 09:46:10 -0500
> 
>  On Tue, May 29, 2001 at 10:43:34PM -0700, Bill Swingle wrote:
>  > Why don't you just use the aliasing mechanisim that is built into
>  > /etc/rc.network?
>  > 
>  > ifconfig_de0_alias0="inet 64.81.6.35 netmask 255.255.255.255"
>  > ifconfig_de0_alias1="inet 64.81.6.36 netmask 255.255.255.255"
>  > ifconfig_de0_alias2="inet 64.81.6.37 netmask 255.255.255.255"
>  > ifconfig_de0_alias3="inet 64.81.6.38 netmask 255.255.255.255"
>  > etc....
>  
>  	The file controlling all of the addresses is an RCS'd flat text
>  	file with _just_ IPs listed under it.  The purpose is so that
>  	the "junior" types could run around and add/remove addresses to
>  	be bound to this machine.  I trust them much more w/ a flat text
>  	of IP<newline>IP<newline>etc than I would anyone mucking up
>  	rc.conf.  :)
>  
>  > I'm not so sure this is a problem with FreeBSD since there is a
>  > perfectly reasonable way to go about this that works.
>  
>  	Either way, the rc.network essentially does the same thing;
>  	ifconfig <blah1> alias, ifconfig <blah2> alias, etc.  The only
>  	difference is that I use a for/do/done loop whereas rc.network
>  	uses while/do/done.
>  
>  	Anywho, if I run ifconfig and find all the addresses I bound
>  	listed there, but they're NOT responsive to external network
>  	traffic, I think that _is_ a FreeBSD problem.
>  
>  	... but on another note, I completely forgot that this was still
>  	open.  ca-1 is running w/ a kernel from 12/19/2000 and I couldn't
>  	replicate the behavior anymore.  (woot.)  Guess it's time to
>  	close the PR. ;)

Have you considered putting something like the following in /etc/rc.conf?
Yes, it will be evaluated each time rc.conf is sourced by some startup
script, and it might cause a lot of expr invocations, but it seems to set
all the relevant environment vars for me..

G'luck,
Peter

-- 
I am not the subject of this sentence.

iface=rl0
eval `(
i=0
exec < iplist
while read ipads; do
	echo "ifconfig_${iface}_alias${i}='inet $ipads netmask 255.255.255.255'";
	i=$(expr $i + 1);
done
)`

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




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