Page 1 of 1

Bridged netwok on host with two NICs

Posted: 9. Feb 2015, 12:28
by Berjozkin
Hi!

I am trying to set up a host having 2 NICs plus virtual machine with bridged NIC.

I found that the bridged interface works only in case if I assign bridging using eth0. if i choose eth1 for binding, I get something semi-functional - the host's dhcp server gets address request and assigns it, but VM seems not getting it as the next request from the guest comes in. I can not use the fixed address from the network eth1 is the member of, either.

Any ideas how to solve it (besides swapping the networks ethX are part of or moving to kvm)?
:?:

P.S. Both Host and Guest are Slackware64-14.1; guest uses Intel Pro Desktop MT NIC. Tried to fire up Win7 and OpenSUSE guests; results - the same.

Re: Bridged netwok on host with two NICs

Posted: 10. Feb 2015, 10:23
by Berjozkin
Now I am even more confused: I found that everything works only in case if bridge is bound to the adapter connected to the live network (the second net is not functional yet, having only one configured NIC with no cable attached). Can this be the root of the problem? I browsed through the logs, but did not notice anything.

Re: Bridged netwok on host with two NICs

Posted: 11. Feb 2015, 00:30
by noteirak
Well, bridging on a non-connected adaptor will not show it as disconnected in the VM, so it's possible the routing inside the VM thinks the network is accessible by both interfaces, and then fails since anything sent on eth1 will be dropped.

Re: Bridged netwok on host with two NICs

Posted: 11. Feb 2015, 08:26
by Berjozkin
Hi!
This does not explain why the dhcp requests are received by eth1 and answered, but not accepted by VM. I do not know the inner workings, but from such point of view - the network is alive as there are two computers on them - one with physical configured NIC offering dhcp service, the other - VM trying to be the part of that network.
May be the physical NIC' status influences the results indeed - I'll check that.

Re: Bridged netwok on host with two NICs

Posted: 11. Feb 2015, 11:09
by Martin
Is this a wired or wireless adapter?

Re: Bridged netwok on host with two NICs

Posted: 11. Feb 2015, 18:01
by Berjozkin
both wired, one - Intel 1gbit nic, second RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 11)

[SOLVED] Re: Bridged netwok on host with two NICs

Posted: 12. Feb 2015, 18:43
by Berjozkin
Hi!

the problem lies with Virtualbox somehow detecting the link status of the NIC - bridge works only with the NIC having active link. It has to be active at the start of the VM as well as during runnig. If the cable is disconnected, connectivity is lost until the link in On again. It is just the link status which is important I suppose (I just plugged the free cable from the switch).

To developers: may be such behaviour could be qualified as bug and needs repairing? I mean - to make Virtualbox bridging indifferent to the status of the link of physical NICs? See my previous observations on dhcp behaviour. If the VM communicates with physical host through the network as another "physical" computer, not directly (not leaving the host), than the effect is clear and I recall the note to developers.

Re: Bridged netwok on host with two NICs

Posted: 4. Apr 2020, 08:18
by Berjozkin
Hi!

Re-opening the question - is it possible to organize bridging in a way that fir example - main OS ir using one NIC (say - wired) and virtual machine - wireless? Some time ago I tried to solve it by using latency setting (on Windows, I do not recall whether the name is correct now), but it gave very unstable results.

Re: Bridged netwok on host with two NICs

Posted: 4. Apr 2020, 11:19
by mpack
The VM has no WiFi NIC emulations, so no.

Re: Bridged netwok on host with two NICs

Posted: 5. Apr 2020, 08:14
by Berjozkin
From binding point of view - is it indifferent to which kind of physical NIC VM binds? Or it works vice versa - it binds to the NIC server OS presenting as active? Or "more active" (better connection) than the other.

Re: Bridged netwok on host with two NICs

Posted: 5. Apr 2020, 12:02
by mpack
I'm not sure I understand the question. Regardless of the type of host NIC you bridge to, it will appear as an Ethernet NIC to the guest. Be warned however that bridging to a WiFi NIC is not always possible. Multi-drop WiFi is technically outside the standard, so it's a matter of try it and see if it works.

Oh, and bridging binds specifically to a host NIC you select. There is no default, and it isn't relevant how "active" the host NIC is for this feature, as the TCP/IP stacks for the two PCs (host and guest) are completely independant, so the "other" activity on the physical NIC is not visible to the VM.