From owner-freebsd-questions@FreeBSD.ORG Tue Apr 28 13:01:55 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B5C7CCE for ; Tue, 28 Apr 2015 13:01:55 +0000 (UTC) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8F861A76 for ; Tue, 28 Apr 2015 13:01:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id t3SCXBLl079787; Tue, 28 Apr 2015 22:33:14 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Tue, 28 Apr 2015 22:33:11 +1000 (EST) From: Ian Smith To: Victor Sudakov cc: freebsd-questions@freebsd.org Subject: Re: tunneling L2 tagged traffic over IP In-Reply-To: Message-ID: <20150428222328.E27406@sola.nimnet.asn.au> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 13:01:55 -0000 In freebsd-questions Digest, Vol 569, Issue 1, Message: 10 On Mon, 27 Apr 2015 15:33:55 +0600 Victor Sudakov wrote: > Victor Sudakov wrote: > > Nikos Vassiliadis wrote: > > > > > > > > Could you advise a solution for tunneling L2 (Ethernet) traffic over IP? > > > > > > > > There is a solution in bridge(4) using the EtherIP protocol, but it > > > > works with untagged frames only. I need to tunnel 802.1q tagged frames > > > > as well. > > > > > > > > Any ideas? > > > > > > > > > > > You can do this with netgraph. Check this post: > > > > > > http://lists.freebsd.org/pipermail/freebsd-net/2005-October/008861.html > > > > > > > It's a modification of the /usr/share/examples/netgraph/ether.bridge > > script. How do you know that it would pass 802.1q tagged frames? It > > references a "fxp0" interface which passes untagged traffic unless a > > vlan(4) interface is configured on top thereof. > > The script does not work. It prints error messages like > > + LINKNUM=1 > + ngctl mkpeer bnet0: ksocket link1 inet/dgram/udp > + ngctl msg ng0:inet bind inet/10.14.143.136:4028 > ngctl: send msg: No such file or directory > + ngctl msg ng0:inet connect inet/10.14.140.125:4028 > ngctl: send msg: No such file or directory > + expr 1 + 1 > + LINKNUM=2 > > and does not generate any traffic. Perhaps it needs some debugging. I > am still looking for a solution, thanks in advance to all who has > anything to say. > > In the meanwhile, I have tried bridging ethernet NICs and tap(4), and > connected two tap(4) devices with net/vtun. It works, but again, only > for untagged frames. I suggest posting these questions to freebsd-net@ where all the hardcore netheads hang out, most of whom would have no time to follow questions@. Certainly that's where the netgraph guy(s?) may be found. cheers, Ian