20
unknown
unknown
beakerlib-1.29.3-2.fc38.noarch
unknown
2023-02-05 23:21:50 EST
2023-02-05 23:24:26 EST
Fedora release 38 (Rawhide)
s390x-kvm-026.lab.eng.rdu2.redhat.com
unknown
0 x
8023 MB
119.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 26214423:23:08.261516 IP localhost.43262 > localhost.7811: Flags [S], seq 3321317187, win 65495, options [mss 65495,sackOK,TS val 2348896391 ecr 0,nop,wscale 7], length 023:23:08.261529 IP localhost.7811 > localhost.43262: Flags [S.], seq 3088353010, ack 3321317188, win 65483, options [mss 65495,sackOK,TS val 2348896391 ecr 2348896391,nop,wscale 7], length 023:23:08.261538 IP localhost.43262 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348896391 ecr 2348896391], length 023:23:14.305883 IP localhost.7811 > localhost.43262: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348902435 ecr 2348896391], length 023:23:14.305910 IP localhost.43262 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348902435 ecr 2348896391], length 023:23:15.345896 IP localhost.7811 > localhost.43262: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348903475 ecr 2348896391], length 023:23:15.345920 IP localhost.43262 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348903475 ecr 2348896391], length 023:23:16.386025 IP localhost.7811 > localhost.43262: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348904515 ecr 2348896391], length 023:23:16.386050 IP localhost.43262 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348904515 ecr 2348896391], length 023:23:17.425948 IP localhost.7811 > localhost.43262: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348905555 ecr 2348896391], length 023:23:17.425976 IP localhost.43262 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348905555 ecr 2348896391], length 023:23:18.465969 IP localhost.7811 > localhost.43262: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348906595 ecr 2348896391], length 023:23:18.465994 IP localhost.43262 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348906595 ecr 2348896391], length 023:23:19.505856 IP localhost.7811 > localhost.43262: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348907635 ecr 2348896391], length 023:23:19.505875 IP localhost.43262 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348907635 ecr 2348896391], length 023:23:20.545877 IP localhost.7811 > localhost.43262: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348908675 ecr 2348896391], length 023:23:20.545895 IP localhost.43262 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348908675 ecr 2348896391], length 023:23:21.585961 IP localhost.7811 > localhost.43262: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348909715 ecr 2348896391], length 023:23:21.585985 IP localhost.43262 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348909715 ecr 2348896391], length 023:23:22.625955 IP localhost.7811 > localhost.43262: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348910755 ecr 2348896391], length 023:23:22.625988 IP localhost.43262 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348910755 ecr 2348896391], length 023:23:23.665844 IP localhost.7811 > localhost.43262: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348911795 ecr 2348896391], length 023:23:23.665864 IP localhost.43262 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348911795 ecr 2348896391], length 023:23:24.705916 IP localhost.7811 > localhost.43262: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 2348912835 ecr 2348896391], length 0dropped privs to tcpdump--------------- OUTPUT END ---------------PASSPASSPASSPASSPASSPASSPASSPASSPASSOutput of 'tcpdump -r tcpdump.netns.pcap':--------------- OUTPUT START ---------------reading from file tcpdump.netns.pcap, link-type EN10MB (Ethernet), snapshot length 26214423:23:49.865462 IP localhost.58232 > localhost.7811: Flags [S], seq 3319518374, win 65495, options [mss 65495,sackOK,TS val 2348937995 ecr 0,nop,wscale 7], length 023:23:49.865477 IP localhost.7811 > localhost.58232: Flags [S.], seq 3066643845, ack 3319518375, win 65483, options [mss 65495,sackOK,TS val 2348937995 ecr 2348937995,nop,wscale 7], length 023:23:49.865487 IP localhost.58232 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348937995 ecr 2348937995], length 023:23:55.905873 IP localhost.7811 > localhost.58232: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348944035 ecr 2348937995], length 023:23:55.905900 IP localhost.58232 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348944035 ecr 2348937995], length 023:23:56.945871 IP localhost.7811 > localhost.58232: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348945075 ecr 2348937995], length 023:23:56.945898 IP localhost.58232 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348945075 ecr 2348937995], length 023:23:57.985897 IP localhost.7811 > localhost.58232: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348946115 ecr 2348937995], length 023:23:57.985917 IP localhost.58232 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348946115 ecr 2348937995], length 023:23:59.026065 IP localhost.7811 > localhost.58232: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348947155 ecr 2348937995], length 023:23:59.026087 IP localhost.58232 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348947155 ecr 2348937995], length 023:24:00.065856 IP localhost.7811 > localhost.58232: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348948195 ecr 2348937995], length 023:24:00.065882 IP localhost.58232 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348948195 ecr 2348937995], length 023:24:01.105983 IP localhost.7811 > localhost.58232: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348949235 ecr 2348937995], length 023:24:01.106001 IP localhost.58232 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348949235 ecr 2348937995], length 023:24:02.146016 IP localhost.7811 > localhost.58232: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348950275 ecr 2348937995], length 023:24:02.146040 IP localhost.58232 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348950275 ecr 2348937995], length 023:24:03.185974 IP localhost.7811 > localhost.58232: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348951315 ecr 2348937995], length 023:24:03.185998 IP localhost.58232 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348951315 ecr 2348937995], length 023:24:04.225840 IP localhost.7811 > localhost.58232: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348952355 ecr 2348937995], length 023:24:04.225858 IP localhost.58232 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348952355 ecr 2348937995], length 023:24:05.265892 IP localhost.7811 > localhost.58232: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348953395 ecr 2348937995], length 023:24:05.265916 IP localhost.58232 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 2348953395 ecr 2348937995], length 023:24:06.305950 IP localhost.7811 > localhost.58232: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 2348954435 ecr 2348937995], length 0dropped privs to tcpdump--------------- OUTPUT END ---------------PASSPASSPASSPASSPhases fingerprint: 3TFH3dbqAsserts fingerprint: cDYg/isO