22
unknown
unknown
beakerlib-1.29.3-2.fc38.noarch
unknown
2023-01-31 16:41:42 EST
2023-01-31 16:44:30 EST
Fedora release 38 (Rawhide)
ibm-p9z-27-lp16.ibm2.lab.eng.bos.redhat.com
unknown
0 x
8067 MB
39.86 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 tcpdump16:43:08.713854 IP localhost.47658 > localhost.7811: Flags [S], seq 1937114598, win 65495, options [mss 65495,sackOK,TS val 3716531220 ecr 0,nop,wscale 7], length 016:43:08.713875 IP localhost.7811 > localhost.47658: Flags [S.], seq 3277774018, ack 1937114599, win 65483, options [mss 65495,sackOK,TS val 3716531220 ecr 3716531220,nop,wscale 7], length 016:43:08.713892 IP localhost.47658 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716531220 ecr 3716531220], length 016:43:15.200070 IP localhost.7811 > localhost.47658: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716537707 ecr 3716531220], length 016:43:15.200136 IP localhost.47658 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716537707 ecr 3716531220], length 016:43:16.240082 IP localhost.7811 > localhost.47658: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716538747 ecr 3716531220], length 016:43:16.240144 IP localhost.47658 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716538747 ecr 3716531220], length 016:43:17.280121 IP localhost.7811 > localhost.47658: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716539787 ecr 3716531220], length 016:43:17.280238 IP localhost.47658 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716539787 ecr 3716531220], length 016:43:18.320039 IP localhost.7811 > localhost.47658: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716540827 ecr 3716531220], length 016:43:18.320051 IP localhost.47658 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716540827 ecr 3716531220], length 016:43:19.360042 IP localhost.7811 > localhost.47658: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716541867 ecr 3716531220], length 016:43:19.360054 IP localhost.47658 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716541867 ecr 3716531220], length 016:43:20.400080 IP localhost.7811 > localhost.47658: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716542907 ecr 3716531220], length 016:43:20.400145 IP localhost.47658 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716542907 ecr 3716531220], length 016:43:21.440079 IP localhost.7811 > localhost.47658: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716543947 ecr 3716531220], length 016:43:21.440144 IP localhost.47658 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716543947 ecr 3716531220], length 016:43:22.480084 IP localhost.7811 > localhost.47658: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716544987 ecr 3716531220], length 016:43:22.480148 IP localhost.47658 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716544987 ecr 3716531220], length 016:43:23.520081 IP localhost.7811 > localhost.47658: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716546027 ecr 3716531220], length 016:43:23.520149 IP localhost.47658 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716546027 ecr 3716531220], length 016:43:24.560091 IP localhost.7811 > localhost.47658: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716547067 ecr 3716531220], length 016:43:24.560155 IP localhost.47658 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716547067 ecr 3716531220], length 016:43:25.600032 IP localhost.7811 > localhost.47658: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 3716548107 ecr 3716531220], 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 tcpdump16:43:51.519378 IP localhost.46618 > localhost.7811: Flags [S], seq 1557312551, win 65495, options [mss 65495,sackOK,TS val 3716574026 ecr 0,nop,wscale 7], length 016:43:51.519405 IP localhost.7811 > localhost.46618: Flags [S.], seq 1459106750, ack 1557312552, win 65483, options [mss 65495,sackOK,TS val 3716574026 ecr 3716574026,nop,wscale 7], length 016:43:51.519429 IP localhost.46618 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716574026 ecr 3716574026], length 016:43:58.080048 IP localhost.7811 > localhost.46618: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716580587 ecr 3716574026], length 016:43:58.080062 IP localhost.46618 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716580587 ecr 3716574026], length 016:43:59.120041 IP localhost.7811 > localhost.46618: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716581627 ecr 3716574026], length 016:43:59.120052 IP localhost.46618 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716581627 ecr 3716574026], length 016:44:00.160085 IP localhost.7811 > localhost.46618: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716582667 ecr 3716574026], length 016:44:00.160145 IP localhost.46618 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716582667 ecr 3716574026], length 016:44:01.200080 IP localhost.7811 > localhost.46618: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716583707 ecr 3716574026], length 016:44:01.200139 IP localhost.46618 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716583707 ecr 3716574026], length 016:44:02.240029 IP localhost.7811 > localhost.46618: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716584747 ecr 3716574026], length 016:44:02.240071 IP localhost.46618 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716584747 ecr 3716574026], length 016:44:03.280098 IP localhost.7811 > localhost.46618: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716585787 ecr 3716574026], length 016:44:03.280162 IP localhost.46618 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716585787 ecr 3716574026], length 016:44:04.320016 IP localhost.7811 > localhost.46618: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716586827 ecr 3716574026], length 016:44:04.320025 IP localhost.46618 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716586827 ecr 3716574026], length 016:44:05.360069 IP localhost.7811 > localhost.46618: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716587867 ecr 3716574026], length 016:44:05.360130 IP localhost.46618 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716587867 ecr 3716574026], length 016:44:06.400077 IP localhost.7811 > localhost.46618: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716588907 ecr 3716574026], length 016:44:06.400142 IP localhost.46618 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716588907 ecr 3716574026], length 016:44:07.440037 IP localhost.7811 > localhost.46618: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716589947 ecr 3716574026], length 016:44:07.440049 IP localhost.46618 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3716589947 ecr 3716574026], length 016:44:08.480108 IP localhost.7811 > localhost.46618: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 3716590987 ecr 3716574026], length 0--------------- OUTPUT END ---------------PASSPASSPASSPASSPhases fingerprint: 3TFH3dbqAsserts fingerprint: cDYg/isO