[WEBINAR] The New Normal: Dealing with the Reality of an Unsecure World

Common Address Redundancy Protocol (CARP)

Definition - What does Common Address Redundancy Protocol (CARP) mean?

Common Address Redundancy Protocol (CARP) is an automatic failover and redundancy protocol introduced by OpenBSD in October 2003. CARP is designed to share a common IP address among multiple hosts in same network segment in order to provide failover redundancy to multiple servers or hosts. It is an alternative to Internet Engineering Task Force’s (IETF) Virtual Router Redundancy Protocol (VRRP) and Cisco’s Hot Standby Redundancy Protocol (HSRP).

CARP is designed as a free and open source alternate to VRRP that Cisco claimed had some technical resemblance to their proprietary HSRP. CARP works by allowing a group of hosts on the same network segment to share an IP address. This group of hosts is referred to as a redundancy group. The redundancy group is assigned an IP address and a common virtual host ID (VHID). The VHID allows group members to identify which redundancy group they belong to. Within the group, one host is designated as the master host and the rest as backup hosts. The master host is the owner of the shared IP address. The master host responds to any traffic or ARP requests directed towards it.

Techopedia explains Common Address Redundancy Protocol (CARP)

Each host may belong to more than one redundancy group at a time through multiple physical interfaces. The master host sends CARP advertisements to the backup hosts.

These CARP advertisements or CARP packets are composed of two values:

  • The advertisement base (advbase) of the master host: this can be configured independently on each host in the redundancy group. the advbase can contain values between 1 to 255.
  • The advertisement skew (advskew): this specifies how much to skew the advbase when sending CARP advertisements to other hosts. Its values range from 1 to 254.

By manipulating advbase and advskew values on each host, the master CARP host can be designated. The higher the combined value of these two parameters, the less preferred that host will be when choosing a master. In the case of CARP packet arrival failure after a specified time or receiving bigger advbase plus advskew value, a backup host assumes the duties of master host.

CARP has limited abilities for load balancing the incoming connections between hosts in an Ethernet network. For load balancing operations, several CARP interfaces are configured to the same IP address, but to different VHIDs. Once an ARP request is received, the CARP protocol uses a hashing function against the source IP address in the ARP request to determine which VHID this request should belong to. If the corresponding CARP interface is in a master state, the ARP request will receive a reply, otherwise it will be ignored.

In order to prevent a malicious user on the network segment from spoofing CARP advertisements, each group can be configured with a password. Each CARP packet sent to the group is then protected by a secure hash algorithm 1 hash-based message authentication code (SHA1 HMAC). CARP supports both Internet Protocol version 4 (IPV4) and Internet Protocol version 6 (IPV6) addressing. CARP can be used in domain name system (DNS) servers, Firewalls and other packet filtering servers where the client does not need to know and switch all the IP addresses in case of a failover.

Techopedia Deals

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
"Techopedia" on Twitter

Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Free Whitepaper: The Path to Hybrid Cloud
Free Whitepaper: The Path to Hybrid Cloud:
The Path to Hybrid Cloud: Intelligent Bursting To Amazon Web Services & Microsoft Azure
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.