Fri, February 23, 2018 ยท 1 min read

Setting up a kvm bridge on fedora 26

Setting up a kvm bridge on fedora 26

A network bridge connects more network segments. A software bridge behaves like a virtual network switch to which any physical or virtual devices can be connected.

  1. Add a bridge:
brctl addbr br0

Check the bridge status:

brctl show | grep br0
br0 8000.000000000000 no
  1. Create a configuration file for the bridge and add enp9s0 to it:
brctl addif br0 enp9s0

Configuration for enp9s0 (/etc/sysconfig/network-scripts/ifcfg-enp9s0):

TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
NAME=enp9s0
ONBOOT=yes
DEVICE=enp9s0
BRIDGE=br0

Configuration for br0 (/etc/sysconfig/network-scripts/ifcfg-br0):

DEVICE="br0"
ONBOOT=yes
TYPE=Bridge
BOOTPROTO=static
IPADDR=192.168.15.15
NETMASK=255.255.255.240
GATEWAY=192.168.0.4
STP=no
DNS1=4.2.2.2
DNS2=8.8.8.8
DEFROUTE=yes
NAME="br0"
  1. Verify the bridge:
brctl show | grep br0
br0 8000.001c2301fbdc no enp9s0

Additionally you can add gateway in /etc/sysconfig/network:

GATEWAY=192.168.0.4