1

On Debian machines, I would like to setup a VIP between two nodes for a public IP, but I would like to avoid using three IP addresses to make ucarp communicate between the two nodes.

Can I set it up so that ucarp will communicate using another physical interface than the one holding the VIP?

raphink
  • 11,337
  • 6
  • 36
  • 47

1 Answers1

2

First of all this is only lightly tested... :-)

An old and seemingly almost forgotten trick is the ability to configure multiple addresses on different subnets but on the same physical interface. So, if eth0 is your public-facing interface configure the master with, say, address 172.16.0.1/30 and your failover box with 172.16.0.2/30. These packets should forward through a local switch (thus ensuring vrrp messages to each other work) but won't be forwarded by your ISP [1]. Set the virtual address (eth0:ucarp) to your public IP. Note the subnet mask for the virtual IP will not be /32.

I'm assuming you want to "avoid using three IP addresses" because you don't want to consume three public IPs and not for some other reason.

[1] Unless your ISP is misconfigured and forwards multicast packets from private IPs. Yikes!

Caletronic
  • 36
  • 2