I have an interface
host A with two different IP addresses (let's say
.1 is the standard IP of the host and
.3 is the failover IP that can be switched over to another server (
10.0.0.2) for HA purposes.
10.0.0.1 is set via
10.0.0.3 is managed via Pacemaker and added via
ip addr add.
My problem is that when I try to connect to a (local) service provided on
host A, it also uses
10.0.0.3 as the source address for the connection. This obviously wouldn't work if the failover IP was switched over to the secondary node (
host B). The question is now if I can somehow specify
10.0.0.1 as the source IP for connections to
ip route get 10.0.0.3 shows
10.0.0.3 as source address which is probably the reason for this behavior.