From owner-freebsd-net@FreeBSD.ORG Wed Mar 21 19:03:13 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 3B09E1065674 for ; Wed, 21 Mar 2012 19:03:13 +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 160608FC0C for ; Wed, 21 Mar 2012 19:03:12 +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 q2LJ2u0W044792; Wed, 21 Mar 2012 12:02:57 -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 q2LJ2o1K083163 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 21 Mar 2012 15:02:55 -0400 (EDT) (envelope-from freebsd@mikej.com) Received: (from www@localhost) by firewall.mikej.com (8.14.5/8.13.4/Submit) id q2LJ2mAc083158; Wed, 21 Mar 2012 15:02:48 -0400 (EDT) (envelope-from freebsd@mikej.com) X-Authentication-Warning: firewall.mikej.com: www set sender to freebsd@mikej.com using -f To: Gustau Perez Querol , MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 21 Mar 2012 15:02:48 -0400 From: jammin2night Mail-Reply-To: In-Reply-To: <4e8108fbc66bbfe24a18d743497cadbd@webmail.entel.upc.edu> References: <51f939ac5fb636ae90ba1b0fd628e40b@mail.mikej.com> <4F69B540.7070706@icritical.com> <4e8108fbc66bbfe24a18d743497cadbd@webmail.entel.upc.edu> Message-ID: <440afe1d425e1718904aebfe9e046ba9@mail.mikej.com> X-Sender: freebsd@mikej.com User-Agent: Roundcube Webmail/0.6-beta Cc: Subject: Re: 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: Wed, 21 Mar 2012 19:03:13 -0000 On 21.03.2012 09:21, Gustau Perez Querol wrote: > On Wed, 21 Mar 2012 11:02:24 +0000, Matt Burke wrote: >> On 03/20/12 14:54, Gustau Perez Querol wrote: >>> VBoxManage modifyvm "FreeBSD virtual machine" --nic1 bridge >>> --nictype >>> bridge virtio --bridgeadapter vlan10 >> >> On my machines running virtualbox-ose-4.0.14, VBoxManage won't >> accept vlan >> interfaces either - I need to kill the GUI then edit the config >> files to >> change the physical interface to vlanN. > > Mmm, I first tried the 4.1.51r40008 (the devel one). Now I'm > running 4.1.X (from redports) and the VBoxManage accepts an vlan > interface as a bridged interface. > >> >> Also, when altering any other setting by the GUI, the process needs >> repeating. >> > > That is correct, I have just checked that behavior and it also > happens to me. I also noticed that the vbox GUI gets confused only if > you go the properties of the machine using a bridged vlan interface. > If you don't go to the properties of the virtual machine, you will > see > in the panel on the right side that the virtual interfaces remain > bridged to your real vlan interfaces. > > It would appear I've been lucky, as I'm running vbox in a headless > machine so I have always used the TUI (which doesn't get confused > about using vlan interfaces). > > If you succeed with ng, please let us know, I'm interested in > netgraph. If you don't, at least you know you can do it by using the > VBoxManage tool... > > Gustau > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to > "freebsd-net-unsubscribe@freebsd.org" I was successful in creating the netgraph interface with the help of rozhuk.im@gmail.com like: #!/usr/local/bin/bash ngctl shutdown re0:lower ngctl shutdown re0:upper ngctl mkpeer re0: hub lower lower ngctl name re0:lower re0-hub ngctl connect re0: re0-hub: upper upper ngctl mkpeer re0-hub: vlan downstream downstream ngctl name re0-hub:downstream re0-vlan ngctl mkpeer re0-vlan: eiface vlan10 ether ngctl msg re0-vlan: addfilter '{ vlan=10 hook="vlan10" }' ifconfig ngeth0 up Using tcpdump on ngeth0 I could see traffic that mirrored the traffic of VLAN 10, but when traffic was generated in a VM, specifically I looked at DHCP traffic I could see the DHCP requests in the VM and on ngeth0, and I could see the DHCP offers back to the VM's MAC address on ngeth0, but I DID NOT see the traffic on the VM's ethernet port. In my case I tested with FreeBSD-9.0-RELASE AMD64 in the VM. I hope to test the VBoxManage command line soon. --mikej