[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-bridge
Subject:    Re: [Bridge] using bridge to fake multiple macs
From:       Henrik Nordstrom <hno () marasystems ! com>
Date:       2002-06-16 0:19:35
[Download RAW message or body]

I wouldn't say there is no possibility to do this with Linux, or that 
the bridge code isn't suitable. You just needs to combine a couple of 
features of Linux, each feature solving a part of the problem.

You have two problems here 

1. You want to give the appearance of having multiple Ethernet 
interfaces, each with their own MAC address, without having to 
actually install more than one Ethernet interface in the box.

2. You want to connect to the same LAN using multiple Ethernet 
interfaces (possibly virtual) using DHCP to assign their addresses 
from the ISP.


What you describe should be possible by combining

 a) bridgeing of the ethernet connection to the ISP and a couple of 
anonymous TAP connections.

 b) TAP based virtual networking, looping back on the same host (one 
TAP connecting to the bridge, another connecting to the host). For 
example using vtund <http://vtund.sourceforge.net/>, connecting to 
itself on loopback.

 c) A simple DHCP client running on the "host" TAP interfaces. I would 
probably use the client of udhcpd due to it's extreme simplicity.

 d) Policy based routing to have the correct traffic routed out on the 
correct interface (real or TAP), combined with arp_filter to not 
respond with ARP from the wrong interfaces.. (Linux by default 
responds to ARP for local addresses on all IP interfaces).

The first two (a, b) gives you virtual ethernet interfaces, each 
having their own MAC.

The second two (c, d) allows you to use more than one ethernet 
interface connected to the same LAN. The same things is needed even 
if you buy multiple etherent cards.

To summarise:

 * One TAP connection per virtual station (IP assigned by ISP using 
DHCP)
 * Each of these TAP connections is looped back to another TAP 
connection, connecting via bridgeing to the real ethernet.
 * arp_filter and policy routing to make Linux behave when having 
multiple interfaces connected to the same LAN.

Now, I cannot say I have tested a setup like the above, but in theory 
it should work.

Regards
Henrik

On Saturday 15 June 2002 12:55, Lennert Buytenhek wrote:
> Using bridging will not work for this.
>
> I don't think there is a current possibility to do what you
> want with linux.
>
> On Fri, Jun 14, 2002 at 05:32:23AM -0400, Andres Meyer wrote:
> > The problem:
> > My cable provider allows for 4 DHCP addresses on a bridged
> > interface. They are assigned per MAC address,
> > so I need 4 MAC addresses with 4 dhcpcd clients running.
> > I would like to have all these connections come to one box so I
> > can then do what I want (like using 1 as masq for the private
> > net, another one for direct forwarding to one private address
> > etc).
> > I know that it would be possible with 4 ethernet adapters, but I
> > dont have the room (or the money) for them.
> >
> > Any ideas?
> >
> > I tried with using the bridge and form a "virtual bridge" with
> > real the NIC and 4 dummy[0123] NICs, assigning separate MACs to
> > the dummy NICs, then running dhcpcd on the dummy interfaces.
> > Naturally, it did not work, as I think that you are not supposed
> > to have IPs on bridge interfaces.
> >
> > Any comments appreciated,
> > A. Meyer
> >
> > _______________________________________________
> > Bridge mailing list
> > Bridge@math.leidenuniv.nl
> > http://www.math.leidenuniv.nl/mailman/listinfo/bridge
>
> _______________________________________________
> Bridge mailing list
> Bridge@math.leidenuniv.nl
> http://www.math.leidenuniv.nl/mailman/listinfo/bridge

_______________________________________________
Bridge mailing list
Bridge@math.leidenuniv.nl
http://www.math.leidenuniv.nl/mailman/listinfo/bridge
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic