[Bridge] IP address on physcial interface instead of bridge interface?

Joakim Tjernlund joakim.tjernlund at transmode.se
Sun Mar 28 02:53:45 PDT 2010


Stephen Hemminger <shemminger at linux-foundation.org> wrote on 2010/03/28 05:17:52:
>
> On Sat, 27 Mar 2010 11:50:23 +0100
> Joakim Tjernlund <joakim.tjernlund at transmode.se> wrote:
>
> > "richardvoigt at gmail.com" <richardvoigt at gmail.com> wrote on 2010/03/26 22:42:52:
> > >
> > > On Fri, Mar 26, 2010 at 3:48 PM, Joakim Tjernlund
> > > <joakim.tjernlund at transmode.se> wrote:
> > > >
> > > >
> > > > Nicolas de Pesloüan <nicolas.2p.debian at free.fr> wrote on 2010/03/26 21:39:33:
> > > >
> > > >> From: Nicolas de Pesloüan <nicolas.2p.debian at free.fr>
> > > >> To: Joakim Tjernlund <joakim.tjernlund at transmode.se>
> > > >> Cc: bridge at 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.

Right, what seems to be missing is at similar hook for TX path?
If a TX hook existed(I am guessing there isn't one) then it would
be relative simple to redirect pks from the IP stack to the bride
instead instead of the HW driver?

 Jocke



More information about the Bridge mailing list