[CentOS] configure network bridge listing bridged intefaces

Robert Spangler mlists at zoominternet.net
Sat Feb 4 04:53:47 UTC 2012


On Friday 03 February 2012 08:07, the following was written:

>  Hi all,
>
>  Having a 4 NIC server, I want to bridge eth2 and eth3, with a bridge
>  named br0.
>
>  Searching the web I only found about creating a file
>  /etc/sysconfig/network-scripts/ifcfg-br0, but did not find where to
>  explicitely list what ports will be bridged.
>
>  Where is it configured?

Create your Bridge interface as you have found on the web.  Remember you do 
not have to label it as br0, you can label it any number you want.

After that is complete you just have to edit ifcfg-eth2 and ifcfg-eth3 to 
switch them to be part of the bridge with the following:

<snip>
DEVICE=eth#
ONBOOT=yes
BRIDGE=br#
</snip>

If your configs have a 'HARDWARE=' leave that in there.  the above should be 
all you need.  Remember to replace the '#' with the correct information.

Here is my config file for the interface connect to the bridge:

<snip>
# Realtek Semiconductor Co., Ltd. RTL-8110SC/8169SC Gigabit Ethernet
DEVICE=eth0
#BOOTPROTO=static
#BROADCAST=192.168.1.255
HWADDR=48:5B:39:2A:07:D5
#IPADDR=192.168.1.100
#NETMASK=255.255.255.0
#NETWORK=192.168.1.0
ONBOOT=yes
BRIDGE=br0
</snip>

I would suggest that you only comment out the other lines by placing a '#' in 
the front that way you can back out easy if there are any problem as I have 
above.


-- 

Regards
Robert

Linux
The adventure of a lifetime.

Linux User #296285
Get Counted
http://linuxcounter.net/



More information about the CentOS mailing list