Create Linux/Networking Bridge

Follow these instructions to create a networking bridge.
  1. Log in to the KVM server.
  2. Create a file called ifcfg-lanbrN and replace N with the interface number under /etc/sysconfig/network-scripts/ .
  3. Open the file in an editor and enter the following
    [localadmin@localhost network-scripts]$ cat ifcfg-lanbr201
    DEVICE=lanbr201
    TYPE=Bridge
    BOOTPROTO=none
    ONBOOT=yes
    DELAY=0
    [localadmin@localhost network-scripts]$
    
  4. To add the virtual interface to the LAN bridge, ensure ONBOOT=yes and BRIDGE=the name of the LAN bridge in the ifcfg-ens2f0 file, where ifcfg-ens2f0 is the virtual interface.
    [localadmin@localhost network-scripts]$ cat ifcfg-ens2f0
    TYPE=Ethernet
    PROXY_METHOD=none
    BROWSER_ONLY=no
    BOOTPROTO=dhcp
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=yes
    IPV6_AUTOCONF=yes
    IPV6_DEFROUTE=yes
    IPV6_FAILURE_FATAL=no
    IPV6_ADDR_GEN_MODE=stable-privacy
    NAME=ens2f0
    UUID=bf4196e3-b003-41ff-8b02-29ed79ea3552
    DEVICE=ens2f0
    ONBOOT=yes
    BRIDGE=lanbr201
    [localadmin@localhost network-scripts]$
    
  5. Create a WAN bridge by logging into the KVM server.
  6. Create a file called ifcfg-wanbrN and replace N with the interface number under /etc/sysconfig/network-scripts.
  7. Open the file in an editor and enter the following.
    [localadmin@localhost network-scripts]$ cat ifcfg-wanbr201
    DEVICE=wanbr201
    TYPE=Bridge
    BOOTPROTO=none
    ONBOOT=yes
    DELAY=0
    [localadmin@localhost network-scripts]$
    
  8. To add the virtual interface to the WAN bridge, ensure ONBOOT=yes and BRIDGE=the name of the WAN bridge in the ifcfg-ens2f1 file, where ifcfg-ens2f1 is the virtual interface.
    [localadmin@localhost network-scripts]$ cat ifcfg-ens2f1
    TYPE=Ethernet
    PROXY_METHOD=none
    BROWSER_ONLY=no
    BOOTPROTO=dhcp
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=yes
    IPV6_AUTOCONF=yes
    IPV6_DEFROUTE=yes
    IPV6_FAILURE_FATAL=no
    IPV6_ADDR_GEN_MODE=stable-privacy
    NAME=ens2f1
    UUID=f45577ab-f733-4c53-a791-fe44662cc5b4
    DEVICE=ens2f1
    ONBOOT=yes
    BRIDGE=wanbr201
    [localadmin@localhost network-scripts]$
    
  9. Restart the network by entering the following.
    $sudo systemctl restart network
  10. Verify the interfaces are connected to the bridges by entering the following.
    $sudo brctl show
    The interfaces should look like the following
    [localadmin@localhost network-scripts]$ brctl show
    bridge name     bridge id               STP enabled     interfaces
    lanbr201        8000.3cfdfe6272a8       no              ens2f0
                                                            vnet0
    lanbr202        8000.3cfdfe6272aa       no              ens2f2
                                                            vnet1
    lanbr203        8000.3cfdfe6272b8       no              ens3f0
                                                            vnet2
    
    wanbr201        8000.3cfdfe6272a9       no              ens2f1
                                                            vnet3
    wanbr202        8000.3cfdfe6272ab       no              ens2f3
                                                            vnet4
    wanbr203        8000.3cfdfe6272b9       no              ens3f1
                                                            vnet5
                                                            vnet6
    [localadmin@localhost network-scripts]$