29
unknown
unknown
beakerlib-1.29.2-2.el9.noarch
beakerlib-redhat-1-33.el9.noarch
unknown
2022-09-26 12:24:51 EDT
2022-09-26 12:27:39 EDT
CentOS Stream release 9
ibm-p9z-16-lp14.lab.eng.bos.redhat.com
ppc64le
0 x
15271 MB
91.90 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 tcpdump12:26:13.717902 IP localhost.53664 > localhost.7811: Flags [S], seq 1347423224, win 65495, options [mss 65495,sackOK,TS val 3974698426 ecr 0,nop,wscale 7], length 012:26:13.717920 IP localhost.7811 > localhost.53664: Flags [S.], seq 1942421867, ack 1347423225, win 65483, options [mss 65495,sackOK,TS val 3974698426 ecr 3974698426,nop,wscale 7], length 012:26:13.717934 IP localhost.53664 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974698426 ecr 3974698426], length 012:26:20.191155 IP localhost.7811 > localhost.53664: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974704900 ecr 3974698426], length 012:26:20.191168 IP localhost.53664 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974704900 ecr 3974698426], length 012:26:21.231142 IP localhost.7811 > localhost.53664: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974705940 ecr 3974698426], length 012:26:21.231153 IP localhost.53664 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974705940 ecr 3974698426], length 012:26:22.271151 IP localhost.7811 > localhost.53664: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974706980 ecr 3974698426], length 012:26:22.271163 IP localhost.53664 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974706980 ecr 3974698426], length 012:26:23.311146 IP localhost.7811 > localhost.53664: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974708020 ecr 3974698426], length 012:26:23.311158 IP localhost.53664 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974708020 ecr 3974698426], length 012:26:24.351140 IP localhost.7811 > localhost.53664: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974709060 ecr 3974698426], length 012:26:24.351153 IP localhost.53664 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974709060 ecr 3974698426], length 012:26:25.391146 IP localhost.7811 > localhost.53664: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974710100 ecr 3974698426], length 012:26:25.391153 IP localhost.53664 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974710100 ecr 3974698426], length 012:26:26.431159 IP localhost.7811 > localhost.53664: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974711140 ecr 3974698426], length 012:26:26.431172 IP localhost.53664 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974711140 ecr 3974698426], length 012:26:27.471141 IP localhost.7811 > localhost.53664: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974712180 ecr 3974698426], length 012:26:27.471152 IP localhost.53664 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974712180 ecr 3974698426], length 012:26:28.511146 IP localhost.7811 > localhost.53664: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974713220 ecr 3974698426], length 012:26:28.511158 IP localhost.53664 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974713220 ecr 3974698426], length 012:26:29.551150 IP localhost.7811 > localhost.53664: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974714260 ecr 3974698426], length 012:26:29.551161 IP localhost.53664 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974714260 ecr 3974698426], length 012:26:30.591147 IP localhost.7811 > localhost.53664: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 3974715300 ecr 3974698426], 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 tcpdump12:27:00.593662 IP localhost.41694 > localhost.7811: Flags [S], seq 898447662, win 65495, options [mss 65495,sackOK,TS val 3974745302 ecr 0,nop,wscale 7], length 012:27:00.593679 IP localhost.7811 > localhost.41694: Flags [S.], seq 1739926639, ack 898447663, win 65483, options [mss 65495,sackOK,TS val 3974745302 ecr 3974745302,nop,wscale 7], length 012:27:00.593693 IP localhost.41694 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974745302 ecr 3974745302], length 012:27:06.911145 IP localhost.7811 > localhost.41694: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974751620 ecr 3974745302], length 012:27:06.911159 IP localhost.41694 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974751620 ecr 3974745302], length 012:27:07.951147 IP localhost.7811 > localhost.41694: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974752660 ecr 3974745302], length 012:27:07.951160 IP localhost.41694 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974752660 ecr 3974745302], length 012:27:08.991164 IP localhost.7811 > localhost.41694: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974753700 ecr 3974745302], length 012:27:08.991177 IP localhost.41694 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974753700 ecr 3974745302], length 012:27:10.031164 IP localhost.7811 > localhost.41694: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974754740 ecr 3974745302], length 012:27:10.031176 IP localhost.41694 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974754740 ecr 3974745302], length 012:27:11.071138 IP localhost.7811 > localhost.41694: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974755780 ecr 3974745302], length 012:27:11.071149 IP localhost.41694 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974755780 ecr 3974745302], length 012:27:12.111142 IP localhost.7811 > localhost.41694: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974756820 ecr 3974745302], length 012:27:12.111153 IP localhost.41694 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974756820 ecr 3974745302], length 012:27:13.151155 IP localhost.7811 > localhost.41694: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974757860 ecr 3974745302], length 012:27:13.151164 IP localhost.41694 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974757860 ecr 3974745302], length 012:27:14.191147 IP localhost.7811 > localhost.41694: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974758900 ecr 3974745302], length 012:27:14.191160 IP localhost.41694 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974758900 ecr 3974745302], length 012:27:15.231160 IP localhost.7811 > localhost.41694: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974759940 ecr 3974745302], length 012:27:15.231172 IP localhost.41694 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974759940 ecr 3974745302], length 012:27:16.271143 IP localhost.7811 > localhost.41694: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974760980 ecr 3974745302], length 012:27:16.271156 IP localhost.41694 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3974760980 ecr 3974745302], length 012:27:17.311152 IP localhost.7811 > localhost.41694: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 3974762020 ecr 3974745302], length 0--------------- OUTPUT END ---------------PASSPASSPASSPASSPhases fingerprint: 3TFH3dbqAsserts fingerprint: cDYg/isO