Pacemaker Virtual IP cannot be routed outside of its network
1
vote
1
answer
2618
views
I have a server cluster consisted of following setup:
2 Virtual Servers with 2 NIC's. eth0 (private network 10.0.0.0/16) and eth1 (public network 77.1.2.0/24 with gateway as 77.1.2.1)
For HA-01 VPS i have Private IP on eth0 set as 10.0.0.1
For HA-02 VPS i have Private IP set on eth0 as 10.0.0.2
Pacemaker/Corosync Cluster has been established between private IP addresses and Virtual IP (77.1.2.4) defined as clone Resource (IPAddr2) so it can float between two nodes.
pcs resource create VirtualIP1 ocf:heartbeat:IPaddr2 ip="77.1.2.4" cidr_netmask="24" nic="eth1" clusterip_hash="sourceip-sourceport" op start interval="0s" timeout="60s" op monitor interval="1s" timeout="20s" op stop interval="0s" timeout="60s" clone interleave=true ordered=true
Problem is, i cannot reach that IP address from world. I noticed that there is a route missing, so i add the static route
ip r add default via 77.1.2.1 dev eth1
But i still cannot ping google.com from those servers nor world can see them on that IP.
I also tried adding IP addresses from same subnet on eth1 like this:
HA-01 eth1: 77.1.2.2
HA-02 eth1: 77.1.2.3
Servers can be seen on those IPs by world but if i add VirtualIP resource i cannot reach them on Virtual IP address.
I also tried adding a source ip in routing table
ip r add default via 77.1.2.1 src 77.1.2.4
to no avail. I don't know what am i supposed to do to get this VirtualIP working.
I can reach 77.1.2.4 (Virtual IP Address) from other servers on that network, but not outside that network.
Firewall is established and high availability ports are passed via command
firewall-cmd --add-service="high availability"; firewall-cmd --add-service="high availability" --permanent
Is there anything here that i am missing?
If i add that address (77.1.2.4 - Virtual IP) alone on the interface of only one of those servers, it will work.... So is there an issue with ARP table perhaps or maybe router blocking some traffic?
Asked by Marko Todoric
(437 rep)
Jul 19, 2019, 02:54 PM
Last activity: Apr 15, 2025, 03:08 AM
Last activity: Apr 15, 2025, 03:08 AM