Configure KVM Bridge Network on Debian 10

Before you configure bridge network, make sure you have bridge-utils installed.

apt install bridge-utils

You may also need ifdown and resolvconf packages installed

apt install ifupdown resolvconf

Here is the default /etc/network/interfaces i had on the server

root@PAR-199235:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp1s0f0
allow-hotplug enp1s0f0
iface enp1s0f0 inet static
	address 163.172.107.119
	broadcast 163.172.107.255
	netmask 255.255.255.0
	gateway 163.172.107.1
	dns-nameservers 8.8.8.8

root@PAR-199235:~# 

enp1s0f0 is name of the network interface card on the server.

To convert it to brudge configuration. You need to replace enp1s0f0 with br0.

Then add following to the file

    bridge_ports enp1s0f0
    bridge_stp off
    bridge_maxwait 5

Remember to replace enp1s0f0 with your actual network card interface name.

Also remove the line

allow-hotplug enp1s0f0

Here is the final /etc/network/interface file i have.

root@PAR-199235:~# cat /etc/network/interface
cat: /etc/network/interface: No such file or directory
root@PAR-199235:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface

auto br0
iface br0 inet static
	address 163.172.107.119
	broadcast 163.172.107.255
	netmask 255.255.255.0
	gateway 163.172.107.1
    bridge_ports enp1s0f0
    bridge_stp off
    bridge_maxwait 5
	dns-nameservers 8.8.8.8

root@PAR-199235:~# 
Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *