Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

With heartbeat and keepalived, the redundancy options I have always used work by moving a virtual IP address to a new machine (A layer 3 solution). The new machine sends out a gratuitous arp to tell machines on the network its MAC address is the new MAC for that IP.

Are there any current network redundancy options that use a virtual MAC address (layer 2) that gets moved between machines as well as the virtual IP? This would be useful for certain operating systems that don't understand GARP requests. I did find this keepalivd thread (from a Server Fault user it so happens) but it is back from 2005. Does anyone know the current state of virtual mac failover in Linux?

share|improve this question
up vote 1 down vote accepted

VRRP (RFC2338 for VRRPv2, RFC5798 for VRRPv3 which added IPv6 support) uses a virtual MAC address for each instance's virtual router, but still sends gratuitous ARP on a switchover.

While the keepalived VRRP implementation ignores this part of the specification and simply uses the interface MAC, VRRPd is capable of using the virtual MAC.

However, the concept of a virtual MAC doesn't play well with the Linux concept of a network interface; the VRRPd process must change the interface's MAC address to the virtual MAC when it takes over, which prevents running multiple VRRP virtual routers on a given interface.

share|improve this answer
Since this answer was written the Linux kernel has gained support for multiple MAC addresses per physical interface using macvlan virtual interfaces. Keepalived now features a "use_vmac" option that implements what is being required here. – Terry Burton Nov 12 '15 at 3:36

Certainly HP's various 'VirtualConnect' products allow you to use a preconfigured MAC or range of MACs that you then map to a specific server as required. I've used this extensively and it works a treat, although we use it to pre-define new server's ethernet and FC environment before the physical server arrives on site but it could be used in the manner you describe.

This is entirely OS-gnostic btw, it's a virtual hardware thing, I'm not aware of a Linux-specific way of doing this other than via some form of scripting.

share|improve this answer
I think Kyle really want this automatically to happen as part of a cluster fail-over and resource ownership change and what you're proposing is basically a deployment thing that you would use after parts replacement or machine change etc. – pfo Jan 10 '12 at 14:33
If can be easily scripted though. – Chopper3 Jan 10 '12 at 14:34
How do you trigger the script and who triggers it? I do understand that what you propose is technically doable but it would certainly be some kind of weakest link in your cluster. – pfo Jan 10 '12 at 14:49

CARP uses a virtual MAC addreses (in a manner similar to VRRP, but not patent-encumbered) for each IP redundancy group. The master host in the group responds with the virtual MAC. When failover occurs the MAC doesn't change. I've used ucarp on Linux and been very pleased with it.


This isn't going to help you (everybody, downvote away!). The Linux CARP implementation I linked to, ucarp, doesn't actually use a virtual MAC address. The original OpenBSD implementation does, but the Linux implementation does not. Everything worked as I wanted in my deployment so I never dug down into it (until this morning) to see that it isn't doing anything useful at layer 2 for Kyle's needs.

I am seeing some discussion on the Linux HA list about using ifconfig to assign virtual MAC addresses to interfaces at failover-time. That doesn't sound like a tremendously bad option, especially if you're using virtual hardware and can afford to "spend" a virtual NIC on it.

share|improve this answer
I'm not sure about the current state of things, but they used to use FreeBSD + CARP + HAProxy; but no longer do. They should be aware of CARP already. – Chris S Jan 10 '12 at 14:44
This is Linux, so I think it would be UCARP in this case, not sure if UCARP support VMAC -- looking into it now. – Kyle Brandt Jan 10 '12 at 14:54
@KyleBrandt: That'd be a "no". >sigh< – Evan Anderson Jan 10 '12 at 15:19

Your Answer


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.