vrrp_instance VI_db {
state BACKUP
interface eth0
virtual_router_id 52
priority 90
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.141.202
}
}
virtual_server 192.168.141.202 3306 {
delay_loop 2
lb_algo wrr
lb_kind DR
persistence_timeout 10
protocol TCP
real_server 192.168.141.152 3306 {
weight 3
notify_down /etc/keepalived/keepalived_shutdown.sh
TCP_CHECK {
connect_timeout 10
nb_get_retry 3
delay_before_retry 3
connect_port 3306
}
}
}
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:50:56:3e:d6:7b brd ff:ff:ff:ff:ff:ff
inet 192.168.141.137/24 brd 192.168.141.255 scope global eth0
inet 192.168.141.201/32 scope global eth0
inet 192.168.141.202/32 scope global eth0
inet6 fe80::250:56ff:fe3e:d67b/64 scope link
valid_lft forever preferred_lft forever
ip正常,但其他服务器无法ping 192.168.141.201/202