14
unknown
unknown
beakerlib-1.29.2-1.fc38.noarch
unknown
2022-09-28 06:48:07 EDT
2022-09-28 06:50:46 EDT
Fedora release 38 (Rawhide)
koza-5.4a2m.lab.eng.bos.redhat.com
unknown
4 x Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
14987 MB
345.18 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 tcpdump06:49:27.353031 IP localhost.45946 > localhost.7811: Flags [S], seq 2966863236, win 65495, options [mss 65495,sackOK,TS val 3364546157 ecr 0,nop,wscale 7], length 006:49:27.353053 IP localhost.7811 > localhost.45946: Flags [S.], seq 2202511798, ack 2966863237, win 65483, options [mss 65495,sackOK,TS val 3364546157 ecr 3364546157,nop,wscale 7], length 006:49:27.353067 IP localhost.45946 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364546157 ecr 3364546157], length 006:49:33.576845 IP localhost.7811 > localhost.45946: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364552381 ecr 3364546157], length 006:49:33.576861 IP localhost.45946 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364552381 ecr 3364546157], length 006:49:34.600849 IP localhost.7811 > localhost.45946: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364553405 ecr 3364546157], length 006:49:34.600887 IP localhost.45946 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364553405 ecr 3364546157], length 006:49:35.624837 IP localhost.7811 > localhost.45946: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364554429 ecr 3364546157], length 006:49:35.624861 IP localhost.45946 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364554429 ecr 3364546157], length 006:49:36.648870 IP localhost.7811 > localhost.45946: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364555453 ecr 3364546157], length 006:49:36.648895 IP localhost.45946 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364555453 ecr 3364546157], length 006:49:37.672859 IP localhost.7811 > localhost.45946: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364556477 ecr 3364546157], length 006:49:37.672880 IP localhost.45946 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364556477 ecr 3364546157], length 006:49:38.696840 IP localhost.7811 > localhost.45946: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364557501 ecr 3364546157], length 006:49:38.696848 IP localhost.45946 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364557501 ecr 3364546157], length 006:49:39.720839 IP localhost.7811 > localhost.45946: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364558525 ecr 3364546157], length 006:49:39.720847 IP localhost.45946 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364558525 ecr 3364546157], length 006:49:40.744829 IP localhost.7811 > localhost.45946: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364559549 ecr 3364546157], length 006:49:40.744833 IP localhost.45946 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364559549 ecr 3364546157], length 006:49:41.768839 IP localhost.7811 > localhost.45946: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364560573 ecr 3364546157], length 006:49:41.768847 IP localhost.45946 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364560573 ecr 3364546157], length 006:49:42.792864 IP localhost.7811 > localhost.45946: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364561597 ecr 3364546157], length 006:49:42.792905 IP localhost.45946 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364561597 ecr 3364546157], length 006:49:43.816879 IP localhost.7811 > localhost.45946: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 3364562621 ecr 3364546157], 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 tcpdump06:50:09.328880 IP localhost.42956 > localhost.7811: Flags [S], seq 1623678140, win 65495, options [mss 65495,sackOK,TS val 3364588133 ecr 0,nop,wscale 7], length 006:50:09.328902 IP localhost.7811 > localhost.42956: Flags [S.], seq 1411817181, ack 1623678141, win 65483, options [mss 65495,sackOK,TS val 3364588133 ecr 3364588133,nop,wscale 7], length 006:50:09.328918 IP localhost.42956 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364588133 ecr 3364588133], length 006:50:15.560862 IP localhost.7811 > localhost.42956: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364594365 ecr 3364588133], length 006:50:15.560903 IP localhost.42956 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364594365 ecr 3364588133], length 006:50:16.584861 IP localhost.7811 > localhost.42956: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364595389 ecr 3364588133], length 006:50:16.584891 IP localhost.42956 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364595389 ecr 3364588133], length 006:50:17.608834 IP localhost.7811 > localhost.42956: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364596413 ecr 3364588133], length 006:50:17.608881 IP localhost.42956 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364596413 ecr 3364588133], length 006:50:18.632853 IP localhost.7811 > localhost.42956: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364597437 ecr 3364588133], length 006:50:18.632883 IP localhost.42956 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364597437 ecr 3364588133], length 006:50:19.656869 IP localhost.7811 > localhost.42956: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364598461 ecr 3364588133], length 006:50:19.656897 IP localhost.42956 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364598461 ecr 3364588133], length 006:50:20.680835 IP localhost.7811 > localhost.42956: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364599485 ecr 3364588133], length 006:50:20.680845 IP localhost.42956 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364599485 ecr 3364588133], length 006:50:21.704833 IP localhost.7811 > localhost.42956: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364600509 ecr 3364588133], length 006:50:21.704842 IP localhost.42956 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364600509 ecr 3364588133], length 006:50:22.728848 IP localhost.7811 > localhost.42956: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364601533 ecr 3364588133], length 006:50:22.728877 IP localhost.42956 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364601533 ecr 3364588133], length 006:50:23.752847 IP localhost.7811 > localhost.42956: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364602557 ecr 3364588133], length 006:50:23.752877 IP localhost.42956 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364602557 ecr 3364588133], length 006:50:24.776830 IP localhost.7811 > localhost.42956: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364603581 ecr 3364588133], length 006:50:24.776840 IP localhost.42956 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3364603581 ecr 3364588133], length 006:50:25.800883 IP localhost.7811 > localhost.42956: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 3364604605 ecr 3364588133], length 0--------------- OUTPUT END ---------------PASSPASSPASSPASSPhases fingerprint: 3TFH3dbqAsserts fingerprint: cDYg/isO