27
unknown
unknown
beakerlib-1.29.1-1.fc37eng.noarch
unknown
2023-02-02 11:04:15 EST
2023-02-02 11:06:53 EST
Fedora release 38 (Rawhide)
kvm-04-guest30.hv2.lab.eng.bos.redhat.com
unknown
1 x Intel Xeon Processor (Skylake, IBRS)
7941 MB
45.77 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 tcpdump11:05:33.876952 IP localhost.46746 > localhost.7811: Flags [S], seq 587740643, win 65495, options [mss 65495,sackOK,TS val 3254373169 ecr 0,nop,wscale 7], length 011:05:33.876975 IP localhost.7811 > localhost.46746: Flags [S.], seq 237081909, ack 587740644, win 65483, options [mss 65495,sackOK,TS val 3254373169 ecr 3254373169,nop,wscale 7], length 011:05:33.876987 IP localhost.46746 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254373169 ecr 3254373169], length 011:05:39.903189 IP localhost.7811 > localhost.46746: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254379195 ecr 3254373169], length 011:05:39.903220 IP localhost.46746 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254379195 ecr 3254373169], length 011:05:40.927209 IP localhost.7811 > localhost.46746: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254380219 ecr 3254373169], length 011:05:40.927241 IP localhost.46746 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254380219 ecr 3254373169], length 011:05:41.951155 IP localhost.7811 > localhost.46746: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254381243 ecr 3254373169], length 011:05:41.951169 IP localhost.46746 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254381243 ecr 3254373169], length 011:05:42.975203 IP localhost.7811 > localhost.46746: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254382267 ecr 3254373169], length 011:05:42.975219 IP localhost.46746 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254382267 ecr 3254373169], length 011:05:43.999213 IP localhost.7811 > localhost.46746: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254383291 ecr 3254373169], length 011:05:43.999242 IP localhost.46746 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254383291 ecr 3254373169], length 011:05:45.023091 IP localhost.7811 > localhost.46746: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254384315 ecr 3254373169], length 011:05:45.023103 IP localhost.46746 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254384315 ecr 3254373169], length 011:05:46.047295 IP localhost.7811 > localhost.46746: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254385339 ecr 3254373169], length 011:05:46.047311 IP localhost.46746 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254385339 ecr 3254373169], length 011:05:47.071274 IP localhost.7811 > localhost.46746: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254386363 ecr 3254373169], length 011:05:47.071304 IP localhost.46746 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254386363 ecr 3254373169], length 011:05:48.095248 IP localhost.7811 > localhost.46746: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254387387 ecr 3254373169], length 011:05:48.095276 IP localhost.46746 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254387387 ecr 3254373169], length 011:05:49.119105 IP localhost.7811 > localhost.46746: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254388411 ecr 3254373169], length 011:05:49.119120 IP localhost.46746 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254388411 ecr 3254373169], length 011:05:50.143233 IP localhost.7811 > localhost.46746: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 3254389435 ecr 3254373169], 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 tcpdump11:06:16.157826 IP localhost.33186 > localhost.7811: Flags [S], seq 814847712, win 65495, options [mss 65495,sackOK,TS val 3254415450 ecr 0,nop,wscale 7], length 011:06:16.157846 IP localhost.7811 > localhost.33186: Flags [S.], seq 824335944, ack 814847713, win 65483, options [mss 65495,sackOK,TS val 3254415450 ecr 3254415450,nop,wscale 7], length 011:06:16.157857 IP localhost.33186 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254415450 ecr 3254415450], length 011:06:22.399181 IP localhost.7811 > localhost.33186: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254421691 ecr 3254415450], length 011:06:22.399212 IP localhost.33186 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254421691 ecr 3254415450], length 011:06:23.423162 IP localhost.7811 > localhost.33186: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254422715 ecr 3254415450], length 011:06:23.423193 IP localhost.33186 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254422715 ecr 3254415450], length 011:06:24.447233 IP localhost.7811 > localhost.33186: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254423739 ecr 3254415450], length 011:06:24.447264 IP localhost.33186 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254423739 ecr 3254415450], length 011:06:25.471265 IP localhost.7811 > localhost.33186: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254424763 ecr 3254415450], length 011:06:25.471297 IP localhost.33186 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254424763 ecr 3254415450], length 011:06:26.495250 IP localhost.7811 > localhost.33186: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254425787 ecr 3254415450], length 011:06:26.495281 IP localhost.33186 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254425787 ecr 3254415450], length 011:06:27.519231 IP localhost.7811 > localhost.33186: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254426811 ecr 3254415450], length 011:06:27.519263 IP localhost.33186 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254426811 ecr 3254415450], length 011:06:28.543284 IP localhost.7811 > localhost.33186: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254427835 ecr 3254415450], length 011:06:28.543316 IP localhost.33186 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254427835 ecr 3254415450], length 011:06:29.567317 IP localhost.7811 > localhost.33186: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254428859 ecr 3254415450], length 011:06:29.567351 IP localhost.33186 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254428859 ecr 3254415450], length 011:06:30.591283 IP localhost.7811 > localhost.33186: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254429883 ecr 3254415450], length 011:06:30.591317 IP localhost.33186 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254429883 ecr 3254415450], length 011:06:31.615298 IP localhost.7811 > localhost.33186: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254430907 ecr 3254415450], length 011:06:31.615332 IP localhost.33186 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 3254430907 ecr 3254415450], length 011:06:32.639354 IP localhost.7811 > localhost.33186: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 3254431931 ecr 3254415450], length 0--------------- OUTPUT END ---------------PASSPASSPASSPASSPhases fingerprint: Ng+KW2QYAsserts fingerprint: RM24F6lw