123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- ! Configuration File for keepalived
- global_defs {
- notification_email {
- acassen@firewall.loc
- failover@firewall.loc
- sysadmin@firewall.loc
- }
- notification_email_from Alexandre.Cassen@firewall.loc
- smtp_server 192.168.200.1
- smtp_connect_timeout 30
- router_id LVS_DEVEL
- vrrp_skip_check_adv_addr
- vrrp_garp_interval 0
- vrrp_gna_interval 0
- }
- vrrp_instance VI_1 {
- #注意主备参数选择
- state BACKUP #无常主模式初始角色,均填写 BACKUP
- #state BACKUP #备
- interface eth0 #改成本机网卡名 例如 eth0
- virtual_router_id 51
- nopreempt #非抢占模式
- # preempt_delay 10
- priority 50 #无常主模式大小相同
- advert_int 1
- authentication {
- auth_type PASS
- auth_pass 1111
- }
- unicast_src_ip 172.18.0.13 # 修改本机内网 IP
- unicast_peer {
- 172.18.0.16 #修改为对端设备的 IP 地址
- }
- virtual_ipaddress {
- 172.18.0.253 #修改为内网 VIP
- }
- notify_master "/etc/keepalived/notify_action.sh MASTER"
- notify_backup "/etc/keepalived/notify_action.sh BACKUP"
- notify_fault "/etc/keepalived/notify_action.sh FAULT"
- notify_stop "/etc/keepalived/notify_action.sh STOP"
- garp_master_delay 1
- garp_master_refresh 5
- track_interface {
- eth0 #改成本机网卡名 例如 eth0
- }
- track_script {
- checkhaproxy
- }
- }
|