24
unknown
unknown
beakerlib-1.29.3-2.fc38.noarch
unknown
2023-02-02 23:06:58 EST
2023-02-02 23:09:38 EST
Fedora release 38 (Rawhide)
kvm-03-guest08.hv2.lab.eng.bos.redhat.com
unknown
1 x Intel Xeon Processor (Skylake, IBRS)
3914 MB
49.87 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 tcpdump23:08:17.956907 IP localhost.43714 > localhost.7811: Flags [S], seq 2559545628, win 65495, options [mss 65495,sackOK,TS val 1619086336 ecr 0,nop,wscale 7], length 023:08:17.956918 IP localhost.7811 > localhost.43714: Flags [S.], seq 743096439, ack 2559545629, win 65483, options [mss 65495,sackOK,TS val 1619086336 ecr 1619086336,nop,wscale 7], length 023:08:17.956930 IP localhost.43714 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619086336 ecr 1619086336], length 023:08:24.428978 IP localhost.7811 > localhost.43714: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619092808 ecr 1619086336], length 023:08:24.429002 IP localhost.43714 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619092808 ecr 1619086336], length 023:08:25.452929 IP localhost.7811 > localhost.43714: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619093832 ecr 1619086336], length 023:08:25.452985 IP localhost.43714 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619093832 ecr 1619086336], length 023:08:26.476985 IP localhost.7811 > localhost.43714: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619094856 ecr 1619086336], length 023:08:26.477051 IP localhost.43714 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619094856 ecr 1619086336], length 023:08:27.500982 IP localhost.7811 > localhost.43714: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619095880 ecr 1619086336], length 023:08:27.501035 IP localhost.43714 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619095880 ecr 1619086336], length 023:08:28.524907 IP localhost.7811 > localhost.43714: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619096904 ecr 1619086336], length 023:08:28.524916 IP localhost.43714 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619096904 ecr 1619086336], length 023:08:29.549000 IP localhost.7811 > localhost.43714: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619097928 ecr 1619086336], length 023:08:29.549007 IP localhost.43714 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619097928 ecr 1619086336], length 023:08:30.572868 IP localhost.7811 > localhost.43714: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619098952 ecr 1619086336], length 023:08:30.572892 IP localhost.43714 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619098952 ecr 1619086336], length 023:08:31.596969 IP localhost.7811 > localhost.43714: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619099976 ecr 1619086336], length 023:08:31.596986 IP localhost.43714 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619099976 ecr 1619086336], length 023:08:32.620979 IP localhost.7811 > localhost.43714: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619101000 ecr 1619086336], length 023:08:32.621040 IP localhost.43714 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619101000 ecr 1619086336], length 023:08:33.644934 IP localhost.7811 > localhost.43714: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619102024 ecr 1619086336], length 023:08:33.644951 IP localhost.43714 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619102024 ecr 1619086336], length 023:08:34.668997 IP localhost.7811 > localhost.43714: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 1619103048 ecr 1619086336], 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 tcpdump23:09:00.262504 IP localhost.38022 > localhost.7811: Flags [S], seq 381513965, win 65495, options [mss 65495,sackOK,TS val 1619128642 ecr 0,nop,wscale 7], length 023:09:00.262515 IP localhost.7811 > localhost.38022: Flags [S.], seq 4159023178, ack 381513966, win 65483, options [mss 65495,sackOK,TS val 1619128642 ecr 1619128642,nop,wscale 7], length 023:09:00.262526 IP localhost.38022 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619128642 ecr 1619128642], length 023:09:06.413052 IP localhost.7811 > localhost.38022: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619134792 ecr 1619128642], length 023:09:06.413096 IP localhost.38022 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619134792 ecr 1619128642], length 023:09:07.437120 IP localhost.7811 > localhost.38022: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619135816 ecr 1619128642], length 023:09:07.437139 IP localhost.38022 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619135816 ecr 1619128642], length 023:09:08.461076 IP localhost.7811 > localhost.38022: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619136840 ecr 1619128642], length 023:09:08.461093 IP localhost.38022 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619136840 ecr 1619128642], length 023:09:09.485137 IP localhost.7811 > localhost.38022: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619137864 ecr 1619128642], length 023:09:09.485150 IP localhost.38022 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619137864 ecr 1619128642], length 023:09:10.508996 IP localhost.7811 > localhost.38022: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619138888 ecr 1619128642], length 023:09:10.509003 IP localhost.38022 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619138888 ecr 1619128642], length 023:09:11.532973 IP localhost.7811 > localhost.38022: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619139912 ecr 1619128642], length 023:09:11.532979 IP localhost.38022 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619139912 ecr 1619128642], length 023:09:12.557048 IP localhost.7811 > localhost.38022: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619140936 ecr 1619128642], length 023:09:12.557094 IP localhost.38022 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619140936 ecr 1619128642], length 023:09:13.581035 IP localhost.7811 > localhost.38022: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619141960 ecr 1619128642], length 023:09:13.581052 IP localhost.38022 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619141960 ecr 1619128642], length 023:09:14.605063 IP localhost.7811 > localhost.38022: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619142984 ecr 1619128642], length 023:09:14.605069 IP localhost.38022 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619142984 ecr 1619128642], length 023:09:15.629030 IP localhost.7811 > localhost.38022: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619144008 ecr 1619128642], length 023:09:15.629058 IP localhost.38022 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 1619144008 ecr 1619128642], length 023:09:16.653063 IP localhost.7811 > localhost.38022: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 1619145032 ecr 1619128642], length 0--------------- OUTPUT END ---------------PASSPASSPASSPASSPhases fingerprint: 3TFH3dbqAsserts fingerprint: cDYg/isO