Page 1 of 1

vlans on vbox 3.12

Posted: 28. Jun 2010, 12:39
by rg2
I am looking to configure vlan on debian lenny guest os. The host os is also debian lenny.

In ch.6, virtual networking, I found the following passage found in
explanation of bridged networking.

"When using VLAN interfaces with VirtualBox, they must be named
according to the PPA-hack naming scheme (e.g. "e1000g513001"), as
otherwise the guest may receive packets in an unexpected format."

What do I do in this case? Is there sample configuration on debian or
linux guest?

Thanks in advance

Re: vlans on vbox 3.12

Posted: 28. Jun 2010, 20:11
by Sasquatch
This depends on where you create the VLAN, on the Host or on the Guest. If it's the former, you have to give the VLAN a proper name and hook it up with Bridged. If it's the latter, then you set the physical adapter in Bridged to the Guest, then create the corresponding VLANs inside the Guest.

Re: vlans on vbox 3.12

Posted: 28. Jun 2010, 23:48
by rg2
Actually, I am referring to the latter case. When you say bridged, I am assuming it is not bridged virtualbox network setting. If so, could you give sample config.

I did showinfo on the virtual machine I am having problem with and I got this for nic setting.

NIC 1: MAC: 0800279668F3, Attachment: Bridged Interface 'eth0', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps


Thanks for your help

Re: vlans on vbox 3.12

Posted: 29. Jun 2010, 19:43
by Sasquatch
That configuration is fine, should be no problem to get it working. You can now configure the needed VLANs on the Guest. It will all use the physical adapter, only when you send data out through it, it will have a VLAN tag in it.

Re: vlans on vbox 3.12

Posted: 29. Jun 2010, 21:40
by rg2
It looks like packets are being transferred but not received. Why do you think this is?

The routing looks right.

Re: vlans on vbox 3.12

Posted: 29. Jun 2010, 21:42
by Sasquatch
Does the receiving end accept tagged packets? What do you see when you use tcpdump or wireshark on the different systems, Guest, Host and receiving machine? You should see the package header with the VLAN tag on all systems. If one doesn't have/see it, you have to check the route it goes through and pinpoint where it fails.

Re: vlans on vbox 3.12

Posted: 30. Jun 2010, 14:45
by rg2
< Does the receiving end accept tagged packets?

I think so. I actually did a test. I put the guest machine's vlan and interface configuraton onto host and that worked just fine. Also, if I configure guest's ip on physical interface eth0, this works. So, I am at a loss.

I have seen some posts where they configured bridging using brctl, but I am not sure how this works or how to configure it. Bonding is another.

Thankss

Re: vlans on vbox 3.12

Posted: 30. Jun 2010, 20:01
by Sasquatch
Using bridgectl is the old method of Host Interface and has changed since 2.0.0.
If the Host can create VLANs properly, can't you bridge those to the VM? The Host doesn't need to have an IP address on the VLAN interface. I used Ubuntu as a VM once on a Windows Host and the Host created interfaces with VLAN tags. Hooking the VM to those VLAN interfaces worked like a charm. I didn't have any need to configure the VLAN from the Guest, as the Host needed them too.

Re: vlans on vbox 3.12

Posted: 30. Jun 2010, 20:46
by rg2
Are you saying I should do something like this...

On Host
----------
1. in /etc/network/interfaces

define eth0 with ip and vlan500 with no ip

2. VBOXManage modifyvm to Attachment: Bridged Interface 'vlan730',

On Guest
-----------
Use eth0 interface or whatever shows up after udev discovery to configure the actual ip address like on a regular physical interface, as opposed to vlan.

Is this right?

Thanks again for your time

Re: vlans on vbox 3.12

Posted: 30. Jun 2010, 21:07
by Sasquatch
Yes, that's what I'm saying. Of course, you need to match the VLAN with the bridged adapter name. You can't exactly hook up vlan730 if you create vlan500 ;).

Re: vlans on vbox 3.12

Posted: 30. Jun 2010, 21:52
by rg2
yes, I meant to say vlan730. :D

Re: vlans on vbox 3.12

Posted: 2. Jul 2010, 14:04
by rg2
Awesome stuff. Worked like a charm.

Thanks,