From: Stephen Hemminger <stephen.hemminger@vyatta.com>
To: Benoit PAPILLAULT <benoit.papillault@free.fr>
Cc: Bridge@lists.linux-foundation.org
Subject: Re: [Bridge] frame destinated to individual port MAC address
Date: Mon, 11 Aug 2008 16:31:59 -0700 [thread overview]
Message-ID: <20080811163159.49cf9980@extreme> (raw)
In-Reply-To: <48A0B4AD.6030703@free.fr>
On Mon, 11 Aug 2008 23:52:45 +0200
Benoit PAPILLAULT <benoit.papillault@free.fr> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi there,
>
> I'm working on very strange stuff using linux kernel bridge. Anyway, I
> have a quick question.
>
> Let's say I have 2 linux machines. Each has one bridge with several
> interfaces. One interface of the first bridge (say eth0) is connected to
> one interface of the other bridge (say eth0 again) using an Ethernet cable.
>
> I have not configured an IP address on the bridge itself (on purpose)
> but on each individual interface in the bridge. In order to be able to
> communicate with those interfaces, I use ebtable broute rules in order
> for the frame entering the bridge and with destination address being the
> individual interface to be routed (-j DROP). Examples:
>
> ebtables -t broute -L
> Bridge table: broute
>
> Bridge chain: BROUTING, entries: 4, policy: ACCEPT
> - -d 0:ff:7f:dc:d3:4d -j DROP
> - -d 0:ff:5e:7e:a5:ac -j DROP
> - -d 0:ff:22:84:70:19 -j DROP
> - -d 0:ff:2:fb:4:6d -j DROP
>
> This is working as expected. So far, so good.
>
> Now, using rtnetlink, I changed the port state (alternating between
> learning and forwarding). In the learning state, ping is no longer
> working between the 2 nodes. I would expect for the ping to be still
> working (since IMHO bridge itself and its port should not be subject to
> the bridge filtering rules).
>
> Disclaimer : I'm not saying that the current linux implementation is
> wrong, nor 802.1d is wrong.
>
> Questions are :
> - - according to 802.1d, what should happen to a frame with a destination
> address being the MAC addr of a bridge port when it enters this bridge
> port? Maybe this is outside of the scope of 802.1d since this frame is
> not going to be "forwarded" in any way.
>
> - - according to the current linux implementation, would it be a problem
> to accept such frame? I tried a quick patch and it seems to be working.
> However, it probably broke lots of other things.
>
You are doing things in a very non-standard way by putting IP addresses
on each interface. This then leads to problems. Don't do it.
If port is not forwarding, it needs to ignore the frame to prevent routing
loops.
Rather than an ask a detailed question like "what will happen if I misconfigure
the system, then change the behaviour", instead start a discussion about
your requirements. Like "I need to forward only frames from some MAC addresses
in a firewall". The answer might not involve bridging at all...
next prev parent reply other threads:[~2008-08-11 23:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-11 21:52 [Bridge] frame destinated to individual port MAC address Benoit PAPILLAULT
2008-08-11 23:31 ` Stephen Hemminger [this message]
2008-08-15 20:06 ` Benoit PAPILLAULT
2008-08-15 20:17 ` Malcolm Scott
2008-08-15 20:31 ` Stephen Hemminger
2008-08-15 21:12 ` Benoit PAPILLAULT
2008-08-15 21:03 ` Benoit PAPILLAULT
2008-08-15 22:03 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080811163159.49cf9980@extreme \
--to=stephen.hemminger@vyatta.com \
--cc=Bridge@lists.linux-foundation.org \
--cc=benoit.papillault@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox