VirtualBox can not connect to interface bond0 (link aggregation)

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Caesar-NL
Posts: 4
Joined: 18. Mar 2020, 00:42

VirtualBox can not connect to interface bond0 (link aggregation)

Post by Caesar-NL »

I have a Asustor AS5202T that is using an embedded Linux as OS.

It has two ethernet interfaces, and I have set up 802.3ad link aggregation for these interfaces, so they appear as one interface to the IP stack.

VirtualBox 5.2.22.r08 and VirtualBox Extensions 5.2.22.r04 are installed, these are standard apps in the Asustor app store.

I have installed Android-x86_64-9.0-r1 as a virtual machine, and it boots etc.

The problem is that I don’t have a network connection on Android.

Under File > Host Network Manager I can create a virtual network interface vboxnet0, but should I do that?

In Settings > Network, I can configure Adapter 1, no other adapters.

When I choose NAT, everything is greyed out, except Cable Connected and Port Forwarding.

When I choose NAT Network, I get “Invalid settings detected”

When I choose Bridged Adapter, I can choose from eth0, eth1, bond1, bond2, and bond3. And I can set Promiscuous Mode and Cable Connected.

When I choose Internal Network, I get “intnet” as only choice for Name. And I can set Promiscuous Mode and Cable Connected.

Host only Adapter and Generic Driver will also result in “Invalid settings detected”.

Which ever setting I choose, I do not get a network connection in Android.

Can some one help me out, and tell me what to do?

P.S. Read the next postings, everything will get a bit more clear
Last edited by Caesar-NL on 18. Mar 2020, 19:44, edited 2 times in total.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Problem setting up Android network connection

Post by scottgus1 »

Could be the link aggregation. Try taking that off then setting the Android VM to NAT or Bridged.

Another poster recently had issues connecting to a link-aggregated set of adapters but not when link aggregation wase removed.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Problem setting up Android network connection

Post by scottgus1 »

Take a look at Virtualbox Networks: In Pictures for what all those network choices are.
Caesar-NL
Posts: 4
Joined: 18. Mar 2020, 00:42

Re: Problem setting up Android network connection

Post by Caesar-NL »

I want to use bridged mode, that I'm sure.

Now the problem.

It seems that when you set up the bond module, you can configure the maximum number of bond interfaces. In this case, Asus set it up to configure 4 bond interfaces, bond0, bond1, bond2 and bond3.
The actual physical Ethernet interfaces eth0 and eth1 are configured to be slaves of bond0. Since there are no more physical interfaces, bond1, bond2, and bond3 can never be activated due to lack of slave interfaces.

At the moment, bond0 is the only active IP interface, and so VirtualBox should be able to configure Android to use bond0. However, bond0 does not appear in the list of possible interfaces for bridged mode.

So, why can't bond0 not be configured for Android? Could there be something in the configuration of bond0 that makes it invisible or not configurable for VirtualBox?

Another question. Is it possible to create virtual Ethernet interfaces with physical interfaces in Linux? For instance eth10 with eth0, and eth11 with eth1? In that case you could bond eth10 and eth11 into bond1, and offer that to Android.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Problem setting up Android network connection

Post by scottgus1 »

I haven't ever needed data throughput levels that required link aggregation, so I can't say what else to try next.

I see that the ASUSTOR device is a NAS. Is the switch you connected it to also supporting link aggregation?

You should edit your first post and change the title to "Bridge to Link Aggregated NIC" to draw the right gurus. Once Bridged starts working, if it can, then Android should find its network.
Caesar-NL
Posts: 4
Joined: 18. Mar 2020, 00:42

Re: Problem setting up Android network connection

Post by Caesar-NL »

Link aggregation is also used for fail over, if one interface fails, the other is still available. The whole problem arises from a fundamental flaw in IP networking, and that is that interfaces have network addresses, and not hosts. In OSI networking for instance, hosts have an address, and you can connect them with as many interfaces as you like to the LAN.

If I were to connect both interfaces of the NAS as independent interfaces to the LAN, they would need their own domain name, and still offer the same disk services. I have no idea what this would do to file locking etc. You could connect your PC to both interfaces, and see the same files. But for the PC they would be different files. Very confusing.

You're absolutely right that the switch needs to support link aggregation, and my (old) Netgear switch supports 802.3ad, and I have set it up on the switch. Otherwise I would have had a lot of problems. But that is not the issue here, the issue is that bond0 is simply not seen by, or offered to, or accepted by VirtualBox.

I will change the description of the subject, I just found out late last night what the actual problem is.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: VirtualBox can not connect to interface bond0 (link aggregation)

Post by scottgus1 »

That title should grab someone if someone knows what to do. Hope you find a solution!
Caesar-NL
Posts: 4
Joined: 18. Mar 2020, 00:42

Re: VirtualBox can not connect to interface bond0 (link aggregation)

Post by Caesar-NL »

I solved the problem.

I used the command < ifconfig bond0 promiscuous > on the host, and bingo bond0 became visible.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: VirtualBox can not connect to interface bond0 (link aggregation)

Post by scottgus1 »

Hey, glad you found something that works! Good that you're up and running.
Post Reply