Multiple MAC on a single (physical) interface

Frédéric Perrin frederic.perrin at resel.fr
Fri Feb 6 04:25:45 PST 2009


Le Jeudi 5 à 10:05, Nikos Vassiliadis a écrit :
> Frédéric Perrin wrote:
>>                                                     I need to be able
>> to send and receive using several MAC addresses, as if I had several
>> NIC (which I of course don't have).
>>
>> [...]
>>
> Yes, you could use a netgraph bridge to bridge several
> ethernet interfaces together. Luckily, there is also a
> pseudo-ethernet-like interface you can attach to this
> bridge and of course you get to treat the pseudo-ethernet
> as a regular ethernet interface, that is, change its
> MAC address.
>
> The process is described here:
> http://www.bsdatwork.com/2004/06/19/mac_spoofing_on_freebsd/

Oh, yes, I actually remember trying that. However, on the first ngctl(8)
invocation I do (even a 'ngctl list' after a clean reboot), the kernel
says :

> WARNING: attempt to net_add_domain(netgraph) after domainfinalize()

I can reproduce this by doing a 'kldload ng_socket'. kldstat(8) says
that the module is loaded anyway.

A quick googling says that this message is harmless. A 2006 post says
that it was silenced in 6-STABLE ; it lokks like this haven't made its
way to the 7.1-RELEASE I'm using.

However ;

On the next step, when I create the bridge, I have :

# ngctl -dd mkpeer ngeth0: bridge lower link0
[...]
ngctl: sendto(ngeth0:): No such file or directory
ngctl: send msg: No such file or directory

I guess I have to read more in details about how netgraph works in
recent releases of FreeBSD before goiing on. Unfortunately, I will soon
be physically away from my FreeBSD box for a week, and fiddling with net
interfaces is tipically something I'm afraid of doing through SSH.

Thanks anyway from the pointer.

-- 
Fred


More information about the freebsd-questions mailing list