I am experimenting with cluster of 2 linux machines (nlb0 & nlb2) using heartbeat for httpd service. Each machine has 2 eternet cards, et0 connects to public network, and et1 is connect to a local router (10.0.0.1 for nlb0, and 10.0.0.2 for nlb2)
I ran into a problem that i did not understand.
When i start a heartbeat service on nlb0,
the machine creates an alias ip, that is
et0:0 192.168.0.200 and start a httpd service.
I can access a web service from other computer with that ip (http://192.168.0.200
On the nlb2, i start the heartbeat service, once it starts,
the nlb2 takes over the ip et0:0 192.168.0.200.
Now, I can still access the web service of nlb0 only with http://nlb0/index.html
, but the http://192.168.0.200
is now on nlb2.
I am confused because the nlb0 has not been down. I though the nlb2 will take the ip only when nlb0 is down.
I do more experiment by restart the heartbeat service on nlb0.
Once the heartbeat service start, the nlb0 take back the ip 192.168.0.200
Of course, nlb2 has not been down.
Can anyone help me understand the concept? The setting is below.
(same for both nlb0 and nlb2)
nlb0 192.168.0.200 httpd
(nlb2 has the same file except, "ucast eth1 10.0.0.1")
ucast eth1 10.0.0.2
respawn hacluster /usr/lib/heartbeat/ipfail