User Tools

Site Tools


Fault tolerance.

CARP setup.

CARP (Common Address Redundancy Protocol) is a network protocol, which allows multiple hosts on the same local area network to share a set of IP-addresses.

Using CARP, servers are combined in virtual group (VHID), which obtains virtual IP-address (Virtual IP), and CARP protocol apply a virtual MAC-address to it. Virtual IP-address should be specified as default gateway on LAN workstations. Within the group one of servers become “the main one” (MASTER), and all others are marked as “backup” (BACKUP). Each server can be in several groups simultaneously. In case that the master server will fail, the new master will be chosen from the backup servers, it would accept virtual IP-address and will proceed to answer to client’s requests. CARP’s design requires all members of a virtual group to be physically placed in one subnetwork.

For activate CARP in your local network, you can mark the checkbox “Use CARP” in LAN settings in the “Providers and networks” module.

Virtual IP is an IP-address of the virtual group. The address must be unique and must belong to the same network, that is assigned to the LAN.

VHID (Virtual Host ID) is an id you use for combine several servers in one virtual group (pick any number from 1 to 254). Within one server on different interfaces different VHIDs must be assigned for prevention of MAC-address duplicating.

Virtual MAC-address is automatically formed and is the variation of 00:00:5e:00:XX, where ХХ is the VHID, written in hexadecimal (for example, if VHID=1 then mac-address will be 00:00:5e:00:01, if VHID=254 then MAC-address will be 00:00:5e:00:FE).

Password is used for server authentication in the virtual group. On every server the same password should be set up.

Advertisement base and Advertisement skew are parameters that help determine, how often does server send CARP-messages. Advertisement base is measured in seconds and defines interval between advertisements of CARP-messages. Advertisement skew is measured in 1/256 of a second, this interval is added to the common interval of advertisements and is used for make distribution of CARP-messages a little bit slower than on the other servers.

Using this parameters, you can define which server will be the master in a virtual group. For example: there are two servers – A (VHID 1) and B (VHID 1). We need server A to be the master by default. Then we have to make the following settings:

server A: Advertisement base = 1 Advertisement skew = 100 server B: Advertisement base = 1 Advertisement skew = 200

Server A will send CARP-messages faster, so it will become a master.

cluster50.txt · Last modified: 2020/03/11 16:35 by zog