Skip to content

Instantly share code, notes, and snippets.

@davesilva
Last active March 8, 2023 14:41
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davesilva/efb43d420e1053e1e168ebac0a62c2b8 to your computer and use it in GitHub Desktop.
Save davesilva/efb43d420e1053e1e168ebac0a62c2b8 to your computer and use it in GitHub Desktop.
Bridge networking for KVM on Debian Buster

Step 1: Create bridge network

Edit /etc/network/interfaces

# Set up physical ethernet interface (enp4s0) to not use DHCP
iface enp4s0 inet manual
iface enp4s0 inet6 manual

# Set up bridge interface to use DHCP instead
auto br0
iface br0 inet dhcp
    bridge_ports enp4s0
    bridge_stp off
    bridge_maxwait 0
    bridge_fd 0
iface br0 inet6 auto
    accept_ra 1

Run sudo systemctl restart networking

When running ip addr the br0 interface should have an ip address while enp4s0 should not.

Step 2: Configure KVM virtual machine to use br0

In virt-manager, edit the network interface for the VM and select "Bridge br0" as the network source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment