When ethernet is removed then wifi doesnt work

price1221

Active Member
Joined
Jun 13, 2021
Messages
109
Reaction score
26
Credits
797
Code:
default via 172.16.0.65 dev nm-bridge proto static metric 425
default via 172.16.0.65 dev wlp3s0 proto dhcp src 172.16.0.107 metric 600
172.16.0.64/26 dev nm-bridge proto kernel scope link src 172.16.0.68 metric 425
172.16.0.64/26 dev wlp3s0 proto kernel scope link src 172.16.0.107 metric 600
192.168.100.0/24 dev virbr1 proto kernel scope link src 192.168.100.1 linkdown

this is my above routes in linux. nm-bridge is an bridge of eth0 which is for qemu VM networking. Now when i remove my ethernet my wifi (172.16.0.107) cant be pinged and in my linux i dont have internet but when i increase the metric of nm-bridge then wifi works. Now what can i do so that when i remove ethernet my wifi works. And when ethernet is connected internet should be used by ethernet.

1711650197961.png

I have deleted the ethernet interface while creating the bridge port
 
Last edited:


When using a VM your connections [including Wi-Fi] are controlled by the Host OS via means of a bridge. If you want to connect your VM direct to the outside world by Wi-Fi, then the best option is to use a second [USB] Wi-Fi adaptor
 
When using a VM your connections [including Wi-Fi] are controlled by the Host OS via means of a bridge. If you want to connect your VM direct to the outside world by Wi-Fi, then the best option is to use a second [USB] Wi-Fi adaptor
Ah well thats also a problem i need to deal with later but this config/problem is on the host machine no VM. I have just created the nm-bridge on host machine to have the same ip on the vms
 
Why are you running a bridge connection on your host machine with no VM ? looks like your 192.168.100.0/24 dev virbr1 proto kernel scope link src 192.168.100.1 linkdown is not right should be 172 like the rest and virbr1 I think should be virbr0

more like this - 192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1

In the VM you have to define the networking as bridged via virbr0, then it will automatically be assigned an address in the 192.168.122.0/24 subnet.
Once that is done and you are no longer bridged to the physical interface it should just work for you.
 
Why are you running a bridge connection on your host machine with no VM ? looks like your 192.168.100.0/24 dev virbr1 proto kernel scope link src 192.168.100.1 linkdown is not right should be 172 like the rest and virbr1 I think should be virbr0

more like this - 192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1

In the VM you have to define the networking as bridged via virbr0, then it will automatically be assigned an address in the 192.168.122.0/24 subnet.
Once that is done and you are no longer bridged to the physical interface it should just work for you.
I don't use virbr0 interface on VM I use nm-bridge which a bridge of eth0 of host. So I can request an IP for my VM of my subnet 172.16.0.0/24. I want my VM to be on my home subnet
 

Staff online

Members online


Top