How to create a bridge interface on RHEL/CentOS

A bridge network interface  is a virtual interface mapped to corresponding physical interfaces.   Bridge network configuration in Linux can be managed using network configuration files located in /etc/sysconfig/network-script.

The purpose of bridging , the network connectivity fail over to avoid network downtime for production critical services / server.

Combine eth1 and eth2 physical interfaces and create a virtual interface br0, assign IP to it.

eth1       : No IP

eth2       : No IP

Note: eth1 and eth2 connect to same physical layer / media.

br0        – > eth1

           – > eth2

Note: br0 is a virtual interface mapped to eth0 and eth1

br0        – > 192.168.0.7

Netmask    – > 255.255.254.0

Gateway    – > 192.168.0.254

DNS        – > 192.168.0.2 , 8.8.8.8

In our configuration guide, we are using a Linux machine with two network cards connected same network. (eth1 and eth2), eth1 assinged temp IP : 192.168.1.43

We are going to create a virtual interface br0 and assigning IP: 192.168.0.7 by combining eth1 and eth2 for network redundancy.

Steps

Step 1:  Disable Network Manager

Step 2:  Create virtual interface br0

Step 3:  Configure Physcial interfaces eth1 and eth2

Step 4:  Restart network service and verify network settings

Let us see the steps in Details :

Step 1:  Disable Network Manager

#service NetworkManager stop

#chkconfig NetworkManager off

Step 2:  Create virtual interface br0

Add ifcfg-br0 file under /etc/sysconfig/network-script/

#vi /etc/sysconfig/network-scripts/ifcfg-br0

DEVICE=br0

TYPE=Bridge

ONBOOT=yes

BOOTPROTO=static

IPADDR=192.168.1.44

NETMASK=255.255.254.0

GATEWAY=192.168.0.254

DNS1=192.168.0.2

DNS2=8.8.8.8

Save & Exit(:wq)

Step 3:  Configure Physcial interfaces eth1 and eth2

[root@experts~]#vi /etc/sysconfig/network-script/ifcfg-eth1

DEVICE=eth1

BOOTPROTO=static

ONBOOT=yes

BRIDGE=br0

TYPE=Ethernet

Save & Exit (:wq)

[root@experts~]#vi /etc/sysconfig/network-scripts/ifcfg-eth2

DEVICE=eth2

BOOTPROTO=static

ONBOOT=yes

BRIDGE=br0

TYPE=Ethernet

Save & Exit!(:wq)

Step 4:  Restart network service and verify network settings

Restart the network services

#service network restart

Verify network settings

#ifconfig -a

Thank You 

For more detail you can watch video And also subscribe for more Videos :

Both comments and pings are currently closed.

Comments are closed.

Copyright ©Solutions@Experts.com
Copyright © NewWpThemes Techmark Solutions - www.techmarksolutions.co.uk