Re: brouting on br0
Axel F <[email protected]>
| Newsgroups | gmane.linux.network.bridge.ebtables.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Marcin, In my opinion you didn't need a Bridge / Brouter. Is there a special reason to implements only a Router instead of the Bridge? I think this would be the simplest solution. Axel Marcin W. schrieb: > Im quite new in bridging and I've got few problems.. On my "image" below > there You can see description how the network looks like. Every IP is > assigned to MAC address. It works. > > __ __ __ __ __ __ _BRIDGE_ > | | | | > | | 10 (!) Mbit/s | | > | ROUTER : - - - - - - --:-- eth0 | > | | | | > | (ip:A.B.C.1) | (ip:0.0.0.0, mac:xx:xx:xx:xx:xx:xx) > | (ip:A.B.D.1) | | | > (mac:gg:gg:gg:gg:gg:gg) | | 100 Mbit/s > | | | eth1 --:-- - - - - - - - - - . > |__ __ __ __ __ __| | | > (ip:0.0.0.0, mac:yy:yy:yy:yy:yy:yy) | > | | > | | | > | | 100 Mbit/s > | eth2 --:-- - - - - - - - | > | | | > (ip:0.0.0.0, mac:zz:zz:zz:zz:zz:zz) | > | | | > | ___ __ _ | | > | | > br0 | > (ip:A.B.C.2, mac:xx:xx:xx:xx:xx:xx) | > | > | > _BUILDING B__ __ __ __ __ __ __ _ _ | > | | | > | subnet A.B.D.0/24 with gw A.B.D.1 :- - | > | __ __ __ __ __ __ __ __ __ __ __ _ _| > | > _BUILDING A__ __ __ __ __ __ __ _ _ > | | | > | subnet A.B.C.0/24 with gw A.B.C.1 :- - - - > | __ __ __ __ __ __ __ __ __ __ __ _ _| > > > But. There is a problem in communication between two subnets. If host > from one subnet wants to send packet to host from second subnet, > communication looks that way: > > - packet goes from host A to BRIDGE [with Ethernet II destination mac > address set to ROUTER mac gg:gg:gg:gg:gg:gg) > - BRIDGE sends packet to ROUTER.. through only 10 (!) Mbit/s.. > - ROUTER sends packet to BRIDGE, addressed to host B.. > - BRIDGE sends packet to host B > > How to make brouting of this kind of packets? I need make something like > this: > - packet goes from host A to BRIDGE [with Ethernet II destination mac > address set to ROUTER mac gg:gg:gg:gg:gg:gg) > - BRIDGE redirects packet to host B, whole connection is local and 100 > Mbit/s > > Please help me. I don't really get this whole BROUTING, all my tries > failed, I'm stuck. I've tried to use --redirect but it seems not to > work, maybe I need to set some IP addresses? Maybe some routing? I > thought that the rule below (bridging only) should work: > > ebtables -t broute -A BROUTING -d $MAC_OF_GW -p ipv4 -j redirect \ > --redirect-target ACCEPT > > BUT it doesn't. > > Don't know what else is needed.. Do I need some arp brouting? How should > it look like? > Is there a way to make correct brouting without submitting interfaces > like eth1, eth2? (there might be situation that someone who normally > works in BULDING B (eth2) gets his notebook and connects in BUILDING A, > where rest of hosts are in subnet (A.B.C.0/24)).. Is it possible? Could > You help me? Can iptables2 solve it? how? > I've talked to somebody who said that I need brouting between eth1->0, > eth2->0 and dnat.. > Routing table on bridge has only gateway set.. > # route -n > Kernel IP routing table > Destination Gateway Genmask Flags Metric Ref Use > Iface > A.B.C.0 0.0.0.0 255.255.255.0 U 0 0 0 br0 > 0.0.0.0 A.B.C.1 0.0.0.0 UG 0 0 0 br0 > > I'll be very glad hearing _every_ advise. I've to set at least simplest > redirection of packets to avoid complete saturation of 10 Mbit at eth0. > > ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642