Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

HOW TO CREATE NETWORK BRIDGE IN

CENTOS 7 ( br0)

A. This is bridge ( static)


1 . first of all download the package of bridge

Yum install bridge-utils-* -y


2. create the bridge file in /etc/sysconfig/network-scripts/ifcfg-br0
Vi /etc/sysconfig/network-scripts/ifcfg-br0

TYPE=Bridge
BOOTPROTO=static
DEVICE=br1
ONBOOT=yes
IPADDR=192.168.0.121
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
DNS=8.8.8.8
SET=on
HWADDR=00:0c:29:2f:ee:8a

3. go to the /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
# BOOTPROTO=static
NAME=ens33
ONBOOT=yes
BRIDGE=br1
HWADDR=00:0c:29:2f:ee:8a
4. restart the service .
Systmectl restart network

B. This is create bridge ( dhcp )

1. First of all take backup


Cp /etc/sysconfig/network-script/ifcfg-eth0 /opt/

2. Create the bridge ( br1)


Vim /etc/sysconfig/network-script/ifcfg-br1
TYPE=Bridge
BOOTPROTO=dhcp
DEVICE=br1
ONBOOT=yes
3. go to the /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
# BOOTPROTO=dhcp
NAME=ens33
ONBOOT=yes
BRIDGE=br1
HWADDR=00:0c:29:2f:ee:8a

4. Restart the network service


Systemctl restart network

You might also like