Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question
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? –  Shane Madden Apr 25 '12 at 21:58

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
    
The case I can think of is implementing proper VRRP? –  Shane Madden Apr 25 '12 at 22:26
    
@ShaneMadden : You can tell I haven't drilled too deeply into some areas of networking. :D –  Justin Pearce Apr 25 '12 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). –  Shane Madden Apr 26 '12 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 '12 at 15:51

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.