From owner-freebsd-mips@FreeBSD.ORG Fri Mar 14 13:39:08 2014 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A40FDA6 for ; Fri, 14 Mar 2014 13:39:08 +0000 (UTC) Received: from mailhost.netlab.sk (mailhost.netlab.sk [84.245.65.10]) (using SSLv3 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8AD02BF9 for ; Fri, 14 Mar 2014 13:39:07 +0000 (UTC) Received: from zeta.dino.sk (fw1.dino.sk [84.245.95.252]) (AUTH: LOGIN milan) by mailhost.netlab.sk with ESMTPA; Fri, 14 Mar 2014 14:39:07 +0100 id 004FD3C8.5323067B.00007092 Date: Fri, 14 Mar 2014 14:39:05 +0100 From: Milan Obuch To: Luiz Otavio O Souza Subject: Re: Router Station Pro etherswitchcfg problem Message-ID: <20140314143905.081f073d@zeta.dino.sk> In-Reply-To: References: <20140313215332.7824a6e5@zeta.dino.sk> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; i386-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-mips@freebsd.org X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Mar 2014 13:39:08 -0000 On Fri, 14 Mar 2014 09:28:37 -0300 Luiz Otavio O Souza wrote: > Hey Milan, > > I'll look into this. Just give me a couple of days so i can recycle my > RSPRO setup. > > Regards, > Luiz > I found a workaround (kind of), see below. > On 13 March 2014 17:53, Milan Obuch wrote: > > Hi, > > > > as I recently upgraded my RSPro to current current :) sources, I > > play a bit with etherswitchcfg. RSPro uses Atheros 8316, and it > > looks like there is something I do not understand fully or a > > problem. > > > > In man page for etherswitchcfg, there is an example how to set vlan > > with tagging: > > > > etherswitchcfg vlangroup1 vlan 2 members 0,5t port0 pvid 2 > > > > (I must use 0,2t because there is no port 5, but that' just > > cosmetics), however the result is not correct: > > > > etherswitchcfg vlangroup1 vlan 2 members 0,2t port0 pvid 2 > > vlangroup1: > > vlan: 2 > > members 0,2 > > port0: > > pvid: 2 > > flags=1 > > media: Ethernet 1000baseT > > status: active > > > > There is no 't' in vlangroup1 members port 2. > > > > What I wanted was 'members 0t,2', but 't' is just seemingly ignored. > > And, alas, when I tcpdump on arge1 interface, I see no tagged > > frames. > > > > Full switch config is the following: > > > > etherswitchcfg -v > > etherswitch0: Atheros AR8316 Ethernet Switch with 5 ports and 16 > > VLAN groups > > etherswitch0: VLAN capabilities=16 > > etherswitch0: VLAN mode: DOT1Q > > port0: > > pvid: 1 > > flags=1 > > media: Ethernet 1000baseT > > status: active > > port1: > > pvid: 1 > > flags=0<> > > media: Ethernet autoselect (none) > > status: no carrier > > port2: > > pvid: 2 > > flags=0<> > > media: Ethernet autoselect (100baseTX ) > > status: no carrier > > port3: > > pvid: 1 > > flags=0<> > > media: Ethernet autoselect (none) > > status: no carrier > > port4: > > pvid: 1 > > flags=0<> > > media: Ethernet autoselect (none) > > status: active > > vlangroup0: > > vlan: 1 > > members 0,1,2,3,4 > > vlangroup1: > > vlan: 2 > > members 0,2 > > [ snip ] With command 'etherswitchcfg port0 addtag pvid 1', config for port 0 becomes port0: pvid: 1 flags=5 media: Ethernet 1000baseT status: active and _all_ frames sent to CPU have dot1q header. This way I can create up to 16 vlan groups on etherswitch (and correspondign arge1.n subinterfaces) to achieve what I usually want, just one thing seems not to be possible this way - hybrid port with both native (untagged) and tagged traffic. In any case, it would be good to have this better documented. I don't know if we have any place for this. man page is good, but not everything did work for me. Milan