Why does CARP use multicast?

Hi,

apparently, on Linux VRRP/Keepalived can use broadcasts or even unicast.

The reason I ask is because it's a pain to get working in VMWare and esp. between different clusters in different datacenters.

(I know that stretching VLANs between datacenters is BS, the networking-people seem to know it, too, but do it nevertheless)....
 
Multicast is chosen by 'designers' for many network protocols because its the best logical choice for that task/job at hand. You have a bunch of of nodes that need to easily 'find' and communicate with each other, yet not waste CPU cycles on other machines that have no need to receive the protocol communications - multicast fits nicely. Yeah it may pinch you in certain setups, but in the world of networking (routing and switching) it makes perfect sense. Routing protocols like OSPF, and EIGRP are also multicast based. VRRP and Cisco HRSP which is what CARP emulates (for lack of a better word) depend on multicast.
 
Broadcast traffic is spammed out every single port on all switches for the vlan that receives it. A lot of unnecessary traffic that the endpoint devices need to drop, especially if you just need to communicate between a handful of devices.

Multicast traffic is only sent out switch ports that are part of the multicast group. In other words, only the devices that need to receive the packet actually receives it. And it's very bandwidth efficient to send a single multicast packet to a remote router/switch that then copies that packet to all the multicast group members; compared to sending individual packets to each of the devices over the link.

For a CARP/VRRP consisting of only a pair of devices, then unicast vs multicast is pretty much a wash. The same number of packets are delivered for both setups, and most of the processing is done on the clients.

For a CARP/VRRP consisting of 3 or more devices, then multicast makes sense as only a single packet needs to be sent from the client to the switch, and it's up to the switch to do the copying and delivering to the rest of the group. Using unicast between 3 or more devices would require each device to send multiple packets (1 to each remote device) and for the switches to deal with all those extra packets.

Scale that up to dozens or more devices, and unicast/broadcast will bog down the network. :)

If only Apple would realise that broadcast-based protocols are the spawn of the most evil of demons and would move to multicast (or even unicast). My god is Bonjour horrible to manage, especially on wireless networks!!!!!
 
Hi,

thanks for the answers.

We have a very "nice" problem in that CARP between two VM Clusters in two sites (yeah) doesn't work. It might be related to the fact that one of the VM clusters is built on top of HP Blades that don't have individual NICs, but rather a couple of large, shared NICs on the outside of the Blade System that are then (via some sort of SDN) funneled to each blade.

On the SDN, certain features can be en- and disabled, too (though apparently a lot of it only globally, not on a per-blade basis) and it is suspected that this is the reason why stuff does not work as expected.
 
For CARP to work make sure you enable "Promiscuous mode" on the network interface in the VM settings. At least that's what the setting is called on VirtualBox, I can't remember the exact setting on VMWare but it should have something similar.
 
Back
Top