13
unknown
unknown
beakerlib-1.29.3-2.fc38.noarch
unknown
2023-02-06 05:26:10 EST
2023-02-06 05:28:46 EST
Fedora release 38 (Rawhide)
ibm-z-505.lab.eng.rdu2.redhat.com
unknown
0 x
5996 MB
38.08 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 26214405:27:28.252181 IP localhost.33848 > localhost.7811: Flags [S], seq 1105172232, win 65495, options [mss 65495,sackOK,TS val 4135922422 ecr 0,nop,wscale 7], length 005:27:28.252192 IP localhost.7811 > localhost.33848: Flags [S.], seq 471115436, ack 1105172233, win 65483, options [mss 65495,sackOK,TS val 4135922422 ecr 4135922422,nop,wscale 7], length 005:27:28.252201 IP localhost.33848 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135922422 ecr 4135922422], length 005:27:34.891962 IP localhost.7811 > localhost.33848: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135929062 ecr 4135922422], length 005:27:34.891989 IP localhost.33848 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135929062 ecr 4135922422], length 005:27:35.931978 IP localhost.7811 > localhost.33848: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135930102 ecr 4135922422], length 005:27:35.932006 IP localhost.33848 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135930102 ecr 4135922422], length 005:27:36.972119 IP localhost.7811 > localhost.33848: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135931142 ecr 4135922422], length 005:27:36.972144 IP localhost.33848 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135931142 ecr 4135922422], length 005:27:38.012542 IP localhost.7811 > localhost.33848: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135932182 ecr 4135922422], length 005:27:38.012570 IP localhost.33848 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135932182 ecr 4135922422], length 005:27:39.061922 IP localhost.7811 > localhost.33848: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135933232 ecr 4135922422], length 005:27:39.061941 IP localhost.33848 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135933232 ecr 4135922422], length 005:27:40.091913 IP localhost.7811 > localhost.33848: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135934262 ecr 4135922422], length 005:27:40.091932 IP localhost.33848 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135934262 ecr 4135922422], length 005:27:41.131933 IP localhost.7811 > localhost.33848: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135935302 ecr 4135922422], length 005:27:41.131960 IP localhost.33848 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135935302 ecr 4135922422], length 005:27:42.171961 IP localhost.7811 > localhost.33848: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135936342 ecr 4135922422], length 005:27:42.171986 IP localhost.33848 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135936342 ecr 4135922422], length 005:27:43.212053 IP localhost.7811 > localhost.33848: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135937382 ecr 4135922422], length 005:27:43.212081 IP localhost.33848 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135937382 ecr 4135922422], length 005:27:44.252361 IP localhost.7811 > localhost.33848: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135938422 ecr 4135922422], length 005:27:44.252386 IP localhost.33848 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135938422 ecr 4135922422], length 005:27:45.292649 IP localhost.7811 > localhost.33848: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 4135939462 ecr 4135922422], length 0dropped privs to tcpdump--------------- 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 tcpdump05:28:10.057576 IP localhost.57432 > localhost.7811: Flags [S], seq 2186208057, win 65495, options [mss 65495,sackOK,TS val 4135964227 ecr 0,nop,wscale 7], length 005:28:10.057588 IP localhost.7811 > localhost.57432: Flags [S.], seq 486856858, ack 2186208058, win 65483, options [mss 65495,sackOK,TS val 4135964227 ecr 4135964227,nop,wscale 7], length 005:28:10.057597 IP localhost.57432 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135964227 ecr 4135964227], length 005:28:16.492004 IP localhost.7811 > localhost.57432: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135970662 ecr 4135964227], length 005:28:16.492030 IP localhost.57432 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135970662 ecr 4135964227], length 005:28:17.531948 IP localhost.7811 > localhost.57432: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135971702 ecr 4135964227], length 005:28:17.531968 IP localhost.57432 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135971702 ecr 4135964227], length 005:28:18.571948 IP localhost.7811 > localhost.57432: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135972742 ecr 4135964227], length 005:28:18.571970 IP localhost.57432 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135972742 ecr 4135964227], length 005:28:19.611948 IP localhost.7811 > localhost.57432: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135973782 ecr 4135964227], length 005:28:19.611973 IP localhost.57432 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135973782 ecr 4135964227], length 005:28:20.652071 IP localhost.7811 > localhost.57432: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135974822 ecr 4135964227], length 005:28:20.652099 IP localhost.57432 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135974822 ecr 4135964227], length 005:28:21.692013 IP localhost.7811 > localhost.57432: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135975862 ecr 4135964227], length 005:28:21.692039 IP localhost.57432 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135975862 ecr 4135964227], length 005:28:22.731969 IP localhost.7811 > localhost.57432: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135976902 ecr 4135964227], length 005:28:22.731995 IP localhost.57432 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135976902 ecr 4135964227], length 005:28:23.771988 IP localhost.7811 > localhost.57432: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135977942 ecr 4135964227], length 005:28:23.772011 IP localhost.57432 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135977942 ecr 4135964227], length 005:28:24.811946 IP localhost.7811 > localhost.57432: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135978982 ecr 4135964227], length 005:28:24.811967 IP localhost.57432 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135978982 ecr 4135964227], length 005:28:25.858104 IP localhost.7811 > localhost.57432: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135980028 ecr 4135964227], length 005:28:25.858124 IP localhost.57432 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 4135980028 ecr 4135964227], length 005:28:26.892014 IP localhost.7811 > localhost.57432: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 4135981062 ecr 4135964227], length 0--------------- OUTPUT END ---------------PASSPASSPASSPASSPhases fingerprint: 3TFH3dbqAsserts fingerprint: cDYg/isO