Page 1 of 1

How does bridge network work(with VBoxBFE4.2.10)

Posted: 23. Apr 2013, 06:26
by fishingwind
I prefer VBoxBFE to compose and run VM,
with harddisk and netcard specified in command arguments, as Qemu does.
And if I set the display driver to dummy, I can make VBoxBFE work background.

Unfortunately, VBoxBFE doesn't support bridge network.
So I changed 'vboxbfeConfigConstructor' to compose a bridge network.
And I start a Debian guest on a Windows Host:
  • Debian squeeze 2.6.32 : eth0(192.168.1.100)
    ^
    |bridge
    V
    Windows 2003 : Microsoft Loopback Adapter(192.168.1.1)
CFGM shows that it is OK. And the VM starts well.
But ping from host, no response;
ping from guest, alse no response, but host learned the ARP of guest.
Sounds like the flow from host to guest is blocked.
How does bridge network work with VirtaulBox?
Is there anything I missed to do?
  • 00:00:00.127568 [/Devices/virtio-net/] (level 2)
    00:00:00.127570
    00:00:00.127570 [/Devices/virtio-net/0/] (level 3)
    00:00:00.127572 PCIBusNo <integer> = 0x0000000000000000 (0)
    00:00:00.127573 PCIDeviceNo <integer> = 0x0000000000000003 (3)
    00:00:00.127574 PCIFunctionNo <integer> = 0x0000000000000000 (0)
    00:00:00.127575 Trusted <integer> = 0x0000000000000001 (1)
    00:00:00.127576
    00:00:00.127576 [/Devices/virtio-net/0/Config/] (level 4)
    00:00:00.127577 CableConnected <integer> = 0x0000000000000001 (1)
    00:00:00.127578 LineSpeed <integer> = 0x0000000000000000 (0)
    00:00:00.127579 MAC <bytes> = "52 54 00 12 34 56" (cb=6)
    00:00:00.127581
    00:00:00.127582 [/Devices/virtio-net/0/LUN#0/] (level 4)
    00:00:00.127583 Driver <string> = "IntNet" (cb=7)
    00:00:00.127584
    00:00:00.127584 [/Devices/virtio-net/0/LUN#0/Config/] (level 5)
    00:00:00.127586 IfPolicyPromisc <string> = "allow-all" (cb=10)
    00:00:00.127587 IgnoreConnectFailure <integer> = 0x0000000000000000 (0)
    00:00:00.127588 Network <string> = "HostInterfaceNetworking-Microsoft Loopback Adapter" (cb=51)
    00:00:00.127589 Trunk <string> = "\DEVICE\{8CDE7706-E6FE-42A2-8639-2126E5FC23DC}" (cb=47)
    00:00:00.127590 TrunkType <integer> = 0x0000000000000003 (3)
    00:00:00.127592
    00:00:00.127592 [/Devices/virtio-net/0/LUN#999/] (level 4)
    00:00:00.127594 Driver <string> = "MainStatus" (cb=11)
    00:00:00.127594
    00:00:00.127595 [/Devices/virtio-net/0/LUN#999/Config/] (level 5)
    00:00:00.127597 First <integer> = 0x0000000000000000 (0)
    00:00:00.127598 Last <integer> = 0x0000000000000000 (0)
    00:00:00.127599 papLeds <integer> = 0x0000000000415278 (4 280 952)
00:00:00.407147 IntNet#0: szNetwork={HostInterfaceNetworking-Microsoft Loopback Adapter} enmTrunkType=3 szTrunk={\DEVICE\{8CDE7706-E6FE-42A2-8639-2126E5FC23DC}} fFlags=0x14000 cbRecv=325632 cbSend=196608 fIgnoreConnectFailure=false

Re: How does bridge network work(with VBoxBFE4.2.10)

Posted: 23. Apr 2013, 08:38
by noteirak
fishingwind wrote:So I changed 'vboxbfeConfigConstructor' to compose a bridge network.
Where did you change this?

Re: How does bridge network work(with VBoxBFE4.2.10)

Posted: 23. Apr 2013, 09:06
by fishingwind
noteirak wrote:Where did you change this?
function 'vboxbfeConfigConstructor', around line 1630, the bottom of VBoxBFE.cpp.
Added a new type 'bridge', hard coded just for testing:
if (g_aNetDevs[ulInstance].enmType == BFENETDEV::BRIDGE)
{
char szNetwork[INTNET_MAX_NETWORK_NAME];
rc = CFGMR3InsertString(pLunL0, "Driver", "IntNet"); UPDATE_RC();
rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg); UPDATE_RC();
/*
* Internal networking -- bridge.
*/
rc = CFGMR3InsertString(pCfg, "IfPolicyPromisc", "allow-all"); UPDATE_RC();
rc = CFGMR3InsertInteger(pCfg, "IgnoreConnectFailure", 0); UPDATE_RC();
RTStrPrintf(szNetwork, sizeof(szNetwork), "HostInterfaceNetworking-%s",
g_aNetDevs[ulInstance].pszName);
rc = CFGMR3InsertString(pCfg, "Network", szNetwork); UPDATE_RC();
rc = CFGMR3InsertString(pCfg, "Trunk", "\\DEVICE\\{8CDE7706-E6FE-42A2-8639-2126E5FC23DC}"); UPDATE_RC();
rc = CFGMR3InsertInteger(pCfg, "TrunkType", 3); UPDATE_RC();
}

If I config and start the VM with VirtualBox GUI, the bridge network is OK.
While with VBoxBFE, the bridge network is broken.
And there is no VBoxSvc process. I wonder what VBoxSvc is doing.

Re: How does bridge network work(with VBoxBFE4.2.10)

Posted: 23. Apr 2013, 10:50
by noteirak
Though so you were actually modifying the code. I would strongly suggest to head towards the dev mailing list, as this forum is for the end-users of Virtualbox.
You will be in direct contact with the devs aswell as people who code with Virtualbox, where you'll have a much better chance at getting answers to this kind of answers.
Mailing lists info can be found here

Re: How does bridge network work(with VBoxBFE4.2.10)

Posted: 23. Apr 2013, 12:45
by fishingwind
OK. Thank you for your kindly replies.