Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
en:dpi:opt_cgnat:faq:cgnat_faq_3 [2023/08/28 14:08] – ↷ Page moved from en:dpi:opt_cgnat:cgnat_faq:cgnat_faq_3 to en:dpi:opt_cgnat:faq:cgnat_faq_3 elena.krasnobryzh | en:dpi:opt_cgnat:faq:cgnat_faq_3 [2023/08/28 14:18] (current) – removed elena.krasnobryzh | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Idle (inactive) SSH sessions began to get disconnected after enabling NAT ====== | ||
- | {{indexmenu_n> | ||
- | Indeed, the NAT session lifetime is limited, since the subscriber sessions number is a limited resource and a large number of idle (inactive) sessions in the pool reduces NAT performance and consequently the total performance. | ||
- | |||
- | NAT doesn' | ||
- | |||
- | Sessions lifetime in Stingray SG can be configured by followin settings | ||
- | < | ||
- | lifetime_flow=60 | ||
- | lifetime_flow_long=600 | ||
- | </ | ||
- | where lifetime_flow_long is a lifetime in seconds of inactive TCP-sessions, | ||
- | |||
- | <note warning> | ||
- | |||
- | Therefore, it is recommended to use tcp keep-alive mechanism when the long-running inactive connections take place, it means that the empty packet will be sent regularly within the session which indicates the session still active. | ||
- | |||
- | You can configure tcp keep-alive either application-wide on the server or client side, or operating system-wide at once. | ||
- | |||
- | **SSH server setting example** | ||
- | |||
- | < | ||
- | in / | ||
- | ServerAliveInterval 60 | ||
- | </ | ||
- | |||
- | **SSH clien-side setting example** | ||
- | |||
- | < | ||
- | in ~/ | ||
- | Host * | ||
- | ServerAliveInterval 60 | ||
- | </ | ||
- | |||
- | < | ||
- | or using terminal | ||
- | ssh -o TCPKeepAlive=yes -o ServerAliveInterval=60 user@example.com | ||
- | </ | ||
- | |||
- | **System-wide setting example for the CentOS** | ||
- | < | ||
- | in / | ||
- | net.ipv4.tcp_keepalive_time = 600 | ||
- | net.ipv4.tcp_keepalive_intvl = 60 | ||
- | net.ipv4.tcp_keepalive_probes = 20 | ||
- | </ | ||
- | |||
- | |||