# CARP configuration with 4 servers (3 masters)



## nbari (Apr 13, 2020)

I have  4 servers using CARP in 2 groups behind a load balancer serving only web traffic no firewall, something like this:


```
Load balancer
             G1 /             \ G2
       Server 1 (M)        Server 3 (M)
       Server 2 (B)        Server 4 (B)

M - CARP MASTER
B - CARP BACKUP
```

To take advantage of the 2 servers that are in backup mode I am thinking of creating a MASTER of the two backup servers, something like this:


```
Load balancer
                /      |      \
       Server 1 (M)    |     Server 3 (M)
       Server 2 (B)    |     Server 4 (B)
                       |
                    Master 
         Server 1 (B)    Server 3(B)
         Server 2 (B)    Server 4(B)
```
 

The new master should be created only from the serves that are in backup mode from group 1 and group 2.

Currently, I am configuring each group with something like this:


```
# group 1
inet 10.0.0.10/32 vhid 1 advskew 0   pass secret # server 1
inet 10.0.0.10/32 vhid 1 advskew 100 pass secret # server 2

# group 2
inet 10.0.0.11/32 vhid 1 advskew 0   pass secret # server 3
inet 10.0.0.11/32 vhid 1 advskew 100 pass secret # server 4
```

But wondering how could I  create a new `vhid "10.10.0.12"`  only using the backups from G1 and G2.

Any ideas?


----------

