From owner-freebsd-current@freebsd.org Sat Nov 25 01:48:41 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78A51DF75AF; Sat, 25 Nov 2017 01:48:41 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gate2.funkthat.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5CD426C7C9; Sat, 25 Nov 2017 01:48:40 +0000 (UTC) (envelope-from jmg@gold.funkthat.com) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.15.2/8.15.2) with ESMTPS id vAP1lt6L097598 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 24 Nov 2017 17:47:55 -0800 (PST) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.15.2/8.15.2/Submit) id vAP1ltXD097597; Fri, 24 Nov 2017 17:47:55 -0800 (PST) (envelope-from jmg) Date: Fri, 24 Nov 2017 17:47:55 -0800 From: John-Mark Gurney To: freebsd-net@FreeBSD.org Cc: freebsd-current@FreeBSD.org Subject: vlans + bridging is "interesting" Message-ID: <20171125014755.GN42467@funkthat.com> Mail-Followup-To: freebsd-net@FreeBSD.org, freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 11.0-RELEASE-p7 amd64 X-PGP-Fingerprint: D87A 235F FB71 1F3F 55B7 ED9B D5FF 5A51 C0AC 3D65 X-Files: The truth is out there X-URL: https://www.funkthat.com/ X-Resume: https://www.funkthat.com/~jmg/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (gold.funkthat.com [127.0.0.1]); Fri, 24 Nov 2017 17:47:55 -0800 (PST) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 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, 25 Nov 2017 01:48:41 -0000 Hello, I decided to try to run some bhyve VM's on my machine and bridge them to a guest vlan on my main interface. I also want to support running bhyve VM's on the untagged part of the interface as well (this is the key problem as I'll describe later). I configure it as you'd expect. Bridge the main interface em0, and put the local IP's on the bridge0. Then I added an interface em0.14 that untags packets from em0, and added it to bridge1 along w/ a tap0 for the VM. This does not work. Packet goes out and comes back and is observed on em0, but never appears on either em0.14 or bridge1. After seeing: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=139268 I decide to look on bridge0, and see the tagged vlan packet on that interface. I attempted to add bridge0 as the vlandev for em0.14, but that doesn't work: #ifconfig em0.14 vlan 14 vlandev bridge0 ifconfig: SIOCSETVLAN: Protocol not supported So, I did finally get things working by using epair. I added an epair to the bridge, and that allows me to untag the packet, and pass on to bridge1. I have not attempted to use the patch in 139268, but if people think it is an acceptable solution (with patch, if I set LINK0, it should work w/ original configuration), I'll test and commit the patch. Otherwise, please submit another fix. Thanks. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."