Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Mar 2012 15:02:48 -0400
From:      jammin2night <freebsd@mikej.com>
To:        Gustau Perez Querol <gperez@entel.upc.edu>, <freebsd-net@freebsd.org>
Subject:   Re: Cloning VLAN interfaces
Message-ID:  <440afe1d425e1718904aebfe9e046ba9@mail.mikej.com>
In-Reply-To: <4e8108fbc66bbfe24a18d743497cadbd@webmail.entel.upc.edu>
References:  <51f939ac5fb636ae90ba1b0fd628e40b@mail.mikej.com> <c194b30078eeba316d7ff58e02e96aaa@webmail.entel.upc.edu> <4F69B540.7070706@icritical.com> <4e8108fbc66bbfe24a18d743497cadbd@webmail.entel.upc.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?440afe1d425e1718904aebfe9e046ba9>