You are not logged in.

#1 2018-08-05 14:22:41

Shrom59
Member
Registered: 2017-01-02
Posts: 20

Bridge problem with libvirt.

Hello there  smile

I've an issue and I don't understand it.

Here it is my network scheme :

192.168.1.1 ==> br0
192.168.1.2 ==> host
192.168.1.3 ==> Vm
192.168.1.50 ==> NAS

I've installed libvirt and installed with success a GPU pass trough VM (Windows).
I created a bridge like this with systemd :

file : enp0s31f6.network
[Match]
Name=enp0s31f6

[Network]
Bridge=br0

file : MyBridge.netdev
[NetDev]
Name=br0
Kind=bridge

file : mybridge.network
[Match]
Name=br0

[Network]
DHCP=ipv4


brctl show
bridge name	bridge id		STP enabled	interfaces
br0		8000.e65eaaf9f4ba	no		enp0s31f6
							vnet0
 

The problem is that sometimes, my host can't reach network when the route are like this :


 ip r s
default via 192.168.1.254 dev enp0s31f6 proto dhcp src 192.168.1.2 metric 202
default via 192.168.1.254 dev br0 proto dhcp src 192.168.1.1 metric 205 
192.168.1.0/24 dev enp0s31f6 proto dhcp scope link src 192.168.1.2 metric 202
192.168.1.0/24 dev br0 proto dhcp scope link src 192.168.1.1 metric 205 
192.168.1.254 dev br0 proto dhcp scope link src 192.168.1.1 metric 1024 

If I delete the first default route with :

sudo ip r d default via 192.168.1.254 dev enp0s31f6

The network came back on host, but I can't reach my NAS.


The fact is if I reboot My host, the route will be like this :

 ip r s
default via 192.168.1.254 dev enp0s31f6 proto dhcp src 192.168.1.2 metric 205
default via 192.168.1.254 dev br0 proto dhcp src 192.168.1.1 metric 202 
192.168.1.0/24 dev enp0s31f6 proto dhcp scope link src 192.168.1.2 metric 205 
192.168.1.0/24 dev br0 proto dhcp scope link src 192.168.1.1 metric 202 
192.168.1.254 dev br0 proto dhcp scope link src 192.168.1.1 metric 1024 

With that I've not problme on my network, all is accessible from anywhere.

I think that when route was created during the boot, once are created before the other and so the metric was not the same. I do not understant why though.

Can somebody give me an advice, please ?

Last edited by Shrom59 (2018-08-05 14:23:19)

Offline

#2 2018-08-05 16:52:17

Shrom59
Member
Registered: 2017-01-02
Posts: 20

Re: Bridge problem with libvirt.

Here it is the routes when all is working fine :

 ip r s
default via 192.168.1.254 dev br0 proto dhcp src 192.168.1.1 metric 202 
default via 192.168.1.254 dev enp0s31f6 proto dhcp src 192.168.1.3 metric 203 
192.168.1.0/24 dev br0 proto dhcp scope link src 192.168.1.1 metric 202 
192.168.1.0/24 dev enp0s31f6 proto dhcp scope link src 192.168.1.3 metric 203 
192.168.1.254 dev br0 proto dhcp scope link src 192.168.1.1 metric 1024 

Offline

#3 2018-08-06 17:58:47

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: Bridge problem with libvirt.

The values for metric are measured at runtime and can vary between boots.
It looks like the problem could be with enp0s31f6 getting an ip-address.

The bridge is managed by systemd-networkd , what are you using as dhcp client ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2018-08-07 18:14:16

Shrom59
Member
Registered: 2017-01-02
Posts: 20

Re: Bridge problem with libvirt.

Hey smile

Thanks for replying smile

I used dhcpcd for dhcp client. I resolve this by adding an PCI express card as passtrough.
I also tried to remove the dhcpcd config for enp0s31f6 and it works too.

Thanks for your answer man !
This is resolved

Last edited by Shrom59 (2018-08-07 18:14:43)

Offline

Board footer

Powered by FluxBB