木榛

导航

Lab keepalived

[root@node1 keepalived]#cat keepalived.conf
! Configuration File for keepalived

global_defs {
   notification_email {
     acassen@firewall.loc
     failover@firewall.loc
     sysadmin@firewall.loc
   }
   notification_email_from keepalived@localhost
   smtp_server 127.0.0.1
   smtp_connect_timeout 30
   router_id LVS_DEVEL
   vrrp_skip_check_adv_addr
   vrrp_strict
   vrrp_garp_interval 0
   vrrp_gna_interval 0
   vrrp_mcast_group4 224.0.111.111
}

vrrp_instance VI_1 {
    state MASTER
    interface ens33
    virtual_router_id 55
    priority 100
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass VJ0QuPWJ
    }
    virtual_ipaddress {
        192.168.142.200/24 brd 192.168.142.255 dev ens33
    }

   track_interface {
    ens33
   }

   notify_master "/etc/keepalived/notify.sh master"
   notify_backup "/etc/keepalived/notify.sh backup"
   notify_fault "/etc/keepalived/notify.sh fault"

}

vrrp_instance VI_2 {
    state BACKUP
    interface ens33
    virtual_router_id 66
    priority 98
    advert_int 1
    authentication {
        auth_type PASS
        auth_pass 222
    }
    virtual_ipaddress {
        192.168.142.201/24 brd 192.168.142.255 dev ens33
    }
}



 

node2配置

 

posted on 2018-07-13 20:02  木榛  阅读(120)  评论(0编辑  收藏  举报