1.VIP:10.107.144.125
2.Master:10.4.7.121
/export/servers/keepalived-1.2.13/conf/keepalived.conf
! Configuration File for keepalived
global_defs {
notification_email {
xxx@jd.com
}
notification_email_from xxx@jd.com
smtp_server mail.jd.com
smtp_connect_timeout 30
router_id LVS_DEVEL
}
vrrp_instance vrrp_125
{
state MASTER
interface eth0
virtual_router_id 125
priority 100
advert_int 2
garp_master_delay 10
smtp_alert
authentication
{
auth_type PASS
auth_pass 123456
}
virtual_ipaddress
{
10.107.144.125/24
}
track_interface
{
eth0
}
}
2.Slave:10.4.7.122
/export/servers/keepalived-1.2.13/conf/keepalived.conf
! Configuration File for keepalived
global_defs {
notification_email {
xxx@jd.com
}
notification_email_from xxx@jd.com
smtp_server mail.jd.com
smtp_connect_timeout 30
router_id LVS_DEVEL
}
vrrp_instance vrrp_125
{
state BACKUP
interface eth0
virtual_router_id 125
priority 60
advert_int 2
garp_master_delay 10
smtp_alert
authentication
{
auth_type PASS
auth_pass 123456
}
virtual_ipaddress
{
10.107.144.125/24
}
track_interface
{
eth0
}
}