From owner-freebsd-net@FreeBSD.ORG Mon May 17 18:55:42 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A1F8106567A for ; Mon, 17 May 2010 18:55:42 +0000 (UTC) (envelope-from i@levsha.me) Received: from expo.ukrweb.net (mail.univua.net [91.202.128.78]) by mx1.freebsd.org (Postfix) with ESMTP id 4482E8FC26 for ; Mon, 17 May 2010 18:55:42 +0000 (UTC) Received: from [95.133.42.238] (helo=laptop.levsha.me) by expo.ukrweb.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.71 (FreeBSD)) (envelope-from ) id 1OE4yM-0004rY-0R; Mon, 17 May 2010 21:23:28 +0300 Received: from levsha by laptop.levsha.me with local (Exim 4.71 (FreeBSD)) (envelope-from ) id 1OE4xq-0002p1-U0; Mon, 17 May 2010 21:22:55 +0300 Date: Mon, 17 May 2010 21:22:54 +0300 From: Mykola Dzham To: Peter Kieser Message-ID: <20100517182254.GA36060@laptop.levsha.me> References: <4BF17814.50707@kieser.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BF17814.50707@kieser.ca> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: Mykola Dzham X-SA-Exim-Connect-IP: 95.133.42.238 X-SA-Exim-Mail-From: i@levsha.me X-SA-Exim-Scanned: No (on expo.ukrweb.net); SAEximRunCond expanded to false Cc: freebsd-net@freebsd.org Subject: Re: Bringing VLANs created with rc.conf vlans_ 'up' on boot? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 May 2010 18:55:42 -0000 Peter Kieser wrote: > Hello, > > I am experimenting with FreeBSD vlan's using the vlans option > in rc.conf, my configuration is as follows: > > ifconfig_em1="up" > vlans_em1="100 101 102 103 104 105 106 107 108 109 110" > autobridge_interfaces="bridge0" > autobridge_bridge0="em0 em1.*" > ifconfig_bridge0="up" > > rc script create em1.100 - em1.110 but doesn't bring the interfaces up > on boot, I have to issue 'ifconfig em1.100 up', etc. to bring them > online. I also cannot use 'ifconfig_em1.100="up"' because the rc scripts > don't support periods in the variable names. Is there a way to > accomplish this? ifconfig_em1_100="up" from network.subr: # get_if_var if var [default] # Return the value of the pseudo-hash corresponding to $if where # $var is a string containg the sub-string "IF" which will be # replaced with $if after the characters defined in _punct are # replaced with '_'. If the variable is unset, replace it with # $default if given. -- LEFT-(UANIC|RIPE) JID: levsha@jabber.net.ua PGP fingerprint: 1BCD 7C80 2E04 7282 C944 B0E0 7E67 619E 4E72 9280