-
-
Notifications
You must be signed in to change notification settings - Fork 764
vrrp master switchover lead to disconnection of tcp connections #2254
Copy link
Copy link
Open
Description
Describe the bug
On my network experiment,I runned keepalived on two nat device to implement high availability. when master changed to another,
a script will be executed to commit nat sessions to kernel.
The sequence of actions:
- set vip to new master network interface
- send gratuitous ARP
- execute script
The third step will take some time, it will lead to connection reset if client or server send packet before it's nat session not synced at this time.

Expected behavior
tcp connection not be resetted
Keepalived version
Keepalived v2.1.5 (07/13,2020)
Configuration file:
node1:
global_defs {
router_id 172.18.0.2
vrrp_skip_check_adv_addr
vrrp_garp_master_refresh 60
vrrp_garp_master_refresh_repeat 2
vrrp_garp_master_repeat 5
vrrp_garp_interval 0.001
}
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 51
unicast_src_ip 172.18.0.2
unicast_peer {
172.18.0.3
}
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
172.18.0.254
}
notify_master "/etc/conntrackd/primary-backup.sh primary"
notify_backup "/etc/conntrackd/primary-backup.sh backup"
notify_fault "/etc/conntrackd/primary-backup.sh fault"
}
node2:
global_defs {
router_id 172.18.0.3
vrrp_skip_check_adv_addr
vrrp_garp_master_refresh 60
vrrp_garp_master_refresh_repeat 2
vrrp_garp_master_repeat 5
vrrp_garp_interval 0.001
}
vrrp_instance VI_1 {
state MASTER
interface eth0
virtual_router_id 51
unicast_src_ip 172.18.0.3
unicast_peer {
172.18.0.2
}
priority 100
advert_int 1
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
172.18.0.254
}
notify_master "/etc/conntrackd/primary-backup.sh primary"
notify_backup "/etc/conntrackd/primary-backup.sh backup"
notify_fault "/etc/conntrackd/primary-backup.sh fault"
}
Notify and track scripts
https://github.com/vyos/conntrack-tools/blob/current/doc/sync/primary-backup.sh
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels