Re: Keepalived for IP failover only (no load balancing)

Jan-Frode Myklebust <[email protected]>
Newsgroups gmane.linux.keepalived.devel
Message-ID <[email protected]>
That's what we use keepalived for everywhere..

Here's the config we use on our DNS-servers as an example. Only
difference between primary and backup server, is that the backup server
has lover "priority" setting.


##################################################################
global_defs {
   notification_email {
     [email protected]
   }
   notification_email_from [email protected]
   smtp_server smtp.example.com
   smtp_connect_timeout 30
}

# Simple check that process is alive:
vrrp_script chk_named {
   script "pkill -0 named"        # cheaper than pidof
   interval 2                      # check every 2 seconds
   weight -4                       # default prio: -4 if KO
   fall 2                          # require 2 failures for KO
   rise 2                          # require 2 successes for OK
}

vrrp_instance DNS1_NO_VIP {
    state BACKUP
    interface eth0
    virtual_router_id 4
    priority 100
    advert_int 1
    # Have bind pick up new ip-address:
    notify_master "/usr/sbin/rndc reconfig"
    smtp_alert
    authentication {
        auth_type PASS
        auth_pass 1234abcd
    }
    virtual_ipaddress {
        109.247.114.4
        2a01:798:0:8012::4/128
    }
    track_script {
       chk_named
    }
}
##################################################################


  -jf

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.