[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Create bridge for KVM on local workstation



Nicolas Kovacs wrote: 
> I have Debian Trixie with KDE installed on my local HP Z440 workstation.
> 
> In the default configuration network is managed by NetworkManager. I have a
> router in my local network, and the workstation is a DHCP client.
> 
> # ip -brief -family inet address show
> lo               UNKNOWN        127.0.0.1/8
> enp3s0           UP             192.168.2.3/24
> # nmcli con show
> NAME                UUID                                  TYPE      DEVICE
> Wired connection 1  bfe0ecbc-1a65-4487-b7d8-5aaa563286ff  ethernet  enp3s0
> lo                  3552564c-088e-4907-ad2d-3b285a8439cc  loopback  lo
> 
> I'd like to create a br0 bridge with enp3s0 as a bridge slave, so I can have
> virtual machines on this machine connect to the local network.
> 
> What's the Debian way of doing this? Create a bridge with NetworkManager
> using nmtui? Edit /etc/network/interfaces or some configuration file stub
> around there?

If you control the router/DNS/DHCP, then the best move is to
drop NetworkManager and use /etc/network/interfaces:

auto enp3s0
auto br0
iface br0 inet static 
	bridge_ports enp3s0
    address 192.168.2.3
    netmask 255.255.255.0
    gateway 192.168.2.1

If you don't control DHCP and have to use it, stick with
NetworkManager.


-dsr-


Reply to: