- Local time
- 11:38 PM
- Posts
- 4,704
- Location
- Hafnarfjörður IS
- OS
- Windows XP,7,10,11 Linux Arch Linux
Hi folks
Happy XMAS all
Got fed up with turkey, booze etc etc so I thought I'd have another go at this -- trying to get Bridged networking to actually function decently on a Linux VM or Host.
It turned out a lot simpler than I thought.
BTW NEVER EVER BOTHER WITH REDDIT OR ANY SOLUTIONS THEY PROPOSE --IT'S A 100% MOST USELESS WEBSITE ON THE PLANET.
Anyway here it is (I'm on archlinux (but should work on any of the "Debian" types of derivatives).
ensure root -- best to do either su - or sudo - the reason for the minus sign after the su or sudo command - is you want to be root rather than a user with admin / su privileges -- otherwise the file gets created in your /home directory which means the system can't find the file when you want to start the bridge
initially just do su - and then enter password (don't forget the - sign after the su command)
nano br10.xml
<network>
<name>br10</name>
<forward mode='nat'>
<nat>
<port start='1024' end='65535'/>
</nat>
</forward>
<bridge name='br10' stp='on' delay='0'/>
<ip address='192.168.30.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.30.50' end='192.168.30.200'/>
</dhcp>
</ip>
</network>
virsh net-define br10.xml
virsh net-start br10
virsh net-autostart br10
now you might need to change the ip address but dhcp should be able to manage that.
Then it all works -- no complex subnets / routing tables etc etc required.
On the host BR10 is up and running (note it's only UP once the VM is powered on).
In the VM's config (Windows 11 pro)
and in the guest
IP address OK
Internet access OK -- pinged BBC
Guest<> Host communication OK
So "Alles in Ordnung" and problem solved.
Not complex at all -- no need for "Interfaces" -- etc etc.
I'm not a Network Guru so if I can do it --it must be simple.
Cheers everybody -- now for some nice Xmas booze !!!
jimbo
Happy XMAS all
Got fed up with turkey, booze etc etc so I thought I'd have another go at this -- trying to get Bridged networking to actually function decently on a Linux VM or Host.
It turned out a lot simpler than I thought.
BTW NEVER EVER BOTHER WITH REDDIT OR ANY SOLUTIONS THEY PROPOSE --IT'S A 100% MOST USELESS WEBSITE ON THE PLANET.
Anyway here it is (I'm on archlinux (but should work on any of the "Debian" types of derivatives).
ensure root -- best to do either su - or sudo - the reason for the minus sign after the su or sudo command - is you want to be root rather than a user with admin / su privileges -- otherwise the file gets created in your /home directory which means the system can't find the file when you want to start the bridge
initially just do su - and then enter password (don't forget the - sign after the su command)
nano br10.xml
<network>
<name>br10</name>
<forward mode='nat'>
<nat>
<port start='1024' end='65535'/>
</nat>
</forward>
<bridge name='br10' stp='on' delay='0'/>
<ip address='192.168.30.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.30.50' end='192.168.30.200'/>
</dhcp>
</ip>
</network>
virsh net-define br10.xml
virsh net-start br10
virsh net-autostart br10
now you might need to change the ip address but dhcp should be able to manage that.
Then it all works -- no complex subnets / routing tables etc etc required.
On the host BR10 is up and running (note it's only UP once the VM is powered on).
In the VM's config (Windows 11 pro)
and in the guest
IP address OK
Internet access OK -- pinged BBC
Guest<> Host communication OK
So "Alles in Ordnung" and problem solved.
Not complex at all -- no need for "Interfaces" -- etc etc.
I'm not a Network Guru so if I can do it --it must be simple.
Cheers everybody -- now for some nice Xmas booze !!!
jimbo
Last edited:
My Computer
System One
-
- OS
- Windows XP,7,10,11 Linux Arch Linux
- Computer type
- PC/Desktop
- CPU
- 2 X Intel i7