From owner-freebsd-net@FreeBSD.ORG Fri May 2 18:59:41 2014 Return-Path: Delivered-To: freebsd-net@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 998C2703 for ; Fri, 2 May 2014 18:59:41 +0000 (UTC) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 25FAC1DB1 for ; Fri, 2 May 2014 18:59:41 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id n15so69148wiw.14 for ; Fri, 02 May 2014 11:59:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=iTXcWuJB07dmfacTR2Ll4/+Zv0azCpoD1CUh7Smt18U=; b=OahQrnfYubvsjxIWysqYlLDzr7W8FoHCjBdgm8lGO1P2CmJvEOXN+oNOP4YGSSg4hK BTD2itUXmXjhHuXoaBRWROjLcWmK+B85NIPyPmWIFocX2ZWd0nUMYOsPck1n8KDCxn3M AIeUPHDXY7bjS7QfYH7mW6vgAI3lQhwVBYu+QGnKbaedvfpMvkkRR2Fyr4iU+Bz229BB OHlFtSCvVKQ7BD892IuSBrN5Wsdks716flEsQoE/544PHBjTEZ7IWnKYHzJ9ZCkTk5CX YoEZZVRcMz79nDu6b7OiGu1Jz+S4F3enN4wwes785GdNEUqfmhB2gdQHHxHWAz0vC+Vn w2Qg== MIME-Version: 1.0 X-Received: by 10.194.91.175 with SMTP id cf15mr15417736wjb.5.1399057179188; Fri, 02 May 2014 11:59:39 -0700 (PDT) Received: by 10.216.241.73 with HTTP; Fri, 2 May 2014 11:59:39 -0700 (PDT) In-Reply-To: <20140502183422.GS43976@funkthat.com> References: <20140502183422.GS43976@funkthat.com> Date: Fri, 2 May 2014 21:59:39 +0300 Message-ID: Subject: Re: VLAN switching on freebsd From: =?UTF-8?B?w5Z6a2FuIEtJUklL?= To: =?UTF-8?B?w5Z6a2FuIEtJUklL?= , "freebsd-net@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 May 2014 18:59:41 -0000 Thank you very much John, This approach is enlightened me. I'll try it. I couldnt think of use ng_vlan in front of ngeth nodes. I used openvswitch for this scenario, but performance is very very poor. I'm looking forward to release of the "in-kernel openvswitch on freebsd" project of Luigi Rizzo. Best Regards On Fri, May 2, 2014 at 9:34 PM, John-Mark Gurney wrote: > zkan KIRIK wrote this message on Fri, May 02, 2014 at 21:04 +0300: > > i need to create a virtual interface that forwards only defined vlan > tags. > > Lets talk on a sample scenario : > > > > Assume that VLAN 10, 20, 30, 40 tagged on switch connected to em0 > interface. > > > > create ngeth0 and ngeth1. ( i dont need netgraph interface, it can be a > any > > virtual interface tap .. etc. ) > > i want to see only VLAN 10, 20 tagged on ngeth0 > > and VLAN 10, 30, 40 tagged on ngeth1 > > > > I tried many ways but no success. > > > > Can you suggest a way to do this? > > I'm not familar w/ netgraph, but it looks like you might be able to > do something simlar w/ ng_vlan and ng_bridge? Though bridge could be > replaced w/ one2many, or hub depending upon requirements... Also, is > this purely for snooping traffic? or do you want to be able to pass > traffic both ways? > > em0 > | > ng_vlan > / / \ \ > 10 20 30 40 > | | | | > | ng_bridge | | > \ / \ | | > ng_vlan ng_vlan > | | > ngeth0 ngeth1 > > Not sure if this is exactly what you want, but I think it would... > Though I don't know if you tried this, since you didn't describe > anything you tried... > > -- > John-Mark Gurney Voice: +1 415 225 5579 > > "All that I will do, has been done, All that I have, has not." >