FAQ
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.

Search Discussions

  • Steve Clark at Feb 3, 2012 at 9:10 am

    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
  • Robert Spangler at Feb 3, 2012 at 11:56 pm

    On Friday 03 February 2012 09:10, the following was written:
    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.
    Really? Only hubs present packets to all interfaces. Linux work as a router
    not a hub.

    --

    Regards
    Robert

    Linux
    The adventure of a lifetime.

    Linux User #296285
    Get Counted
    http://linuxcounter.net/
  • Ross Walker at Feb 4, 2012 at 7:09 pm

    On Feb 3, 2012, at 11:56 PM, Robert Spangler wrote:

    On Friday 03 February 2012 09:10, the following was written:
    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.
    Really? Only hubs present packets to all interfaces. Linux work as a router
    not a hub.
    It would be intetesting to know if the bridging in Linux is routed, switched or repeated.

    It would be nice if it were switched, but I suspect it's repeated (like a hub).

    -Ross
  • Steve Clark at Feb 4, 2012 at 7:18 pm

    On 02/03/2012 11:56 PM, Robert Spangler wrote:
    On Friday 03 February 2012 09:10, the following was written:
    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.
    Really? Only hubs present packets to all interfaces. Linux work as a router
    not a hub.
    A network bridge connects multiple network segments at the data link layer (Layer 2) of the OSI model. In Ethernet networks, the term bridge formally means a device that behaves according to the IEEE 802.1D standard. A bridge and a switch are very much alike; a switch being a bridge with numerous ports. Switch or Layer 2 switch is often used interchangeably with bridge.


    --
    Stephen Clark
    *NetWolves*
    Director of Technology
    Phone: 813-579-3200
    Fax: 813-882-0209
    Email: steve.clark at netwolves.com
    http://www.netwolves.com
  • Robert Spangler at Feb 5, 2012 at 10:17 am

    On Saturday 04 February 2012 19:18, the following was written:
    On 02/03/2012 11:56 PM, Robert Spangler wrote:
    On Friday 03 February 2012 09:10, the following was written:
    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.
    Really? Only hubs present packets to all interfaces. Linux work as a
    router not a hub.
    A network bridge connects multiple network segments at the data link layer
    (Layer 2) of the OSI model. In Ethernet networks, the term bridge formally
    means a device that behaves according to the IEEE 802.1D standard. A bridge
    and a switch are very much alike; a switch being a bridge with numerous
    ports. Switch or Layer 2 switch is often used interchangeably with bridge.
    The OP was asking for help on configuring bridging. You reply made it sound
    like it wasn't necessary as "All packets appear on both interfaces". That
    statement is false unless it has been configured that way. Which at that
    point in time we can assume that the OP hasn't configured it, thus the
    question.

    Nice textbook definition btw.


    --

    Regards
    Robert

    Linux
    The adventure of a lifetime.

    Linux User #296285
    Get Counted
    http://linuxcounter.net/
  • Steve Clark at Feb 5, 2012 at 3:00 pm

    On 02/05/2012 10:17 AM, Robert Spangler wrote:
    On Saturday 04 February 2012 19:18, the following was written:
    On 02/03/2012 11:56 PM, Robert Spangler wrote:
    On Friday 03 February 2012 09:10, the following was written:
    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.
    Really? Only hubs present packets to all interfaces. Linux work as a
    router not a hub.
    A network bridge connects multiple network segments at the data link layer
    (Layer 2) of the OSI model. In Ethernet networks, the term bridge formally
    means a device that behaves according to the IEEE 802.1D standard. A bridge
    and a switch are very much alike; a switch being a bridge with numerous
    ports. Switch or Layer 2 switch is often used interchangeably with bridge.
    The OP was asking for help on configuring bridging. You reply made it sound
    like it wasn't necessary as "All packets appear on both interfaces". That
    statement is false unless it has been configured that way. Which at that
    point in time we can assume that the OP hasn't configured it, thus the
    question.

    Nice textbook definition btw.
    Hi Robert,

    I guess I misread his question - I thought he had the bridge setup and was asking about how to specify what tcp/udp ports would be bridged.
    My bad.

    Regards,
    Steve

    --
    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 at Feb 3, 2012 at 12:16 pm

    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 at Feb 3, 2012 at 11:53 pm

    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
    #BROADCAST2.168.1.255
    HWADDRH:5B:39:2A:07:D5
    #IPADDR2.168.1.100
    #NETMASK%5.255.255.0
    #NETWORK2.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/
  • Mihamina Rakotomandimby at Feb 6, 2012 at 12:18 am

    On 02/04/2012 07:53 AM, Robert Spangler wrote:
    <snip>
    DEVICE=eth#
    ONBOOT=yes
    BRIDGE=br#
    </snip>
    Thank you so much, Robert.
    That is the thing I wanted to do.

    For the record, in Debian world, it's

    auto br0
    iface br0 inet static
    address 192.168.0.10
    network 192.168.0.0
    netmask 255.255.255.0
    broadcast 192.168.0.255
    gateway 192.168.0.1
    bridge_ports eth0 # <----- here you list bridged ports

    I was a bit lost, I looked for that definition in the bridge conf file
    instead of the interface one.


    Thank you again.

    --
    RMA.
  • Gordon Messmer at Feb 5, 2012 at 3:38 pm

    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcentos @
categoriescentos
postedFeb 3, '12 at 8:07a
activeFeb 6, '12 at 12:18a
posts11
users6
websitecentos.org
irc#centos

People

Translate

site design / logo © 2022 Grokbase