All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Cc: bridge@lists.linux-foundation.org
Subject: Re: [Bridge] IP address on physcial interface instead of bridge interface?
Date: Sat, 27 Mar 2010 20:17:52 -0700	[thread overview]
Message-ID: <20100327201752.51b6f7ad@nehalam> (raw)
In-Reply-To: <OFCA30CFD8.BFEED34E-ONC12576F3.003AD4F7-C12576F3.003B8B77@transmode.se>

On Sat, 27 Mar 2010 11:50:23 +0100
Joakim Tjernlund <joakim.tjernlund@transmode.se> wrote:

> "richardvoigt@gmail.com" <richardvoigt@gmail.com> wrote on 2010/03/26 22:42:52:
> >
> > On Fri, Mar 26, 2010 at 3:48 PM, Joakim Tjernlund
> > <joakim.tjernlund@transmode.se> wrote:
> > >
> > >
> > > Nicolas de Pesloüan <nicolas.2p.debian@free.fr> wrote on 2010/03/26 21:39:33:
> > >
> > >> From: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
> > >> To: Joakim Tjernlund <joakim.tjernlund@transmode.se>
> > >> Cc: bridge@lists.linux-foundation.org
> > >> Date: 2010/03/26 21:39
> > >> Subject: Re: [Bridge] IP address on physcial interface instead of bridge interface?
> > >>
> > >> Joakim Tjernlund wrote:
> > >>
> > >> > Figure a small picture will help so here it is:
> > >> >
> > >> > Before adding eth0 to br0:
> > >> > eth0    br0
> > >> >  |
> > >> >  |
> > >> > HW controller
> > >> >
> > >> > after adding eth0 to br0:
> > >> > eth0
> > >> >   \
> > >> >    \
> > >> >      br0
> > >> >    /
> > >> >   /
> > >> > HW controller
> > >>
> > >> I don't understand your ascii art. What is HW controller ? eth0 is an hardware
> > >> controller !?
> > >>
> > >>    Nicolas.
> > >
> > > eth0 is the I/F IP stack will see/use. HW controller is the ethernet HW controller,
> > > the PCI HW if you like.
> >
> > No!
> >
> > br0 does NOT sit between eth0 and the NIC.  eth0 still represents the
> > NIC.  br0 sits on top, and represents the combined traffic stream from
> > eth0 and all other bridge ports.  By adding eth0 to the bridge, you
> > told it to forward all incoming frames to br0 which is the next higher
> > layer in the virtual interface hierarchy.
> 
> Of course the above isn't how the bridge works today. I was trying
> to described a new feature which would let me use eth0 as my normal
> IP interface even after it was added to the bridge.
> The above would emulate connecting the eth0 I/F to an external HW bridge.

If you read the network receive code path in the kernel, you
will see that there is a special hook used. Basically,

  if received_interface_is_part_of_bridge(incoming_interface)
  then process_bridged_packet(packet)

Then bridge looks at packet and decides whether it is local or forwarded.
The problem is with your application if it wants to use eth0 directly.




-- 

  reply	other threads:[~2010-03-28  3:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-25 16:42 [Bridge] IP address on physcial interface instead of bridge interface? Joakim Tjernlund
2010-03-25 17:03 ` richardvoigt
2010-03-25 20:24   ` Joakim Tjernlund
2010-03-25 21:03     ` Nicolas de Pesloüan
2010-03-26  7:44       ` Joakim Tjernlund
2010-03-26  8:55         ` Bart De Schuymer
2010-03-26  7:55       ` Joakim Tjernlund
2010-03-26 20:39         ` Nicolas de Pesloüan
2010-03-26 20:48           ` Joakim Tjernlund
2010-03-26 21:35             ` Nicolas de Pesloüan
2010-03-27 10:42               ` Joakim Tjernlund
2010-03-28 15:19               ` Joakim Tjernlund
2010-03-28 16:03                 ` Stephen Hemminger
2010-03-28 16:19                   ` Joakim Tjernlund
2010-03-26 21:42             ` richardvoigt
2010-03-27 10:50               ` Joakim Tjernlund
2010-03-28  3:17                 ` Stephen Hemminger [this message]
2010-03-28  9:53                   ` Joakim Tjernlund
2010-03-28 12:48                   ` Bart De Schuymer
2010-03-28 18:27                     ` Joakim Tjernlund
     [not found]                     ` <OFDC6DBFAF.3C46B16B-ONC12576F4.00654457-C12576F4.00655D53@LocalDomain>
2010-03-28 19:04                       ` Joakim Tjernlund
     [not found]                       ` <OF59D1A758.6E7DFF8C-ONC12576F4.0068613D-C12576F4.0068C11D@LocalDomain>
     [not found]                         ` <OF66063C34.9F68251B-ONC12576F5.0025FFA1-C12576F <4BB05AE7.10905@pandora.be>
     [not found]                           ` <OF35408968.E095E27C-ONC12576F5. <4BB06A0E.9000705@pandora.be>
2010-03-29  6:57                         ` Joakim Tjernlund
2010-03-29  7:46                           ` Bart De Schuymer
2010-03-29  8:34                             ` Joakim Tjernlund
2010-03-29  8:51                               ` Bart De Schuymer
2010-03-29  8:59                                 ` Joakim Tjernlund
2010-03-29  9:31                                   ` Bart De Schuymer
2010-03-29  9:48                                     ` Joakim Tjernlund

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=20100327201752.51b6f7ad@nehalam \
    --to=shemminger@linux-foundation.org \
    --cc=bridge@lists.linux-foundation.org \
    --cc=joakim.tjernlund@transmode.se \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.