- 论坛徽章:
- 0
|
配置完lvs+keepalived后。用ipvsadm就只能看到连上第一个realserver。把keepalived.conf里的第一个realserver改成哪个Ip就只能连上那个。
有人知道是啥原因不啊???
[root@LVS_master keepalived]# cat keepalived.conf
! Configuration File for keepalived
global_defs {
router_id LVS_laser
}
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 51
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.11.107
}
}
virtual_server 192.168.11.107 80 {
delay_loop 6
lb_algo wrr
lb_kind DR
persistence_timeout 50
protocol TCP
real_server 192.168.11.102 80 {
weight 100
TCP_CHECK{
connect_timeout 10
nb_get_retry 3
delay_before_retry 3
connect_port 80
}
}
real_server 192.168.11.103 80 {
weight 100
TCP_CHECK{
connect_timeout 10
nb_get_retry 3
delay_before_retry 3
connect_port 80
}
}
}
[root@LVS_master keepalived]# ipvsadm -ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddressort Scheduler Flags
-> RemoteAddressort Forward Weight ActiveConn InActConn
TCP 192.168.11.107:80 wrr persistent 50
-> 192.168.11.102:80 Route 100 0 0
可以看到只连上了102,103却没有连上。
这是为什么呢? |
|