22
unknown
unknown
beakerlib-1.29.3-2.fc38.noarch
unknown
2023-02-05 18:25:00 EST
2023-02-05 18:27:48 EST
Fedora release 38 (Rawhide)
ibm-p9z-27-lp2.ibm2.lab.eng.bos.redhat.com
unknown
0 x
8067 MB
39.86 GB
Keep-Alive Process:
There are three configurable properties that determine how Keep-Alives work. On Linux they are1:
tcp_keepalive_time
default 7200 seconds
tcp_keepalive_probes
default 9
tcp_keepalive_intvl
default 75 seconds
TCP keepalive works like this:
Client opens TCP connection
If the connection is silent for tcp_keepalive_time seconds, send a single empty ACK packet.1
Did the server respond with a corresponding ACK of its own?
No
Wait tcp_keepalive_intvl seconds, then send another ACK
Repeat until the number of ACK probes that have been sent equals tcp_keepalive_probes.
If no response has been received at this point, send a RST and terminate the connection.
Yes: Return to step 2
This process is enabled by default on most operating systems, and thus dead TCP connections are regularly pruned once the other end has been responsive for 2 hours 11 minutes (7200 seconds + 75 * 9 seconds).
This test case:
Use socket options to overide the system's, and test keepalive process.
TCP_KEEPIDLE ----> tcp_keepalive_time
TCP_KEEPCNT ----> tcp_keepalive_probes
TCP_KEEPINTVL ----> tcp_keepalive_intvl
For namespace: Bug 1476667 - [RFE] Namespace tcp_keepalive_time sysctl knob
PASSPASSPASSPASSPASSPASSPASSPASSPASSPASSPASSPASSPASSPASSsocket settings of keepalive will overide the system'sPASSPASSPASSPASSPASSPASSPASSPASSPASSPASSPASSOutput of 'tcpdump -r tcpdump.host.pcap':--------------- OUTPUT START ---------------reading from file tcpdump.host.pcap, link-type EN10MB (Ethernet), snapshot length 262144dropped privs to tcpdump18:26:27.304011 IP localhost.44654 > localhost.7811: Flags [S], seq 2387959660, win 65495, options [mss 65495,sackOK,TS val 2322165420 ecr 0,nop,wscale 7], length 018:26:27.304030 IP localhost.7811 > localhost.44654: Flags [S.], seq 2288254603, ack 2387959661, win 65483, options [mss 65495,sackOK,TS val 2322165420 ecr 2322165420,nop,wscale 7], length 018:26:27.304044 IP localhost.44654 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322165420 ecr 2322165420], length 018:26:33.812609 IP localhost.7811 > localhost.44654: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322171929 ecr 2322165420], length 018:26:33.812621 IP localhost.44654 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322171929 ecr 2322165420], length 018:26:34.852696 IP localhost.7811 > localhost.44654: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322172969 ecr 2322165420], length 018:26:34.852710 IP localhost.44654 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322172969 ecr 2322165420], length 018:26:35.892659 IP localhost.7811 > localhost.44654: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322174009 ecr 2322165420], length 018:26:35.892722 IP localhost.44654 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322174009 ecr 2322165420], length 018:26:36.932609 IP localhost.7811 > localhost.44654: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322175049 ecr 2322165420], length 018:26:36.932622 IP localhost.44654 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322175049 ecr 2322165420], length 018:26:37.972608 IP localhost.7811 > localhost.44654: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322176089 ecr 2322165420], length 018:26:37.972620 IP localhost.44654 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322176089 ecr 2322165420], length 018:26:39.012610 IP localhost.7811 > localhost.44654: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322177129 ecr 2322165420], length 018:26:39.012622 IP localhost.44654 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322177129 ecr 2322165420], length 018:26:40.052611 IP localhost.7811 > localhost.44654: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322178169 ecr 2322165420], length 018:26:40.052628 IP localhost.44654 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322178169 ecr 2322165420], length 018:26:41.092604 IP localhost.7811 > localhost.44654: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322179209 ecr 2322165420], length 018:26:41.092616 IP localhost.44654 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322179209 ecr 2322165420], length 018:26:42.132632 IP localhost.7811 > localhost.44654: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322180249 ecr 2322165420], length 018:26:42.132714 IP localhost.44654 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322180249 ecr 2322165420], length 018:26:43.172616 IP localhost.7811 > localhost.44654: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322181289 ecr 2322165420], length 018:26:43.172628 IP localhost.44654 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322181289 ecr 2322165420], length 018:26:44.212608 IP localhost.7811 > localhost.44654: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 2322182329 ecr 2322165420], length 0--------------- OUTPUT END ---------------PASSPASSPASSPASSPASSPASSPASSPASSPASSOutput of 'tcpdump -r tcpdump.netns.pcap':--------------- OUTPUT START ---------------reading from file tcpdump.netns.pcap, link-type EN10MB (Ethernet), snapshot length 262144dropped privs to tcpdump18:27:10.229233 IP localhost.35468 > localhost.7811: Flags [S], seq 2460508607, win 65495, options [mss 65495,sackOK,TS val 2322208345 ecr 0,nop,wscale 7], length 018:27:10.229250 IP localhost.7811 > localhost.35468: Flags [S.], seq 2928259029, ack 2460508608, win 65483, options [mss 65495,sackOK,TS val 2322208345 ecr 2322208345,nop,wscale 7], length 018:27:10.229265 IP localhost.35468 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322208345 ecr 2322208345], length 018:27:16.692623 IP localhost.7811 > localhost.35468: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322214809 ecr 2322208345], length 018:27:16.692636 IP localhost.35468 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322214809 ecr 2322208345], length 018:27:17.732666 IP localhost.7811 > localhost.35468: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322215849 ecr 2322208345], length 018:27:17.732730 IP localhost.35468 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322215849 ecr 2322208345], length 018:27:18.772621 IP localhost.7811 > localhost.35468: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322216889 ecr 2322208345], length 018:27:18.772634 IP localhost.35468 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322216889 ecr 2322208345], length 018:27:19.812723 IP localhost.7811 > localhost.35468: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322217929 ecr 2322208345], length 018:27:19.812735 IP localhost.35468 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322217929 ecr 2322208345], length 018:27:20.852667 IP localhost.7811 > localhost.35468: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322218969 ecr 2322208345], length 018:27:20.852732 IP localhost.35468 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322218969 ecr 2322208345], length 018:27:21.892604 IP localhost.7811 > localhost.35468: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322220009 ecr 2322208345], length 018:27:21.892615 IP localhost.35468 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322220009 ecr 2322208345], length 018:27:22.932608 IP localhost.7811 > localhost.35468: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322221049 ecr 2322208345], length 018:27:22.932621 IP localhost.35468 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322221049 ecr 2322208345], length 018:27:23.972608 IP localhost.7811 > localhost.35468: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322222089 ecr 2322208345], length 018:27:23.972621 IP localhost.35468 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322222089 ecr 2322208345], length 018:27:25.012664 IP localhost.7811 > localhost.35468: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322223129 ecr 2322208345], length 018:27:25.012728 IP localhost.35468 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322223129 ecr 2322208345], length 018:27:26.052665 IP localhost.7811 > localhost.35468: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322224169 ecr 2322208345], length 018:27:26.052731 IP localhost.35468 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2322224169 ecr 2322208345], length 018:27:27.092668 IP localhost.7811 > localhost.35468: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 2322225209 ecr 2322208345], length 0--------------- OUTPUT END ---------------PASSPASSPASSPASSPhases fingerprint: 3TFH3dbqAsserts fingerprint: cDYg/isO