Hello everyone,
Sorry if this should go to server section, it sounded more like a networking issue so i decided to post it here. I apologise if i have mistaken.
Basically, 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.
Code:
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:
Code:
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:
Code:
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
Code:
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
Code:
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?