MultiMac: Linux multiple MAC address network tool
Multimac is a very simple Linux software that is able to emulate and use multiple virtual interfaces (with different MAC addresses) on a LAN using a single network adapter.
In fact, eth aliasing doesn't allow to specify a different MAC address for aliases (e.g. if you setup an alias eth0:0 for eth0 you can't provide a different MAC address to eth0:0).
This application helps to hack this (the project originally was born as a test on Linux Tun/Tap driver).
- Linux 2.6 kernel (should work with 2.4 kernels too but i've never tested it)
- Linux Tun driver (run "modprobe tun" first)
- Linux bridging driver (run "modprobe bridge" first)
Compiling and running:
The project can be compiled with just a plain
Launch the application specifying the number of virtual taps to allocate.
The program will allocate N+1 taps (6 in this example, tap0 to tap5).
Tap0 is the "hub" interface: all traffic generated on tap1... tapN will be "cloned" on tap0.
The goal is bridging tap0 to eth0 and reply all the layer2 traffic
brctl addbr br0 brctl addif br0 eth0 brctl addif br0 tap0 ifconfig eth0 down ifconfig eth0 0.0.0.0 up ifconfig tap0 0.0.0.0 up ifconfig br0 [Lan ip address] up
Then, the virtual adapters can be initialized as follows:
tap1 hw ether [new mac address] tap1 [virtual IP address 1] up ... similarly up to tapN
After the Linux bridging driver has initialized the ports (might take some seconds) the interfaces tap1...tapN are ready to be used.
All traffic will be cloned to the tap0 interface which is bridged with eth0 (conceptually it work like a big switch with eth0 tap1 tap2... tapN interfaces attached).
Once started MultiMAC will fork itself as a daemon
To terminate it just type
Sources Source tarball.
The applications are released under the terms of the GNU GPL