2

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

1
  • 2
    The interface only has one MAC - working as designed. Can you clarify why that's a requirement? What root problem are you trying to solve? Apr 25, 2012 at 21:58

2 Answers 2

1

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.

4
  • The case I can think of is implementing proper VRRP? Apr 25, 2012 at 22:26
  • @ShaneMadden : You can tell I haven't drilled too deeply into some areas of networking. :D Apr 25, 2012 at 22:31
  • Haha, fair enough. VRRP is an interesting edge case - the spec calls for virtual MAC addresses to be used in concert with the real MAC address of the interface. However, it's not possible in Linux - so the VRRP implementations ignore that part of the spec and keep the interface using one MAC address at a time (which is changed in a failover). Apr 26, 2012 at 0:11
  • Hey, I may not able to use multimac as the routers are not supporting that.. can you people tell me more about VRRP?? any tutorials for that in debian/ubuntu
    – sanketmlad
    Apr 26, 2012 at 15:51
2

You can find some research at: http://searchnetworking.techtarget.com/definition/VRRP and http://www.techopedia.com/definition/13483/virtual-router-redundancy-protocol-vrrp

What you describe is a network system involving a virtual router, so this requires a master (physical) router, LAN, and IP that feeds a network of (virtual) routers with associated IP's.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .