From owner-freebsd-current@FreeBSD.ORG Sat Apr 17 13:55:40 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D914016A4CE; Sat, 17 Apr 2004 13:55:40 -0700 (PDT) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id C65F543D55; Sat, 17 Apr 2004 13:55:40 -0700 (PDT) (envelope-from adam@migus.org) Received: from ganyopa.migus.org ([68.55.142.251]) by comcast.net (rwcrmhc12) with ESMTP id <20040417205540014001e93pe>; Sat, 17 Apr 2004 20:55:40 +0000 Received: from localhost (localhost [127.0.0.1]) by ganyopa.migus.org (Postfix) with ESMTP id D07EF4D468; Sat, 17 Apr 2004 16:55:39 -0400 (EDT) Received: from ganyopa.migus.org ([127.0.0.1]) by localhost (ganyopa.migus.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 30150-03; Sat, 17 Apr 2004 16:55:39 -0400 (EDT) Received: by ganyopa.migus.org (Postfix, from userid 72) id 1B7514C1C3; Sat, 17 Apr 2004 16:55:39 -0400 (EDT) Received: from ludo.migus.org (ludo.migus.org [192.168.4.4]) by webservices.migus.org (IMP) with HTTP for ; Sat, 17 Apr 2004 16:55:38 -0400 Message-ID: <1082235338.408199caed784@webservices.migus.org> Date: Sat, 17 Apr 2004 16:55:38 -0400 From: "Adam C. Migus" To: Ruslan Ermilov References: <1082233506.408192a2c476a@webservices.migus.org> <20040417204536.GA85858@ip.net.ua> In-Reply-To: <20040417204536.GA85858@ip.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.2 X-Originating-IP: 192.168.4.4 X-Virus-Scanned: by amavisd-new at migus.org cc: current@freebsd.org Subject: Re: VLAN support in rcNG [PATCH] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Apr 2004 20:55:41 -0000 Quoting Ruslan Ermilov : > On Sat, Apr 17, 2004 at 04:25:06PM -0400, Adam C. Migus wrote: > > The following is a patch that adds support for vlan creation and > > destruction within rcNG. Using the patch it's possible, for > example, > > to create a vlan, `vlan0' with the following directives in > rc.conf: > > > > vlan_interfaces="vlan0" > > ifconfig_vlan0="DHCP" > > ifconfig_vlan0_vlan_dev="xl0" > > ifconfig_vlan0_vlan_tag="2" > > > > Is this patch of general interest? Should I submit a PR? > > > This is from the vlan(4) manpage: > > : Each vlan interface is created at runtime using interface cloning. > This > : is most easily done with the ifconfig(8) create command or using > the > : cloned_interfaces variable in rc.conf(5). > > So, how your patch is different from the existing functionality? > > > Cheers, > -- > Ruslan Ermilov > ru@FreeBSD.org > FreeBSD committer > Hmmm, well, it's not. In fact the code is almost a copy of the cloned interfaces stuff. The thing is when you try to use the existing cloned interfaces stuff to create a vlan interface, the lack of the _tag and _dev stuff in combination with things like this: /etc/network.subr:318: _tmplist="${_tmplist} ${cloned_interfaces}" creating vlans as cloned interfaces tends to be more of a crude hack than an easy, one-step configuration. If you can show me how I can create a vlan, using the existing stuff with the functionality I want (DHCP or static IP, etc.) without writing any code beyond declarations in rc.conf, show me, otherwise I'm suggesting this patch as it makes it easy. FWIW, cloned_interfaces and vlan_interfaces could be collapsed down in future but the existing stuff as I see it doesn't do everything needed for both. The former simply creates the device. -- Adam C. Migus -- http://people.migus.org/~adam/