[LARTC] linux bridging problem: how to emulate 2 separate interfaces on a single one?

Alexey Toptygin alexeyt at freeshell.org
Fri Jul 1 21:52:29 CEST 2005


On Fri, 1 Jul 2005, Stephen Hemminger wrote:

>> LAN______________________________________________
>>                          |
>>                          | eth0 (no IP)
>>     _____________________|________________________
>>    |                     |          Linux Box (PC)|
>>    |             ________|________                |
>>    |            |                 |               |
>>    |            |       br0       |               |
>>    |            |     (no IP)     |               |
>>    |            |_________________|               |
>>    |           tap0  |        | tap1              |
>>    | 192.168.40.1/24 |        | 192.168.30.1/24   |
>>    |           MAC_0 |        | MAC_1             |
>>    |              ___|________|____               |
>>    |             |                 |              |
>>    |             | OS TCP-IP stack |              |
>>    |             |                 |              |
>>    |             |_________________|              |
>>    |                 | | | |                      |
>>    |                 | | | |                      |
>>    |                Processes                     |
>>    |                                              |
>>    |                                              |
>>    |______________________________________________|

[snip]

> It should work if the tap interface looks sufficiently like Ethernet.
> You probably need filter rules to make sure and drop packets intended for
> the other network get dropped and to prevent broadcast leakage.

The way I interpret the drawing, ISTM that Antonio has the bridge a layer 
below the tap devices (even though it's drawn a layer above). I don't 
think that's a very sane idea...

The crux of the problem seems to be that Antonio wants a single physical 
ethernet card to use two different MAC adresses, which I don't think 
briding is ever going to solve. This is, perhaps, possible by putting the 
card into promiscuous mode, and using some clever ebtables mangling.

 			Alexey


More information about the LARTC mailing list