! Configuration File for keepalived
global_defs {
#notification_email {
# acassen
#}
#notification_email_from Alexandre.Cassen@firewall.loc
#smtp_server 192.168.200.1
#smtp_connect_timeout 30
router_id LVS_DEVEL
}
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 51
# nopreempt
priority 100
advert_int 5
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
211.147.***.**
}
}
virtual_server 192.168.1.200 80{
delay_loop 6
lb_algo rr
#lb_kind NAT
lb_kind DR
persistence_timeout 10
protocol TCP
#sorry_server 192.168.200.200 1358
real_server 127.0.0.1 80{
weight 1
TCP_CHECK {
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
connect_port 80
}
}
}
global_defs {
#notification_email {
# acassen
#}
#notification_email_from Alexandre.Cassen@firewall.loc
#smtp_server 192.168.200.1
#smtp_connect_timeout 30
router_id LVS_DEVEL
}
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 51
# nopreempt
priority 100
advert_int 5
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
211.147.***.**
}
}
virtual_server 192.168.1.200 80{
delay_loop 6
lb_algo rr
#lb_kind NAT
lb_kind DR
persistence_timeout 10
protocol TCP
#sorry_server 192.168.200.200 1358
real_server 127.0.0.1 80{
weight 1
TCP_CHECK {
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
connect_port 80
}
}
}
本文详细介绍了Keepalived的配置文件结构及各项参数含义。包括全局定义、实例配置、虚拟路由器设置、认证方式以及虚拟服务器定义等内容。适用于希望通过具体配置案例来深入理解Keepalived工作原理的读者。
596

被折叠的 条评论
为什么被折叠?



