Skip to content

Instantly share code, notes, and snippets.

@RVIRUS0817
Last active October 12, 2016 03:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RVIRUS0817/788867ac0f1233d6befd932c502fabb6 to your computer and use it in GitHub Desktop.
Save RVIRUS0817/788867ac0f1233d6befd932c502fabb6 to your computer and use it in GitHub Desktop.
keepalived
vrrp_sync_group VG {
group {
VI
VE
}
notify_master /etc/keepalived/vrrp_master.sh
notify_backup /etc/keepalived/vrrp_backup.sh
notify_fault /etc/keepalived/vrrp_backup.sh
notify /etc/keepalived/vrrp_state.sh
}
vrrp_instance VI {
state BACKUP
interface eth0
lvs_sync_daemon_interface eth1
garp_master_delay 5
virtual_router_id 101 #基本MASTERとBACKUPも同じにしてかぶらないよう気をつける
priority 100
nopreempt
advert_int 1
smtp_alert
authentication {
auth_type PASS
auth_pass password
}
virtual_ipaddress {
172.19.10.111/24 dev eth0
}
}
vrrp_instance VE {
state BACKUP
interface eth1
garp_master_delay 5
virtual_router_id 102
priority 100
nopreempt
advert_int 1
smtp_alert
authentication {
auth_type PASS
auth_pass password
}
virtual_ipaddress {
192.168.99.111/24 dev eth1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment