24
unknown
unknown
beakerlib-1.29.3-1.fc38.noarch
unknown
2023-01-05 06:28:37 CET
2023-01-05 06:31:16 CET
Fedora release 38 (Rawhide)
kvm-02-guest05.rhts.eng.brq.redhat.com
unknown
1 x Intel Core Processor (Broadwell, IBRS)
3914 MB
118.94 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:29:56.600231 IP localhost.44642 > localhost.7811: Flags [S], seq 2859109329, win 65495, options [mss 65495,sackOK,TS val 3321697040 ecr 0,nop,wscale 7], length 006:29:56.600281 IP localhost.7811 > localhost.44642: Flags [S.], seq 2088614384, ack 2859109330, win 65483, options [mss 65495,sackOK,TS val 3321697040 ecr 3321697040,nop,wscale 7], length 006:29:56.600312 IP localhost.44642 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321697040 ecr 3321697040], length 006:30:02.657640 IP localhost.7811 > localhost.44642: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321703097 ecr 3321697040], length 006:30:02.657658 IP localhost.44642 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321703097 ecr 3321697040], length 006:30:03.681633 IP localhost.7811 > localhost.44642: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321704121 ecr 3321697040], length 006:30:03.681666 IP localhost.44642 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321704121 ecr 3321697040], length 006:30:04.705558 IP localhost.7811 > localhost.44642: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321705145 ecr 3321697040], length 006:30:04.705578 IP localhost.44642 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321705145 ecr 3321697040], length 006:30:05.729580 IP localhost.7811 > localhost.44642: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321706169 ecr 3321697040], length 006:30:05.729616 IP localhost.44642 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321706169 ecr 3321697040], length 006:30:06.753599 IP localhost.7811 > localhost.44642: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321707193 ecr 3321697040], length 006:30:06.753613 IP localhost.44642 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321707193 ecr 3321697040], length 006:30:07.777660 IP localhost.7811 > localhost.44642: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321708217 ecr 3321697040], length 006:30:07.777681 IP localhost.44642 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321708217 ecr 3321697040], length 006:30:08.801588 IP localhost.7811 > localhost.44642: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321709241 ecr 3321697040], length 006:30:08.801608 IP localhost.44642 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321709241 ecr 3321697040], length 006:30:09.825581 IP localhost.7811 > localhost.44642: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321710265 ecr 3321697040], length 006:30:09.825603 IP localhost.44642 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321710265 ecr 3321697040], length 006:30:10.849514 IP localhost.7811 > localhost.44642: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321711289 ecr 3321697040], length 006:30:10.849560 IP localhost.44642 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321711289 ecr 3321697040], length 006:30:11.873603 IP localhost.7811 > localhost.44642: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321712313 ecr 3321697040], length 006:30:11.873639 IP localhost.44642 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321712313 ecr 3321697040], length 006:30:12.897583 IP localhost.7811 > localhost.44642: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 3321713337 ecr 3321697040], 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:30:38.796628 IP localhost.59920 > localhost.7811: Flags [S], seq 3977754115, win 65495, options [mss 65495,sackOK,TS val 3321739236 ecr 0,nop,wscale 7], length 006:30:38.796655 IP localhost.7811 > localhost.59920: Flags [S.], seq 2660400072, ack 3977754116, win 65483, options [mss 65495,sackOK,TS val 3321739236 ecr 3321739236,nop,wscale 7], length 006:30:38.796674 IP localhost.59920 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321739236 ecr 3321739236], length 006:30:45.153574 IP localhost.7811 > localhost.59920: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321745593 ecr 3321739236], length 006:30:45.153630 IP localhost.59920 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321745593 ecr 3321739236], length 006:30:46.177599 IP localhost.7811 > localhost.59920: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321746617 ecr 3321739236], length 006:30:46.177619 IP localhost.59920 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321746617 ecr 3321739236], length 006:30:47.201592 IP localhost.7811 > localhost.59920: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321747641 ecr 3321739236], length 006:30:47.201612 IP localhost.59920 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321747641 ecr 3321739236], length 006:30:48.225623 IP localhost.7811 > localhost.59920: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321748665 ecr 3321739236], length 006:30:48.225660 IP localhost.59920 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321748665 ecr 3321739236], length 006:30:49.249547 IP localhost.7811 > localhost.59920: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321749689 ecr 3321739236], length 006:30:49.249565 IP localhost.59920 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321749689 ecr 3321739236], length 006:30:50.273566 IP localhost.7811 > localhost.59920: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321750713 ecr 3321739236], length 006:30:50.273586 IP localhost.59920 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321750713 ecr 3321739236], length 006:30:51.297523 IP localhost.7811 > localhost.59920: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321751737 ecr 3321739236], length 006:30:51.297584 IP localhost.59920 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321751737 ecr 3321739236], length 006:30:52.321614 IP localhost.7811 > localhost.59920: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321752761 ecr 3321739236], length 006:30:52.321659 IP localhost.59920 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321752761 ecr 3321739236], length 006:30:53.345653 IP localhost.7811 > localhost.59920: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321753785 ecr 3321739236], length 006:30:53.345673 IP localhost.59920 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321753785 ecr 3321739236], length 006:30:54.369565 IP localhost.7811 > localhost.59920: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321754809 ecr 3321739236], length 006:30:54.369583 IP localhost.59920 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3321754809 ecr 3321739236], length 006:30:55.393565 IP localhost.7811 > localhost.59920: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 3321755833 ecr 3321739236], length 0--------------- OUTPUT END ---------------PASSPASSPASSPASSPhases fingerprint: 3TFH3dbqAsserts fingerprint: cDYg/isO