Can't get internet working in VMs (after reading all available materials)

Hello,

I know this question was asked many time before but after reading lot of materials I can’t properly configure this.

Setup is as follows:

2 Hosts, 4 interfaces each.
1 interface connected to internet in each host
2 bridges created, one for private networking one for public
For the public bridge the associated interface is obviously one connected to internet

Everything works ok but internet. I can ssh into VMs, they see each other, etc. but I can’t resolve an ip from the outside.

For configuring bridges I am currently using netplan as follows:

bridges:
br-vm:
interfaces: [xyz1]
addresses: [x.20.20.10/24]
mtu: 1500
nameservers:
addresses: [8.8.8.8]
dhcp4: no
dhcp6: no

br-pub:
  interfaces: [xyz2]
  addresses: [y.50.50.10/24]
  nameservers:
    addresses: [8.8.8.8]
  dhcp4: yes
  dhcp6: yes

Then in ONE there are 2 virtual networks configured, one using br-vm while the other br-pub.
After trying with VNF and traditional Virtual Router (none worked) I tried something really simple, which is creating a VM (Ubuntu 18) attaching both vnets, since I presume in such case internet should be reachable directly in the VM without passing through the router, but it is not working either.

So the question is: Am I missing a piece here? I think I am doing something wrong but I am not able to see what.


Version: 5.12.8
VM: Ubuntu 18.04 LTS (KVM) pulled from marketplace

I don’t put here steps to reproduce since I think this is not a bug but, as said, a misconfiguration from my side.

Any help is gonna be really appreciated.

Thanks

hey,
I started recently using Opennebula so I am far from an expert on this topic.
However I recently ran into a similar thing where I could not get internet on my vm’s even though I was on the vnet that should have connectivity.
After some testing and considerations it started to work after putting in the bridge and physical interface information in the vnet configuration. I had manually created a bridge called br0 and when I configured bridge and physical interface to both have br0 it started working as expected.

Just sharing as I could not find a good example as well. :slight_smile:

With regards,

Hello @apijnaker, thanks for answering :slight_smile:
Well, I already fixed the issue and it was exactly what you are describing.

Basically I added the public IP range manually in the bridge (bonding) directly. Not sure then why ON asks for physical device when creating a VN, but the conclusion is that VN does not create anything in the Host, must be created manually first.