19
unknown
unknown
beakerlib-1.29.2-1.fc38.noarch
unknown
2022-09-29 14:39:13 EDT
2022-09-29 14:41:50 EDT
Fedora release 38 (Rawhide)
ibm-z-503.lab.eng.rdu2.redhat.com
unknown
0 x
5997 MB
38.08 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 ---------------14:40:31.719189 IP localhost.36680 > localhost.7811: Flags [S], seq 3408531729, win 65495, options [mss 65495,sackOK,TS val 413355032 ecr 0,nop,wscale 7], length 014:40:31.719204 IP localhost.7811 > localhost.36680: Flags [S.], seq 1146957218, ack 3408531730, win 65483, options [mss 65495,sackOK,TS val 413355032 ecr 413355032,nop,wscale 7], length 014:40:31.719214 IP localhost.36680 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413355032 ecr 413355032], length 014:40:37.784409 IP localhost.7811 > localhost.36680: Flags [.], ack 1, win 512, options [nop,nop,TS val 413361097 ecr 413355032], length 014:40:37.784432 IP localhost.36680 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413361097 ecr 413355032], length 014:40:38.834375 IP localhost.7811 > localhost.36680: Flags [.], ack 1, win 512, options [nop,nop,TS val 413362147 ecr 413355032], length 014:40:38.834399 IP localhost.36680 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413362147 ecr 413355032], length 014:40:39.864501 IP localhost.7811 > localhost.36680: Flags [.], ack 1, win 512, options [nop,nop,TS val 413363177 ecr 413355032], length 014:40:39.864527 IP localhost.36680 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413363177 ecr 413355032], length 014:40:40.904379 IP localhost.7811 > localhost.36680: Flags [.], ack 1, win 512, options [nop,nop,TS val 413364217 ecr 413355032], length 014:40:40.904400 IP localhost.36680 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413364217 ecr 413355032], length 014:40:41.944972 IP localhost.7811 > localhost.36680: Flags [.], ack 1, win 512, options [nop,nop,TS val 413365258 ecr 413355032], length 014:40:41.944997 IP localhost.36680 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413365258 ecr 413355032], length 014:40:42.984401 IP localhost.7811 > localhost.36680: Flags [.], ack 1, win 512, options [nop,nop,TS val 413366297 ecr 413355032], length 014:40:42.984426 IP localhost.36680 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413366297 ecr 413355032], length 014:40:44.025559 IP localhost.7811 > localhost.36680: Flags [.], ack 1, win 512, options [nop,nop,TS val 413367338 ecr 413355032], length 014:40:44.025587 IP localhost.36680 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413367338 ecr 413355032], length 014:40:45.064403 IP localhost.7811 > localhost.36680: Flags [.], ack 1, win 512, options [nop,nop,TS val 413368377 ecr 413355032], length 014:40:45.064423 IP localhost.36680 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413368377 ecr 413355032], length 0reading from file tcpdump.host.pcap, link-type EN10MB (Ethernet), snapshot length 262144dropped privs to tcpdump14:40:46.104414 IP localhost.7811 > localhost.36680: Flags [.], ack 1, win 512, options [nop,nop,TS val 413369417 ecr 413355032], length 014:40:46.104438 IP localhost.36680 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413369417 ecr 413355032], length 014:40:47.144394 IP localhost.7811 > localhost.36680: Flags [.], ack 1, win 512, options [nop,nop,TS val 413370457 ecr 413355032], length 014:40:47.144421 IP localhost.36680 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413370457 ecr 413355032], length 014:40:48.184469 IP localhost.7811 > localhost.36680: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 413371497 ecr 413355032], 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 26214414:41:13.484374 IP localhost.41296 > localhost.7811: Flags [S], seq 284907393, win 65495, options [mss 65495,sackOK,TS val 413396797 ecr 0,nop,wscale 7], length 014:41:13.484385 IP localhost.7811 > localhost.41296: Flags [S.], seq 719956464, ack 284907394, win 65483, options [mss 65495,sackOK,TS val 413396797 ecr 413396797,nop,wscale 7], length 014:41:13.484394 IP localhost.41296 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413396797 ecr 413396797], length 014:41:20.029553 IP localhost.7811 > localhost.41296: Flags [.], ack 1, win 512, options [nop,nop,TS val 413403342 ecr 413396797], length 014:41:20.029578 IP localhost.41296 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413403342 ecr 413396797], length 014:41:21.067176 IP localhost.7811 > localhost.41296: Flags [.], ack 1, win 512, options [nop,nop,TS val 413404380 ecr 413396797], length 014:41:21.067195 IP localhost.41296 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413404380 ecr 413396797], length 014:41:22.104359 IP localhost.7811 > localhost.41296: Flags [.], ack 1, win 512, options [nop,nop,TS val 413405417 ecr 413396797], length 014:41:22.104380 IP localhost.41296 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413405417 ecr 413396797], length 014:41:23.144355 IP localhost.7811 > localhost.41296: Flags [.], ack 1, win 512, options [nop,nop,TS val 413406457 ecr 413396797], length 014:41:23.144379 IP localhost.41296 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413406457 ecr 413396797], length 0dropped privs to tcpdump14:41:24.184478 IP localhost.7811 > localhost.41296: Flags [.], ack 1, win 512, options [nop,nop,TS val 413407497 ecr 413396797], length 014:41:24.184500 IP localhost.41296 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413407497 ecr 413396797], length 014:41:25.224382 IP localhost.7811 > localhost.41296: Flags [.], ack 1, win 512, options [nop,nop,TS val 413408537 ecr 413396797], length 014:41:25.224405 IP localhost.41296 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413408537 ecr 413396797], length 014:41:26.264503 IP localhost.7811 > localhost.41296: Flags [.], ack 1, win 512, options [nop,nop,TS val 413409577 ecr 413396797], length 014:41:26.264526 IP localhost.41296 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413409577 ecr 413396797], length 014:41:27.304547 IP localhost.7811 > localhost.41296: Flags [.], ack 1, win 512, options [nop,nop,TS val 413410617 ecr 413396797], length 014:41:27.304572 IP localhost.41296 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413410617 ecr 413396797], length 014:41:28.354362 IP localhost.7811 > localhost.41296: Flags [.], ack 1, win 512, options [nop,nop,TS val 413411667 ecr 413396797], length 014:41:28.354385 IP localhost.41296 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413411667 ecr 413396797], length 014:41:29.384358 IP localhost.7811 > localhost.41296: Flags [.], ack 1, win 512, options [nop,nop,TS val 413412697 ecr 413396797], length 014:41:29.384377 IP localhost.41296 > localhost.7811: Flags [.], ack 1, win 512, options [nop,nop,TS val 413412697 ecr 413396797], length 014:41:30.424392 IP localhost.7811 > localhost.41296: Flags [R.], seq 1, ack 1, win 512, options [nop,nop,TS val 413413737 ecr 413396797], length 0--------------- OUTPUT END ---------------PASSPASSPASSPASSPhases fingerprint: 3TFH3dbqAsserts fingerprint: cDYg/isO