宿主机和虚拟ip可以互ping。
浏览器中访问虚拟ip:6201失败,访问宿主机ip:6101成功。配置文件也没发现哪里有不对,但就是找不到问题根源?
keepalived.conf配置文件1:vrrp_instance VI_1 { state MASTER interface ens33 virtual_router_id 51 priority 100 advert_int 1 authentication { auth_type PASS auth_pass 123456 } virtual_ipaddress { 192.168.1.111 } } virtual_server 192.168.1.111 6201 { delay_loop 3 lb_algo rr lb_kind NAT persistence_timeout 50 protocol TCP real_server 192.168.99.102 6101 { weight 1 } }
keepalived.conf配置文件2:
vrrp_instance VI_1 {
state MASTER
interface ens33
virtual_router_id 51
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 123456
}
virtual_ipaddress {
192.168.1.111
}
}
virtual_server 192.168.1.111 6201 {
delay_loop 3
lb_algo rr
lb_kind NAT
persistence_timeout 50
protocol TCP
real_server 192.168.99.102 6102 {
weight 1
}
}