Re: Multi-Bridge How-To ?
"Taylor, Grant" <[email protected]>
| Newsgroups | gmane.linux.network.bridge.ebtables.user |
|---|---|
| Message-ID | <[email protected]> |
Michael L Owen wrote: > The documentation I have found so far adequately describes how to bind > eth0 and eth1 to a brdidge (br0). Is there any documentation ao article > that describes how to enslave more that two interfaces. My goal is to > have one upstream interface, and two downstream interfaces on the > bridge. The two downstream interfaces probably shouldn't be able to > communicate. > > Thanks in advance for any links and help > > Moke You should be able to use the brctl command to bind a 3rd interface to your bridge via the following command: brctl addif br0 eth2 Then you will need to prevent forwarding between eth1 and eth2 which can be done a couple of different ways. You could either set a policy of DROP in your forward chain and explicitly allow forwarding between eth0 - eth1 and eth2 - eth1. Or you could set a rule to DROP forwarding between eth0 and eth2. I prefer the former way. ebtables -t filter -P FORWARD DROP ebtables -t filter -F FORWARD ebtables -t filter -A FORWARD -i eth0 -o eth1 -j ACCEPT ebtables -t filter -A FORWARD -i eth1 -o eth0 -j ACCEPT ebtables -t filter -A FORWARD -i eth2 -o eth1 -j ACCEPT ebtables -t filter -A FORWARD -i eth1 -o eth2 -j ACCEPT Or you could simply do this for the latter method. ebtables -t filter -P FORWARD ACCEPT ebtables -t filter -F FORWARD ebtables -t filter -A FORWARD -i eth0 -o eth2 -j DROP ebtables -t filter -A FORWARD -i eth2 -o eth0 -j DROP I do like the first method as it will be more scaleable to additional interfaces should you ever choose to do so where as the 2nd method you will have to remember to explicitly DROP traffic between the additional interfaces. Grant. . . . ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005