From owner-freebsd-stable@FreeBSD.ORG Mon Feb 12 19:47:29 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A52D016A401 for ; Mon, 12 Feb 2007 19:47:29 +0000 (UTC) (envelope-from fcash@ocis.net) Received: from smtp.sd73.bc.ca (smtp.sd73.bc.ca [142.24.13.140]) by mx1.freebsd.org (Postfix) with ESMTP id 7E34F13C4B5 for ; Mon, 12 Feb 2007 19:47:29 +0000 (UTC) (envelope-from fcash@ocis.net) Received: from localhost (localhost [127.0.0.1]) by localhost.sd73.bc.ca (Postfix) with ESMTP id E67B31A000B13 for ; Mon, 12 Feb 2007 11:47:28 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at smtp.sd73.bc.ca Received: from smtp.sd73.bc.ca ([127.0.0.1]) by localhost (smtp.sd73.bc.ca [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Ql-EZ6vmO4t0 for ; Mon, 12 Feb 2007 11:47:20 -0800 (PST) Received: from coal (s10.sbo [192.168.0.10]) by smtp.sd73.bc.ca (Postfix) with ESMTP id 60F5D1A000B1B for ; Mon, 12 Feb 2007 11:47:20 -0800 (PST) From: Freddie Cash To: freebsd-stable@freebsd.org Date: Mon, 12 Feb 2007 11:47:19 -0800 User-Agent: KMail/1.9.5 References: <20070212163652.GA51709@lor.one-eyed-alien.net> <20070212175940.GA52751@lor.one-eyed-alien.net> <20070212190659.GA26527@zibbi.meraka.csir.co.za> In-Reply-To: <20070212190659.GA26527@zibbi.meraka.csir.co.za> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200702121147.19322.fcash@ocis.net> Subject: Re: Desired behaviour of "ifconfig -alias" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Feb 2007 19:47:29 -0000 On Monday 12 February 2007 11:06 am, John Hay wrote: > On Mon, Feb 12, 2007 at 11:59:40AM -0600, Brooks Davis wrote: > > On Mon, Feb 12, 2007 at 06:39:35PM +0100, Oliver Fromme wrote: > > > Brooks Davis wrote: > > > > Oliver Fromme wrote: > > > > > Jeremy Chadwick wrote: > > > > > > Oliver Fromme wrote: > > > > > > FWIW, I still use alias/-alias. Mainly because that's what > > > > > > has existed historically, and the term "alias" is what is > > > > > > used in reference to rc.conf ifconfig_iface_aliasX entries. > > > > > > > > > > Maybe it would make sense to remove "alias" from the rc.conf > > > > > entries and simply number them. > > > > > > > > ipv4_addrs_ is a much better replacement IMO. It's > > > > easy to use and doesn't required the hackish pseudo array > > > > traversal used by ifconfig_iface_aliasX. > > > > > > That might work for simple cases, but how do you specify > > > other parameters beside the IPs if you need to? > > > > What do you need to set? It's sets IP and netmask. It doesn't > > handle broadcast, but I'd be pretty suprised if that's needed often. > > What else is needed? Axing ifconfig_iface_aliasX is not needed, but > > reducing the visiability of the interface in the documentation is > > probably in order particularly since it's quite fragile since you > > have to renumber whenever you remove an entry. > > Some stuff cannot be done on a single line, so I have abused the > _aliasX mechanism for that. With the bridge interface: > > ifconfig_bridge0="ether 00:00:24:c0:0e:40 addm sis0 stp sis0 addm sis1 > stp sis1 up" ifconfig_bridge0_alias0="inet 146.64.84.1/24" > > Also with the atheros driver I had problems in the past with some > parameters that did not like to be on a single commandline. At least with the ath(4) driver, it all comes down to the order the options are written on the commandline. Some options reset the device, wiping out previous options, so you have to make sure those are set first. Took me awhile to figure that out, but it is mentioned in the man page. Note, however, that your example could be done using the ipv4_addrs_bridge0 variable, as you are not setting anything other than the IP: ifconfig_bridge0="ether 00:00:24:c0:0e:40 addm sis0 stp sis0 addm sis1 stp sis1 up" ipv4_addrs_bridge0="146.64.84.1/24" -- Freddie Cash fcash@ocis.net