[SOLVED] VirtualMachine Network

I am using virtualbox with ubuntu os. I want to ask about how to separate vm network from lan in router? As the host and vm using same router port, it does not seem possible to separate them from either interface or switch.

This is not very clear.

Since you're using VMs, a lot is possible. Can you better describe what you want to do?

You don't even mention if your router is physical, or a VM.

If I understand you correctly. I created a VLAN and trunk port on my physical OpenWrt router, I create the same trunk and Ubuntu Network manager using a tagged connection with no assigned IP. I then used an Ethernet cable to connect to the host machine. After you've created the this interface in Ubuntu, it will appear in VirtualBox; you can then use the network with VMs.

Hope this helps.

My router is physical. I want to make an interface for example vmnetwork for all vms in the existing network with I would like to separate them from existing lan ( As virtualbox vms and host win 10 pc share the same router physical port (port 1 in router). I find no solution to separate them with vlan.

I just noted one above:

  • You create the other VLAN, Interface and Trunk port on the OpenWrt. You begin this process on the Network > Interfaces pages by pressing Add
  • You then go to Network > Switch and create the physical Tagged Trunk port
  • You connect this port to your VM host
  • You create an Interface on Ubuntu with the same VLAN ID, marked as Tagged. You can do this in Ubuntu's Network Manager GUI
  • After this interface is created, it will appear in VirtualBox

You should be able to successfully carry this traffic either using 2 Trunks or one trunk and an untagged VLAN. In any case, you can use the same Ethernet cable.

Thank you, it works.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.