1

I'd like to use CARP between two systems with a VIP address, the VIP belonging to the master. The second system acts as a stand-by system which takes over the VIP in case the first system goes offline.

Both systems have two interfaces, a public and an internal one. Is it possible to run CARP between the two systems via the internal interfaces, while managing the VIP on the external interfaces? This way I'd be able to use just a single public address, the VIP itself, without the need for two additional real IPs.

1 Answer 1

1
+50

In a word, no. It would be unwise anyway as if both hosts were up, but you accidentally disconnected the external interface belonging to the master it wouldn't force a failover as both hosts would still see each other.

When setting up a carp(4) interface, you can specify a carpdev interface which is used to pass the CARP traffic however, it's also the interface that owns the VIP so you'd just end up with your public VIP assigned to the internal interfaces, if the system even let you get that far.

However you can run CARP on unnumbered interfaces, so you just ensure the interfaces are up without any IP assigned addresses, then assign your single VIP to your carpN interface. That then means that one host doesn't have any external connectivity which is a separate problem to solve.

1
  • Thanks for your answer! This is exactly the explanation that I needed.
    – watain
    May 22, 2018 at 11:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .