no traffic between 2 bridges on two Linux hotst

Discussion in 'Linux Networking' started by wkevin, Jul 25, 2014.

  1. wkevin

    wkevin Guest

    Hi,
    I have two Linux hosts connected directly via a cable.

    I can ping one host from the other.

    I added a bridge on machine A by:

    ip link add p4p1 name mybr type bridge
    ip link set p4p1 down
    ip addr add 2.2.2.2/24 dev mybr
    ip link set mybr up


    I added a bridge on machine B by:
    ip link add p3p1 name mybr type bridge
    ip link set p3p1 down
    ip addr add 2.2.2.200/24 dev mybr
    ip link set mybr up

    On both machines I have

    ethtool mybr
    Settings for mybr:
    Link detected: yes

    However, I don't have traffic from one machine to the other:

    ping 2.2.2.200 from 2.2.2.2 does not work (and vice versa)

    Running "ifconfig mybr" on both machines shows that the Rx counters are not
    incremented (there are no Rx errors); The Tx counters on both sides are incremented.

    Any ideas what should I do to enable traffic ?


    regards,
    Kevin
     
    wkevin, Jul 25, 2014
    #1
    1. Advertisements

  2. wkevin

    ramirose Guest

    Hi,
    The following script (on both sides) should work:

    #!/bin/sh

    ip link add name mybr type bridge
    ip link set dev mybr up

    ip link set dev eth0 promisc on
    ip link set dev eth0 up

    ip link set dev eth0 master mybr

    #Now assign an IP address with ip addr add x.x.x.x/24 dev mybr

    Regards
    Rami Rosen

    http://ramirose.wix.com/ramirosen
     
    ramirose, Jul 25, 2014
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.