From owner-freebsd-net@FreeBSD.ORG Mon Mar 19 16:11:17 2012 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 85561106566C for ; Mon, 19 Mar 2012 16:11:17 +0000 (UTC) (envelope-from freebsd@mikej.com) Received: from remote.confluenttech.com (remote.confluenttech.com [69.55.228.170]) by mx1.freebsd.org (Postfix) with ESMTP id 613868FC14 for ; Mon, 19 Mar 2012 16:11:16 +0000 (UTC) Received: from firewall.mikej.com (99-89-65-18.uvs.lsvlky.sbcglobal.net [99.89.65.18]) by remote.confluenttech.com (8.14.3/8.14.3) with ESMTP id q2JGBFSn016177 for ; Mon, 19 Mar 2012 09:11:16 -0700 (PDT) (envelope-from freebsd@mikej.com) Received: from firewall.mikej.com (localhost [127.0.0.1]) by firewall.mikej.com (8.14.5/8.13.3) with ESMTP id q2JGBAZf082659 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 19 Mar 2012 12:11:15 -0400 (EDT) (envelope-from freebsd@mikej.com) Received: (from www@localhost) by firewall.mikej.com (8.14.5/8.13.4/Submit) id q2JGBAS9082657; Mon, 19 Mar 2012 12:11:10 -0400 (EDT) (envelope-from freebsd@mikej.com) X-Authentication-Warning: firewall.mikej.com: www set sender to freebsd@mikej.com using -f To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 19 Mar 2012 12:11:10 -0400 From: jammin2night Mail-Reply-To: Message-ID: <51f939ac5fb636ae90ba1b0fd628e40b@mail.mikej.com> X-Sender: freebsd@mikej.com User-Agent: Roundcube Webmail/0.6-beta Subject: Cloning VLAN interfaces X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd@mikej.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Mar 2012 16:11:17 -0000 FreeBSD charon 9.0-STABLE FreeBSD 9.0-STABLE #14 r233107: Sun Mar 18 05:26:58 EDT 2012 root@charon:/usr/obj/usr/src/sys/CHARON amd64 Hello: I have a machine that has a 802.1q trunk attached which works fine. I can create VLAN interfaces, apply an IP address to them and all is good. I have VirtualBox running on this machine and need to present an interface to a VM that does not support trunking natively. I've googled and searched the archive trying to figure out how to create an interface that VirtualBox will use where the 802.1Q tags are removed but have not had any success. I attempted to create a netgraph interface like: #!/bin/sh ngctl shutdown re0: ngctl mkpeer re0: vlan lower downstream ngctl name re0:lower vlan ngctl connect re0: vlan: upper upstream ngctl mkpeer vlan: eiface vlan10 ether ngctl msg vlan: addfilter '{ vlan=10 hook="vlan10" }' but this nuked my VLAN10 interface. Using tcpdump I saw no traffic on interface VLAN10 or interface ngeth0. I probably going about this all wrong or just don't get the netgraph hooks. If there is an example as to how to this this I just missed it. Any pointers on how to accomplish this? Thanks.