Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Angry CentOS 5.7 Failover?


    I have some problems and i want to find the best answear.

    I have one server that is running CentOS5.7
    I have services like named,mail,httpd,samba,ftp and many ....
    I have 2 Internet Providers one is ppoe and one is fiber(static ip on both)

    I am trying to have a failover mechanism on my server.
    I searched on the web and i found how to failover my 2 ISP and it is working.

    But the problem is with my mail. I am running exim with tpop3d with mysql support for both.
    What is the correct way to have a failover for my mail.
    I don`t want to have a backup mx. I want when the internet is down on my first ISP the mail will work on my second ISP.

    I have another server that i can run e-mail services if this is relevant.

    I really want to know what is the corect method for this. And yes of course i want to failover the httpd but for that i found many links but my problem is my e-mail server.


  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    There are two ISPs involved, that means: two independent networks.
    Hence you cannot migrate an IP between the two, which would be neccessary,
    because you essentially want a host under the same IP, but -depending on the situation- from different ISPs.

    Another not working way would be to lower the ttl of that zone to a very low value and then -in case of an ISP failure- assign a different IP to your MX host.
    This is obviously a bad idea, because it needs scripting to automate, has sideeffects on the other hosts of the zone, increases the load on the nameservers and isnt even reliable, because other dns might cache the old record longer than your ttl says.

    You are asking for the correct way.
    The correct way is to have a second MX entry with a lower priority ( == higher number ).
    The first mx host would have an IP from your first provider,
    the second mx host an IP from the second provider.
    Both IPs are on your centos box. Which is a SPOF then, but I am sure you know that.

    So the best solution is the one you excluded in your post.
    Is there a reason, why you dont want a backup mx?
    You must always face the curtain with a bow.

  3. #3


    Thanks you for you reply that was so fast.

    I have many clients that uses Outlook and they connect to my mail server with smtp and pop3. If i will have a backup mx, when the first ISP is down they cannot send or recieve mail beacuse is on the first ISP and now the second ISP is UP.

    I`ve tryed with dns and very low TTL but i have the problem that you mentioned above. I have a problem even with the "cache" from the "Windows" clients.

    I can have a secondary mx on the same server or on another server with the IP from the secondary ISP but how i will fix the problem with I don`t know if this can be fixed with DNS or ........

    I`ve searched the web and i know that i can have a secondary MX and the backup server will recieve all the mail and when the primary host is UP they will recieve the e-mails but this doesn`t help me.

    I want to have active mail server on both ISP..... like a failover system.

  4. $spacer_open
  5. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    I dont think this is possible without investing in more hardware/services and a more complex setup.
    Essentially you need the the mx hostname and IP static and available, even if a machine or service goes down.

    A way of doing this is to have (at least) a pair of redundant loadbalancers somewhere on the internet and *in the same network*.
    These LBs would then manage one or multiple "traffic IPs".
    The simple setup is, that such a traffic IP is bound to only one LB. If it goes down, then the other LB takes over.

    Should the traffic on one traffic IP come close to or exceed 1Gb/s (or more general: the max throughput of a nic and/or LB) then a multicast setup is possible, where the traffic IP is on multiple LBs concurrently.
    This involves also multicast mac addresses and lots of logic how and where to manage the connections.
    Tbh, I dont fully understand the details yet, but up to now we dont have to. (Unfortunately )

    But back to the simple case.
    This LB setup would have the IP and DNS setup for your MX host.
    The IP would be a traffic IP, as you can guess.
    There would also be a pool of mailservers.
    So for every connection, the LB decides where to send it.
    The decision can be based on load, but also on availability of the pool members.
    Note: The LBs are not mailservers themselves. They work tcp/ip based.

    Unfortunately in your case: A consequence of having redundant LBs is to question your setup altogether.
    It is pointless to have yet-another provider, which only service would be a redundant LB setup,
    only to let it point to a non-redundant mailserver.

    Yes, the original problem of "what happens if one ISP goes down" is addressed, but the cost and complexity is too high for too little gain imho.
    But ymmv.
    Last edited by Irithori; 06-29-2012 at 10:10 AM.
    You must always face the curtain with a bow.

  6. #5


    Wow ... thanks for this replays .... they really helped me .... but i`m still a little confused.

    After a lot of web search ... i`ve guesed that it cannot be so simple that i address here for a little chat.

    If i understood you reply corectly you are saying that i need to install a loadbalancer on the server on maybe on two servers and assign the ip`s from my ISP`S?

    But how is this possible ... what can i use on CentOS? You mean Clustering too ... or?

    I`m trying to have this setup for a long time and i don`t know in what direction to try.

    I really want to have a failover between my two ISP`S beacuse its a little frustrating when 1 ISP is down and my telephone starts ringing .... thats the issue. I don`t know what is the correct way to deal this problem.

    If you meant loadbalancers i can install them after i will read about the installing, but how i will configure my mail server .... my dns ....? Sorry if i`m a little "noobish" but i`ve searched a lot and i dont know anyone skilled in Linux to maybe help me decide in what direction i need to go.

    Thanks for your very good replys.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts