Mac – Different Mac address to virtual interface and primary interface

ifconfiginterfacemacspoofingvirtualization

I am developing a system, where I need virtual interface to have different mac address for my primary and virtual interface

lets say my mac for eth0 is 00:11:00:11:00:11
and my virtual interface is eth0:0

by default eth0:0 have mac address 00:11:00:11:00:11

If I give the command

ifconfig eth0:0 hw ether 11:22:33:44:55:66

then mac address of eth0 also becomes 11:22:33:44:55:66

and vice versa

but I want different mac for both the interface

Thank you in advance

Best Answer

Physical interfaces have one hardware address per physical interface. This helps make sure that the correct packet makes it back to the correct physical port.

If you absolutely need this type of functionality you might look into this:

http://www.primianotucci.com/default.php?view=57

And their SourceForge page: http://sourceforge.net/projects/multimac/

Not sure why you need multiple hardware addresses, but multiple IP addresses per physical interface is typically what virtual interfaces are used for.

Related Topic