码迷,mamicode.com
首页 > 其他好文 > 详细

keepalived

时间:2018-09-06 02:39:14      阅读:156      评论:0      收藏:0      [点我收藏+]

标签:address   com   virt   connect   arp   mail   mct   ipaddress   vrrp   

[root@node2 ~]# yum install keepalived -y
[root@node1 ~]# yum install tcpdump
[root@node1 ~]# tcpdump -n -i ens33 ‘host 224.0.0.18‘
[root@node1 ~]# ip add li
[root@node1 ~]# systemctl start haproxy

[root@node1 keepalived]# tail -2000 /etc/keepalived/keepalived.conf
! Configuration File for keepalived

global_defs {
notification_email {
root@xkq.com
}
notification_email_from haproxy_ha@xkq.com
smtp_server 127.0.0.1
smtp_connect_timeout 30
router_id haproxy_ha
vrrp_skip_check_adv_addr
#vrrp_strict
vrrp_garp_interval 0
vrrp_gna_interval 0
}

vrrp_instance HAPROXY_HA {
state MASTER
interface ens33
virtual_router_id 51
priority 150
advert_int 1
authentication {
auth_type PASS
auth_pass 123456
}
virtual_ipaddress {
192.168.1.21
192.168.1.22
192.168.1.23
192.168.1.24
192.168.1.25
192.168.1.26
}
}
[root@node1 keepalived]#

[root@node2 keepalived]# tail -2000 /etc/keepalived/keepalived.conf
! Configuration File for keepalived

global_defs {
notification_email {
root@xkq.com
}
notification_email_from haproxy_ha@xkq.com
smtp_server 127.0.0.1
smtp_connect_timeout 30
router_id haproxy_ha
vrrp_skip_check_adv_addr
#vrrp_strict
vrrp_garp_interval 0
vrrp_gna_interval 0
}

vrrp_instance HAPROXY_HA {
state BACKUP
interface ens33
virtual_router_id 51
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 123456
}
virtual_ipaddress {
192.168.1.21
192.168.1.22
192.168.1.23
192.168.1.24
192.168.1.25
192.168.1.26
}
}
[root@node2 keepalived]#

keepalived

标签:address   com   virt   connect   arp   mail   mct   ipaddress   vrrp   

原文地址:http://blog.51cto.com/qqran/2170960

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!