Re: Linux bridge patches

From: Matthew Grant (grantma@anathoth.gen.nz)
Date: Tue Jan 11 2000 - 14:42:33 EST


Miguel,

Picture the bridge as an ethernet wire, brg0 is the ehthernet interface
on to this one bit of wire. The approach you detail below does not work
well with the IP filter code, and you will get some other strange
effects as when a packet is received, the interface it is received from
is bound to the packet. This identity can be used by the higher layer
protocols, as in the IPv4 firewalling/filtering. The brg0 device gets
around this by assigning its own interface identity to the packets
intended for the machine itself. Nothing is lost, because the IP
filters for instance never looked at packets traversing the bridge as
they are further up in the IP stack. The tool for configuring the new
bridge code in 2.2.14 can be found here:

http://lrp.plain.co.nz/tarballs/bridgex_0.30.tar.gz

This will enable the ethernet interfaces you require for bridging, as by
default they are now turned off.

cheers,

Matthew Grant

Miguel Freitas wrote:
>
> Matthew,
>
> I'm just installing the kernel 2.2.14 and it seems that bridge code
> has a new maintainer, you! : ) Well, I'm not sure if you will be the
> maintainer, but at least you made the last updates of the code.
> I'm using linux as a bridge but, differently of what was said in
> howto, my bridge will have an IP. As far as all ports of a bridge work
> like being in the same subnet, I also want to have only one IP, which
> can be accessed from all ports.
> The first attempt to set this IP was assigning the same number for
> all my two interfaces. Unfortunally this didn't worked for me: the
> kernel routing table show routes for my subnet using the 2 iface, but a
> packet can only be sent to one device queue.
> So I take a different approach: set just one interface with the
> desired IP and hack the bridge code to work as I wanted. I made some
> patches to:
> 1) Use br_tx_frame() function for sending local generated packets to
> the right interface. This routine has been implemented but never
> referenced from other source files.
> 2) Handle incoming traffic for local ports delivering it to the
> appropriated one.
>
> I will port my patchs to the current 2.2.14 kernel right now. I can
> send it to you if you want. I guess that it could be merged in linux
> development if you think it's good.
>
> Regards,
>
> Miguel Freitas
>
> PS: I also have great interest in improving the bridge code. In
> particular I will begin to study the snmpd to see how we can implement
> bridge SNMP stats.

-- 
===============================================================================
Matthew Grant	     /\	 ^/\^	grantma@anathoth.gen.nz  It's/~~~~\Plain
where
LRP Networking Guy  /~~\^/~~\_/~~~~~\_______/~~~~~~~~~~\____/******\I
come from
===============================================================================

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:18 EST