Mihamina Rakotomandimby
2012-Feb-03 13:07 UTC
[CentOS] configure network bridge listing bridged intefaces
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? Thank you. -- RMA.
Steve Clark
2012-Feb-03 14:10 UTC
[CentOS] configure network bridge listing bridged intefaces
On 02/03/2012 08:07 AM, Mihamina Rakotomandimby wrote:> 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? > > Thank you. >All packets appear on both interfaces, unless you use ebtables/iptables to restrict them. -- Stephen Clark *NetWolves* Director of Technology Phone: 813-579-3200 Fax: 813-882-0209 Email: steve.clark at netwolves.com http://www.netwolves.com
Tait Clarridge
2012-Feb-03 17:16 UTC
[CentOS] configure network bridge listing bridged intefaces
On Fri, 2012-02-03 at 16:07 +0300, Mihamina Rakotomandimby wrote:> 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. >Do you mean bridging or bonding? Bonding is where you are combining two NIC ports for speed or reliability. Also known as link aggregation.
Robert Spangler
2012-Feb-04 04:53 UTC
[CentOS] configure network bridge listing bridged intefaces
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/
Gordon Messmer
2012-Feb-05 20:38 UTC
[CentOS] configure network bridge listing bridged intefaces
On 02/03/2012 05:07 AM, Mihamina Rakotomandimby wrote:> 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?For reference: As far as I know, bridged networking is only really documented for virtualization, but this link covers creation of a bridge and adding a single interface to it, and disabling iptables for bridges: http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Virtualization/sect-Virtualization-Network_Configuration-Bridged_networking_with_libvirt.html You'd simply set up both eth2 and eth3 as eth0 is set up in that example. The options available in ifcfg files are documented in: /usr/share/doc/initscripts-*/sysconfig.txt