How do I do IP Failover for my Public IP address with Linux HA
I did a lot of experiment with heartbeat, corosync and pacemaker for IP FailOver which I have to do with Public IP. I did more than one ip failover(VIPs) with two nodes, also with three nodes BUT using Private IP(s) as VIPs.
I tried this using vbox virtual machines and everything was ok as far as I was doing with Private IP addresses but when I started thinking of doing for Public IP failover(which I’m assigned from ISP), I got stuck, confused questioning myself.
I have some machines in LAN interconnected with the help of Home Router on which DHCP enabled. I could not go further thinking how do I do failover for the Public IP which I am assigned.
My questions is,
How do I do the same failover for the Public IP address which I’m assigned? with one more router? if yes how?
Any help is greatly appreciated. Thanks!
Update
Related to my router:
- Ok, need two routers, how to know/buy if router supports clustering?
- Do I really need two ISP(public ip) links to failover the single public ip?.
- After all, I think I should do a
Port Forwardingon a router to VIP(private ip) which I have configured for failover using heartbeat on servers. How should I proceed for another VIP? is that on another router?
So you need a method to survive some kind of failure. Failure of what?
Failure of your router
You need:
- a cluster of two routers; pick ones that support clustering (passive-active is enough)
- two physical links from your ISP
- all servers should connect independently to both routers
Failure of either your router or ISP (done with DNS)
You need:
- two ISPs
- two “public” IPs (that is, Internet IPs)
- a DNS server with
- round-robin,
- and a very small TTL
- and capable of automatic deletion of IP record when that IP becomes unavailable
Failure of either your router or ISP (done with BGP)
You need:
- two ISPs
- each ISP to support BGP protocol – usually the cost is prohibitive
- two “public” IPs
- two routers with BGP support
With BGP you have much faster failover of incoming traffic than with DNS.
Check more discussion of this question.
Related posts:
- Router LAN port IP is a public address, is this correct?
- Can I have web server on a home network with 1 public IP address?
- Should I ever configure a host with a public IP address to accept traffic from a private IP address?
- Add second ip address to an existing SQl 2008 failover clustering
- Cannot access my webserver using its public address





