Network Problems VM not reaching local network (openvswitch)

Hi All,
I have a debian Host, deploying VM’s is working. The bridge ist up an running:
root@ammersee3:~# ovs-vsctl show
Bridge "br0"
Port "eth0"
Interface "eth0"
Port "br0"
Interface "br0"
type: internal
Port "vnet1"
Interface "vnet1"
Port "vnet0"
Interface "vnet0"
ovs_version: “2.3.0”

On the VM I have an IP-Adresse (eth0: if I ping the second VM I get response. But as I ping a host on the local net (e.g the node, or the router) I get no response. From a host to the VM it doesn’t work also.

source /etc/network/interfaces.d/*

The loopback network interface

auto lo
iface lo inet loopback

The primary network interface

allow-hotplug eth0
auto eth0
iface eth0 inet static

auto br0
iface br0 inet static
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off

So whats wrong.

Sorry for the late reply. Thinks work a bit different when using openvswitch compared to legacy bridging.

On openvswitch you should create a “access port” for your host, i.e.:

ovs-vsctl add-port br0 br0-host – set interface br-host type=internal

In your network intefaces file you would have the following:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
pre-up ip link set $IFACE up
post-down ip link set $IFACE down

auto br0-host
iface br0-host inet static

P.s. If you want to configure spanning tree stuff … you should do so with openvswitch commands on the openvswitch bridge. Specifying this in network interfaces file won’t work.

If you want to use vlans in some point in time on your bridge you could do the following to make an “access port” available to the host (for a specific vlan). For example vlan 101 (tagged on physical switch port corresponding with eth0 in host):

put (tagged) vlan on bridge

ovs-vsctl set port br0 trunks=101

create interface “vlan101” for host in vlan 101

ovs-vsctl add-port br0 vlan101 tag=101 – set interface vlan101 type=internal