Setup a network bridge on CentOS 7 to make VMs for other servers on LAN

Hi All,
https://www.cyberciti.biz/faq/how-to-install-kvm-on-centos-7-rhel-7-headless-server/
in this guide at the section :
Step 3: Configure bridged networking if I try to :

cat /etc/sysconfig/network-scripts/enp3s0 

I don’t found any file to make VMs avilable to other servers on my LAN…
suggestions ?
thanks
Gio

Hi @GioMBG

You need to replace enp3s0 with your actual Ethernet config file name as per your setup. HTH

Hi nixcraft,
first thanks for your Support.

I have some differences in my CentOS 7
I would like to be sure to not do mistakes so I profit to post some shell results following your guide :

[root@CentOS-76-64-minimal ~]# lsmod | grep -i kvm
kvm_intel 183705 0
kvm 615914 1 kvm_intel
irqbypass 13503 1 kvm

[root@CentOS-76-64-minimal ~]# brctl show
bridge name bridge id STP enabled interfaces
virbr0 8000.52540007fd99 yes virbr0-nic

[root@CentOS-76-64-minimal ~]# virsh net-list
Nome Stato Avvio automatico Persistent

default attivo yes yes

[root@CentOS-76-64-minimal ~]# virsh net-dumpxml default
<network>
  <name>default</name>
  <uuid>6e3e39a8-b063-470e-93d9-eb91e5d34b9b</uuid>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='virbr0' stp='on' delay='0'/>
  <mac address='52:54:00:07:fd:99'/>
  <ip address='192.168.122.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.122.2' end='192.168.122.254'/>
    </dhcp>
  </ip>
</network>

[root@CentOS-76-64-minimal ~]# cd /etc/sysconfig/network-scripts/
[root@CentOS-76-64-minimal network-scripts]# ls -l
totale 240
-rw-r–r-- 1 root root 252 17 giu 16.03 ifcfg-enp0s31f6
-rw-r–r-- 1 root root 254 24 ago 2018 ifcfg-lo
lrwxrwxrwx 1 root root 24 5 dic 2018 ifdown → …/…/…/usr/sbin/ifdown
-rwxr-xr-x 1 root root 654 24 ago 2018 ifdown-bnep
-rwxr-xr-x 1 root root 6532 24 ago 2018 ifdown-eth
-rwxr-xr-x 1 root root 6190 30 ott 2018 ifdown-ib
-rwxr-xr-x 1 root root 781 24 ago 2018 ifdown-ippp
-rwxr-xr-x 1 root root 4540 24 ago 2018 ifdown-ipv6
lrwxrwxrwx 1 root root 11 5 dic 2018 ifdown-isdn → ifdown-ippp
-rwxr-xr-x 1 root root 2130 24 ago 2018 ifdown-post
-rwxr-xr-x 1 root root 1068 24 ago 2018 ifdown-ppp
-rwxr-xr-x 1 root root 870 24 ago 2018 ifdown-routes
-rwxr-xr-x 1 root root 1456 24 ago 2018 ifdown-sit
-rwxr-xr-x 1 root root 1462 24 ago 2018 ifdown-tunnel
lrwxrwxrwx 1 root root 22 5 dic 2018 ifup → …/…/…/usr/sbin/ifup
-rwxr-xr-x 1 root root 12415 24 ago 2018 ifup-aliases
-rwxr-xr-x 1 root root 910 24 ago 2018 ifup-bnep
-rwxr-xr-x 1 root root 13475 24 ago 2018 ifup-eth
-rwxr-xr-x 1 root root 10114 30 ott 2018 ifup-ib
-rwxr-xr-x 1 root root 12075 24 ago 2018 ifup-ippp
-rwxr-xr-x 1 root root 11893 24 ago 2018 ifup-ipv6
lrwxrwxrwx 1 root root 9 5 dic 2018 ifup-isdn → ifup-ippp
-rwxr-xr-x 1 root root 650 24 ago 2018 ifup-plip
-rwxr-xr-x 1 root root 1064 24 ago 2018 ifup-plusb
-rwxr-xr-x 1 root root 4997 24 ago 2018 ifup-post
-rwxr-xr-x 1 root root 4154 24 ago 2018 ifup-ppp
-rwxr-xr-x 1 root root 2001 24 ago 2018 ifup-routes
-rwxr-xr-x 1 root root 3303 24 ago 2018 ifup-sit
-rwxr-xr-x 1 root root 2711 24 ago 2018 ifup-tunnel
-rwxr-xr-x 1 root root 1836 24 ago 2018 ifup-wireless
-rwxr-xr-x 1 root root 5419 24 ago 2018 init.ipv6-global
-rw-r–r-- 1 root root 20671 24 ago 2018 network-functions
-rw-r–r-- 1 root root 31027 24 ago 2018 network-functions-ipv6
-rw-r–r-- 1 root root 96 17 giu 16.03 route-enp0s31f6

[root@CentOS-76-64-minimal network-scripts]# cat route-enp0s31f6

Hetzner Online GmbH installimage

ADDRESS0=0.0.0.0
NETMASK0=0.0.0.0
GATEWAY0=138.201.195.65

[root@CentOS-76-64-minimal network-scripts]# cat ifcfg-enp0s31f6

Hetzner Online GmbH installimage

DEVICE=enp0s31f6
ONBOOT=yes
BOOTPROTO=none
IPADDR=138.201.195.100
NETMASK=255.255.255.255
SCOPE=“peer 138.201.195.65”

IPV6INIT=yes
IPV6ADDR=2a01:4f8:172:3d1f::2/64
IPV6_DEFAULTGW=fe80::1
IPV6_DEFAULTDEV=enp0s31f6

2 question :

where Add line :
BRIDGE=br0 ?

where Append the following :

DEVICE=“br0”

I am getting ip from DHCP server

BOOTPROTO=“dhcp”
IPV6INIT=“yes”
IPV6_AUTOCONF=“yes”
ONBOOT=“yes”
TYPE=“Bridge”
DELAY=“0”

always thanks
Gio