Skip to content

Instantly share code, notes, and snippets.

@kenshinx
Last active January 2, 2016 13:49
Show Gist options
  • Save kenshinx/8312401 to your computer and use it in GitHub Desktop.
Save kenshinx/8312401 to your computer and use it in GitHub Desktop.
Keepalived HA configuration file. Used for fail-over
! Configuration File for keepalived
2
3 global_defs {
4 notification_email {
5 kenshin@staff.sina.com.cn
6 }
7 notification_email_from sec@staff.sina.com.cn
8 smtp_server mail.sina.com.cn
9 smtp_connect_timeout 30
10 router_id LVS_DEVEL_252
11 }
12
13 vrrp_instance VI_1 {
14 state BACKUP
15 interface eth0
16 virtual_router_id 21
17 priority 98
18 advert_int 1
19 authentication {
20 auth_type PASS
21 auth_pass sinasec
22 }
23 virtual_ipaddress {
24 172.16.140.250
25 }
26 }
! Configuration File for keepalived
global_defs {
notification_email {
kenshin@staff.sina.com.cn
}
notification_email_from sec@staff.sina.com.cn
smtp_server mail.sina.com.cn
smtp_connect_timeout 30
router_id LVS_DEVEL_249
}
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 21
priority 100
advert_int 1 #interval
authentication {
auth_type PASS
auth_pass sinasec
}
virtual_ipaddress {
172.16.140.250
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment