20
unknown
unknown
beakerlib-1.29.3-2.fc38.noarch
unknown
2023-02-03 19:42:22 EST
2023-02-03 19:44:59 EST
Fedora release 38 (Rawhide)
s390x-kvm-023.lab.eng.rdu2.redhat.com
unknown
0 x
8020 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 262144dropped privs to tcpdump19:43:40.601917 IP localhost.56290 > localhost.7811: Flags [S], seq 1360879493, win 65495, options [mss 65495,sackOK,TS val 3698689605 ecr 0,nop,wscale 7], length 019:43:40.601930 IP localhost.7811 > localhost.56290: Flags [S.], seq 2687764433, ack 1360879494, win 65483, options [mss 65495,sackOK,TS val 3698689605 ecr 3698689605,nop,wscale 7], length 019:43:40.601939 IP localhost.56290 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698689605 ecr 3698689605], length 019:43:46.610961 IP localhost.7811 > localhost.56290: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698695614 ecr 3698689605], length 019:43:46.610993 IP localhost.56290 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698695614 ecr 3698689605], length 019:43:47.651038 IP localhost.7811 > localhost.56290: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698696654 ecr 3698689605], length 019:43:47.651073 IP localhost.56290 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698696654 ecr 3698689605], length 019:43:48.690958 IP localhost.7811 > localhost.56290: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698697694 ecr 3698689605], length 019:43:48.690988 IP localhost.56290 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698697694 ecr 3698689605], length 019:43:49.731045 IP localhost.7811 > localhost.56290: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698698734 ecr 3698689605], length 019:43:49.731064 IP localhost.56290 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698698734 ecr 3698689605], length 019:43:50.771014 IP localhost.7811 > localhost.56290: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698699774 ecr 3698689605], length 019:43:50.771039 IP localhost.56290 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698699774 ecr 3698689605], length 019:43:51.811026 IP localhost.7811 > localhost.56290: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698700814 ecr 3698689605], length 019:43:51.811045 IP localhost.56290 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698700814 ecr 3698689605], length 019:43:52.851005 IP localhost.7811 > localhost.56290: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698701854 ecr 3698689605], length 019:43:52.851026 IP localhost.56290 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698701854 ecr 3698689605], length 019:43:53.891023 IP localhost.7811 > localhost.56290: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698702894 ecr 3698689605], length 019:43:53.891049 IP localhost.56290 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698702894 ecr 3698689605], length 019:43:54.931076 IP localhost.7811 > localhost.56290: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698703934 ecr 3698689605], length 019:43:54.931102 IP localhost.56290 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698703934 ecr 3698689605], length 019:43:55.971032 IP localhost.7811 > localhost.56290: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698704974 ecr 3698689605], length 019:43:55.971057 IP localhost.56290 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698704974 ecr 3698689605], length 019:43:57.011091 IP localhost.7811 > localhost.56290: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 3698706014 ecr 3698689605], 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 26214419:44:22.222781 IP localhost.39324 > localhost.7811: Flags [S], seq 4099129648, win 65495, options [mss 65495,sackOK,TS val 3698731226 ecr 0,nop,wscale 7], length 019:44:22.222795 IP localhost.7811 > localhost.39324: Flags [S.], seq 4214910502, ack 4099129649, win 65483, options [mss 65495,sackOK,TS val 3698731226 ecr 3698731226,nop,wscale 7], length 019:44:22.222803 IP localhost.39324 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698731226 ecr 3698731226], length 019:44:28.851059 IP localhost.7811 > localhost.39324: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698737854 ecr 3698731226], length 019:44:28.851085 IP localhost.39324 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698737854 ecr 3698731226], length 019:44:29.891013 IP localhost.7811 > localhost.39324: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698738894 ecr 3698731226], length 019:44:29.891040 IP localhost.39324 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698738894 ecr 3698731226], length 019:44:30.931056 IP localhost.7811 > localhost.39324: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698739934 ecr 3698731226], length 019:44:30.931083 IP localhost.39324 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698739934 ecr 3698731226], length 019:44:31.971055 IP localhost.7811 > localhost.39324: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698740974 ecr 3698731226], length 019:44:31.971084 IP localhost.39324 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698740974 ecr 3698731226], length 019:44:33.011069 IP localhost.7811 > localhost.39324: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698742014 ecr 3698731226], length 019:44:33.011098 IP localhost.39324 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698742014 ecr 3698731226], length 019:44:34.051037 IP localhost.7811 > localhost.39324: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698743054 ecr 3698731226], length 019:44:34.051065 IP localhost.39324 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698743054 ecr 3698731226], length 019:44:35.091090 IP localhost.7811 > localhost.39324: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698744094 ecr 3698731226], length 019:44:35.091113 IP localhost.39324 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698744094 ecr 3698731226], length 019:44:36.131087 IP localhost.7811 > localhost.39324: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698745134 ecr 3698731226], length 019:44:36.131115 IP localhost.39324 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698745134 ecr 3698731226], length 019:44:37.171062 IP localhost.7811 > localhost.39324: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698746174 ecr 3698731226], length 019:44:37.171088 IP localhost.39324 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698746174 ecr 3698731226], length 019:44:38.211094 IP localhost.7811 > localhost.39324: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698747214 ecr 3698731226], length 019:44:38.211114 IP localhost.39324 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3698747214 ecr 3698731226], length 019:44:39.251060 IP localhost.7811 > localhost.39324: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 3698748254 ecr 3698731226], length 0dropped privs to tcpdump--------------- OUTPUT END ---------------PASSPASSPASSPASSPhases fingerprint: 3TFH3dbqAsserts fingerprint: cDYg/isO