24
unknown
unknown
beakerlib-1.29.3-2.fc38.noarch
unknown
2023-02-05 20:06:17 EST
2023-02-05 20:09:07 EST
Fedora release 38 (Rawhide)
hp-moonshot-01-c09.ml3.eng.bos.redhat.com
unknown
8 x Intel(R) Atom(TM) CPU C2730 @ 1.70GHz
15972 MB
29.68 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 tcpdump20:07:44.055978 IP localhost.40982 > localhost.7811: Flags [S], seq 865565159, win 65495, options [mss 65495,sackOK,TS val 390253990 ecr 0,nop,wscale 7], length 020:07:44.056019 IP localhost.7811 > localhost.40982: Flags [S.], seq 360130492, ack 865565160, win 65483, options [mss 65495,sackOK,TS val 390253990 ecr 390253990,nop,wscale 7], length 020:07:44.056055 IP localhost.40982 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390253990 ecr 390253990], length 020:07:50.327727 IP localhost.7811 > localhost.40982: Flags [.], ack 1, win 512, options [nop,nop,TS val 390260262 ecr 390253990], length 020:07:50.327792 IP localhost.40982 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390260262 ecr 390253990], length 020:07:51.351724 IP localhost.7811 > localhost.40982: Flags [.], ack 1, win 512, options [nop,nop,TS val 390261286 ecr 390253990], length 020:07:51.351781 IP localhost.40982 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390261286 ecr 390253990], length 020:07:52.375652 IP localhost.7811 > localhost.40982: Flags [.], ack 1, win 512, options [nop,nop,TS val 390262310 ecr 390253990], length 020:07:52.375677 IP localhost.40982 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390262310 ecr 390253990], length 020:07:53.399689 IP localhost.7811 > localhost.40982: Flags [.], ack 1, win 512, options [nop,nop,TS val 390263334 ecr 390253990], length 020:07:53.399746 IP localhost.40982 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390263334 ecr 390253990], length 020:07:54.423680 IP localhost.7811 > localhost.40982: Flags [.], ack 1, win 512, options [nop,nop,TS val 390264358 ecr 390253990], length 020:07:54.423736 IP localhost.40982 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390264358 ecr 390253990], length 020:07:55.447699 IP localhost.7811 > localhost.40982: Flags [.], ack 1, win 512, options [nop,nop,TS val 390265382 ecr 390253990], length 020:07:55.447730 IP localhost.40982 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390265382 ecr 390253990], length 020:07:56.471634 IP localhost.7811 > localhost.40982: Flags [.], ack 1, win 512, options [nop,nop,TS val 390266406 ecr 390253990], length 020:07:56.471660 IP localhost.40982 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390266406 ecr 390253990], length 020:07:57.495644 IP localhost.7811 > localhost.40982: Flags [.], ack 1, win 512, options [nop,nop,TS val 390267430 ecr 390253990], length 020:07:57.495670 IP localhost.40982 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390267430 ecr 390253990], length 020:07:58.519654 IP localhost.7811 > localhost.40982: Flags [.], ack 1, win 512, options [nop,nop,TS val 390268454 ecr 390253990], length 020:07:58.519679 IP localhost.40982 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390268454 ecr 390253990], length 020:07:59.543675 IP localhost.7811 > localhost.40982: Flags [.], ack 1, win 512, options [nop,nop,TS val 390269478 ecr 390253990], length 020:07:59.543701 IP localhost.40982 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390269478 ecr 390253990], length 020:08:00.567688 IP localhost.7811 > localhost.40982: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 390270502 ecr 390253990], 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 tcpdump20:08:27.871019 IP localhost.34586 > localhost.7811: Flags [S], seq 3994310651, win 65495, options [mss 65495,sackOK,TS val 390297805 ecr 0,nop,wscale 7], length 020:08:27.871058 IP localhost.7811 > localhost.34586: Flags [S.], seq 1399454769, ack 3994310652, win 65483, options [mss 65495,sackOK,TS val 390297805 ecr 390297805,nop,wscale 7], length 020:08:27.871097 IP localhost.34586 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390297805 ecr 390297805], length 020:08:34.359711 IP localhost.7811 > localhost.34586: Flags [.], ack 1, win 512, options [nop,nop,TS val 390304294 ecr 390297805], length 020:08:34.359777 IP localhost.34586 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390304294 ecr 390297805], length 020:08:35.383651 IP localhost.7811 > localhost.34586: Flags [.], ack 1, win 512, options [nop,nop,TS val 390305318 ecr 390297805], length 020:08:35.383679 IP localhost.34586 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390305318 ecr 390297805], length 020:08:36.407683 IP localhost.7811 > localhost.34586: Flags [.], ack 1, win 512, options [nop,nop,TS val 390306342 ecr 390297805], length 020:08:36.407739 IP localhost.34586 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390306342 ecr 390297805], length 020:08:37.431682 IP localhost.7811 > localhost.34586: Flags [.], ack 1, win 512, options [nop,nop,TS val 390307366 ecr 390297805], length 020:08:37.431743 IP localhost.34586 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390307366 ecr 390297805], length 020:08:38.455678 IP localhost.7811 > localhost.34586: Flags [.], ack 1, win 512, options [nop,nop,TS val 390308390 ecr 390297805], length 020:08:38.455736 IP localhost.34586 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390308390 ecr 390297805], length 020:08:39.479693 IP localhost.7811 > localhost.34586: Flags [.], ack 1, win 512, options [nop,nop,TS val 390309414 ecr 390297805], length 020:08:39.479722 IP localhost.34586 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390309414 ecr 390297805], length 020:08:40.503695 IP localhost.7811 > localhost.34586: Flags [.], ack 1, win 512, options [nop,nop,TS val 390310438 ecr 390297805], length 020:08:40.503762 IP localhost.34586 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390310438 ecr 390297805], length 020:08:41.527657 IP localhost.7811 > localhost.34586: Flags [.], ack 1, win 512, options [nop,nop,TS val 390311462 ecr 390297805], length 020:08:41.527724 IP localhost.34586 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390311462 ecr 390297805], length 020:08:42.551663 IP localhost.7811 > localhost.34586: Flags [.], ack 1, win 512, options [nop,nop,TS val 390312486 ecr 390297805], length 020:08:42.551691 IP localhost.34586 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390312486 ecr 390297805], length 020:08:43.575652 IP localhost.7811 > localhost.34586: Flags [.], ack 1, win 512, options [nop,nop,TS val 390313510 ecr 390297805], length 020:08:43.575681 IP localhost.34586 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 390313510 ecr 390297805], length 020:08:44.599702 IP localhost.7811 > localhost.34586: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 390314534 ecr 390297805], length 0--------------- OUTPUT END ---------------PASSPASSPASSPASSPhases fingerprint: 3TFH3dbqAsserts fingerprint: cDYg/isO