[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MAC aliasing



On Feb 2, 2005, at 2:45 PM, m christensen wrote:

Claudio Jeker wrote:

On Tue, Feb 01, 2005 at 08:31:50PM +0100, Mauro Calderara wrote:

Hi everyone

I've a simple problem and not yet a proper solution, maybe someone can give some pointers.

My cable-provider gives me 4 IPs via DHCP, but only one per MAC. The question is whether it is possible to "fake" MACs on a NIC. Since by concept this is something simple there might be a solution but it is highly possible that I didn't find the right words to feed the search engines.

Is the idea broken by concept? I know that a MAC is supposed to be unique worldwide, but still it was cool if I could get all IPs. I thought of a workaround but maybe you guys will just shake your heads when reading it, if so, please tell me (and why):

given that I have 5 NICs in the router, I thought that I could set up a vlan-interface on those not directly connected to the cable-modem (they were supposed to inherit their's parent's MAC, right?) and bridge these vlans to the one NIC attached to the modem. Then I'd just let the dhcp client try to configure them and hope the best. From a firewalling point of view this would probably be not so nice, but I guess that could be worked around with some added complexity to pf.conf to prevent spoofing on those interfaces but that shouldn't be much of a problem as far as I can see. Still it seems a bit hackish and since I don't have PCI-Slots ad infinitum it wouldn't "scale" well when adding another cable-modem :)

Any pointers, hints & flames appreciated



Never tried it but IIRC carp(4) should use a different MAC. An other sollution would be to build a bridge(4) with other devices -- tun(4) for example (but I'm not sure if tun(4) works in bridge mode).


So, why not just connect 4 NICs to the cable modem?
Cheap single NICs can be had for 5 bucks and I've seen multi port cards for ~30 in the past,
if slots are a problem.

yeah, that would solve the problem, too. in Switzerland singleport NICs aren't quite as cheap AFAICT but still affordable. Multiport is way beyond 180sFr (120euro?) ... but you are right, it might be the only solution. I'll try the trick with the vlans even tough no one commented it, if it doesn't work and diana's virtual-thing isn't out then, I'll have to go for a multiport NIC.


Mauro



Visit your host, monkey.org