19
unknown
unknown
beakerlib-1.29.2-1.fc38.noarch
beakerlib-redhat-1-33.fc37eng.noarch
unknown
2022-09-25 17:39:47 EDT
2022-09-25 17:43:07 EDT
Fedora release 38 (Rawhide)
hpe-ml310egen8-01.hpe2.lab.eng.bos.redhat.com
unknown
8 x Intel(R) Xeon(R) CPU E3-1280 V2 @ 3.60GHz
3007 MB
232.75 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 tcpdump17:41:24.164085 IP localhost.46902 > localhost.7811: Flags [S], seq 2220691066, win 65495, options [mss 65495,sackOK,TS val 903760885 ecr 0,nop,wscale 7], length 017:41:24.164330 IP localhost.7811 > localhost.46902: Flags [S.], seq 3850128569, ack 2220691067, win 65483, options [mss 65495,sackOK,TS val 903760886 ecr 903760885,nop,wscale 7], length 017:41:24.164599 IP localhost.46902 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903760886 ecr 903760886], length 017:41:30.215291 IP localhost.7811 > localhost.46902: Flags [.], ack 1, win 512, options [nop,nop,TS val 903766936 ecr 903760886], length 017:41:30.216021 IP localhost.46902 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903766937 ecr 903760886], length 017:41:31.238936 IP localhost.7811 > localhost.46902: Flags [.], ack 1, win 512, options [nop,nop,TS val 903767960 ecr 903760886], length 017:41:31.239155 IP localhost.46902 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903767960 ecr 903760886], length 017:41:32.262808 IP localhost.7811 > localhost.46902: Flags [.], ack 1, win 512, options [nop,nop,TS val 903768984 ecr 903760886], length 017:41:32.263024 IP localhost.46902 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903768984 ecr 903760886], length 017:41:33.286858 IP localhost.7811 > localhost.46902: Flags [.], ack 1, win 512, options [nop,nop,TS val 903770008 ecr 903760886], length 017:41:33.287075 IP localhost.46902 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903770008 ecr 903760886], length 017:41:34.310812 IP localhost.7811 > localhost.46902: Flags [.], ack 1, win 512, options [nop,nop,TS val 903771032 ecr 903760886], length 017:41:34.311025 IP localhost.46902 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903771032 ecr 903760886], length 017:41:35.334858 IP localhost.7811 > localhost.46902: Flags [.], ack 1, win 512, options [nop,nop,TS val 903772056 ecr 903760886], length 017:41:35.335102 IP localhost.46902 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903772056 ecr 903760886], length 017:41:36.358950 IP localhost.7811 > localhost.46902: Flags [.], ack 1, win 512, options [nop,nop,TS val 903773080 ecr 903760886], length 017:41:36.359387 IP localhost.46902 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903773080 ecr 903760886], length 017:41:37.383071 IP localhost.7811 > localhost.46902: Flags [.], ack 1, win 512, options [nop,nop,TS val 903774104 ecr 903760886], length 017:41:37.383316 IP localhost.46902 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903774105 ecr 903760886], length 017:41:38.406988 IP localhost.7811 > localhost.46902: Flags [.], ack 1, win 512, options [nop,nop,TS val 903775128 ecr 903760886], length 017:41:38.407269 IP localhost.46902 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903775129 ecr 903760886], length 017:41:39.430831 IP localhost.7811 > localhost.46902: Flags [.], ack 1, win 512, options [nop,nop,TS val 903776152 ecr 903760886], length 017:41:39.431077 IP localhost.46902 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903776152 ecr 903760886], length 017:41:40.454894 IP localhost.7811 > localhost.46902: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 903777176 ecr 903760886], 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 tcpdump17:42:16.216386 IP localhost.37402 > localhost.7811: Flags [S], seq 1660845649, win 65495, options [mss 65495,sackOK,TS val 903812938 ecr 0,nop,wscale 7], length 017:42:16.216646 IP localhost.7811 > localhost.37402: Flags [S.], seq 1001223527, ack 1660845650, win 65483, options [mss 65495,sackOK,TS val 903812938 ecr 903812938,nop,wscale 7], length 017:42:16.216843 IP localhost.37402 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903812938 ecr 903812938], length 017:42:22.438875 IP localhost.7811 > localhost.37402: Flags [.], ack 1, win 512, options [nop,nop,TS val 903819160 ecr 903812938], length 017:42:22.439179 IP localhost.37402 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903819160 ecr 903812938], length 017:42:23.462940 IP localhost.7811 > localhost.37402: Flags [.], ack 1, win 512, options [nop,nop,TS val 903820184 ecr 903812938], length 017:42:23.463146 IP localhost.37402 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903820184 ecr 903812938], length 017:42:24.486905 IP localhost.7811 > localhost.37402: Flags [.], ack 1, win 512, options [nop,nop,TS val 903821208 ecr 903812938], length 017:42:24.487107 IP localhost.37402 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903821208 ecr 903812938], length 017:42:25.510896 IP localhost.7811 > localhost.37402: Flags [.], ack 1, win 512, options [nop,nop,TS val 903822232 ecr 903812938], length 017:42:25.511097 IP localhost.37402 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903822232 ecr 903812938], length 017:42:26.534843 IP localhost.7811 > localhost.37402: Flags [.], ack 1, win 512, options [nop,nop,TS val 903823256 ecr 903812938], length 017:42:26.535109 IP localhost.37402 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903823256 ecr 903812938], length 017:42:27.558898 IP localhost.7811 > localhost.37402: Flags [.], ack 1, win 512, options [nop,nop,TS val 903824280 ecr 903812938], length 017:42:27.559099 IP localhost.37402 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903824280 ecr 903812938], length 017:42:28.582903 IP localhost.7811 > localhost.37402: Flags [.], ack 1, win 512, options [nop,nop,TS val 903825304 ecr 903812938], length 017:42:28.583169 IP localhost.37402 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903825304 ecr 903812938], length 017:42:29.606862 IP localhost.7811 > localhost.37402: Flags [.], ack 1, win 512, options [nop,nop,TS val 903826328 ecr 903812938], length 017:42:29.607159 IP localhost.37402 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903826328 ecr 903812938], length 017:42:30.630937 IP localhost.7811 > localhost.37402: Flags [.], ack 1, win 512, options [nop,nop,TS val 903827352 ecr 903812938], length 017:42:30.631170 IP localhost.37402 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903827352 ecr 903812938], length 017:42:31.654822 IP localhost.7811 > localhost.37402: Flags [.], ack 1, win 512, options [nop,nop,TS val 903828376 ecr 903812938], length 017:42:31.655087 IP localhost.37402 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 903828376 ecr 903812938], length 017:42:32.678871 IP localhost.7811 > localhost.37402: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 903829400 ecr 903812938], length 0--------------- OUTPUT END ---------------PASSPASSPASSPASSPhases fingerprint: 3TFH3dbqAsserts fingerprint: cDYg/isO