$linuxjunkies
>

CARP

also: Common Address Redundancy Protocol, virtual IP failover

CARP (Common Address Redundancy Protocol) is a network protocol that allows multiple hosts to share a single virtual IP address, providing automatic failover if the primary host fails.

CARP enables high availability by allowing two or more physical servers to present themselves as a single virtual entity with one shared IP address. When the primary server (master) fails, another server (backup) automatically takes over the virtual IP without manual intervention.

CARP works by having participating hosts periodically send advertisements (heartbeat messages) to announce their status and priority. If the master stops advertising within a timeout period, a backup host with the next-highest priority becomes the new master. This failover happens transparently to clients.

A common example is two web servers configured with CARP—clients connect to the virtual IP address (e.g., 192.168.1.100). If the primary server goes down, the secondary server assumes that IP within seconds, and traffic continues flowing with minimal disruption.

CARP is available on BSD systems (OpenBSD, FreeBSD) and some Linux implementations, though Linux more commonly uses keepalived with VRRP as an alternative for similar redundancy.

Related terms