• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Keeping 5250 Alive

    June 11, 2008 Tom Van Looy

    Some time ago, we had problems with Client Access sessions being reset. It seemed that these connections were traveling over a VPN that got disconnected after being idle for a while. Because we were not in charge of the VPN, I used TCP keepalive as a workaround for this problem.

    Keepalive

    A TCP connection can set the SO_KEEPALIVE option with the setsockopts() system call. When the TCP connection is idle for a specified period of time, a keepalive packet will be sent to keep the connection open. (In practice, this keepalive packet is a request for acknowledgement of the previous packet.) Most programming languages provide a library routine to activate the keepalive option. For example, Java provides the setKeepAlive() method, which can be invoked after socket construction.

    There are three parameters that can be configured for keepalive messages. On a Windows machine, these are registry values in HKLMSYSTEMCurrentControlSetServicesTcpIpParameters. KeepAliveInterval (default 1 second), KeepAliveTime (default 2 hours) and TcpMaxDataRetransmission (default 5 seconds). On a Linux machine these are sysctl values in net.ipv4 (or procfs in /proc/sys/net/ipv4), tcp_keepalive_intvl (default 75s), tcp_keepalive_time (default 2h), and tcp_keepalive_probes (default 9).

    TCP keepalive messages are described in RFC1122. The RFC also points out some disadvantages of sending keepalive messages.

    5250 Keepalive

    It is possible to activate keepalive messages on the 5250 emulator. The startup file for a System i connection (.WS file) must be edited with a text editor. These files reside by default in C:Program FilesIBMClient AccessEmulatorPrivate. Below the [Telnet5250] option you add the option KeepAlive=Y. This is enough to activate keepalive messages on a 5250 session.

    The IBM Client Access suite delivers a command line tool, CWBCOPWR, that can configure some of the keepalive parameters. For example, to set KeepAliveTime to 10 seconds and KeepAliveInterval to 1 second, use the command “cwbcopwr/MKA:1,10”.

    Tom Van Looy started out his IT career as an ILE/RPG developer in 2005 and moved over to the position of i5/OS system engineer in 2007. He is currently employed by Lisis nv in Belgium. Although a Unix enthusiast, he also has great affinity with GNU/Linux and *BSD. Tom can be reached by email at tom@ctors.net.



                         Post this story to del.icio.us
                   Post this story to Digg
        Post this story to Slashdot

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    Raz-Lee Security

    Start your Road to Zero Trust!

    Firewall Network security, controlling Exit Points, Open DB’s and SSH. Rule Wizards and graphical BI.

    Request Demo

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    COMMON:  Join us at the Focus 2008 workshop conference, October 5 - 8, in San Francisco, California
    Profound Logic Software:  Web-enable in less than a day with Genie
    Vision Solutions:  System i Management Tips Blog - Free i5/OS Tips Each Week!

    IT Jungle Store Top Book Picks

    Easy Steps to Internet Programming for AS/400, iSeries, and System i: List Price, $49.95
    Getting Started with PHP for i5/OS: List Price, $59.95
    The System i RPG & RPG IV Tutorial and Lab Exercises: List Price, $59.95
    The System i Pocket RPG & RPG IV Guide: List Price, $69.95
    The iSeries Pocket Database Guide: List Price, $59.00
    The iSeries Pocket Developers' Guide: List Price, $59.00
    The iSeries Pocket SQL Guide: List Price, $59.00
    The iSeries Pocket Query Guide: List Price, $49.00
    The iSeries Pocket WebFacing Primer: List Price, $39.00
    Migrating to WebSphere Express for iSeries: List Price, $49.00
    iSeries Express Web Implementer's Guide: List Price, $59.00
    Getting Started with WebSphere Development Studio for iSeries: List Price, $79.95
    Getting Started With WebSphere Development Studio Client for iSeries: List Price, $89.00
    Getting Started with WebSphere Express for iSeries: List Price, $49.00
    WebFacing Application Design and Development Guide: List Price, $55.00
    Can the AS/400 Survive IBM?: List Price, $49.00
    The All-Everything Machine: List Price, $29.95
    Chip Wars: List Price, $29.95

    Zend Taps System i-PHP Guru, Pushes the i Platform Happy 20th Birthday, AS/400!

    Leave a Reply Cancel reply

Volume 8, Number 23 -- June 11, 2008
THIS ISSUE SPONSORED BY:

Help/Systems
Group8 Security
COMMON

Table of Contents

  • Creating an RPG-based Web Service Using WDSC, Part 1
  • SQL May Be Catching Up with DDS
  • Admin Alert: Redundancy is Good, Redundancy is Good, Re…
  • Keeping 5250 Alive
  • Seeking Advice on REXX
  • Admin Alert: All About the System i Attention Light

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Big Blue Raises IBM i License Transfer Fees, Other Prices
  • Keep The IBM i Youth Movement Going With More Training, Better Tools
  • Remain Begins Migrating DevOps Tools To VS Code
  • IBM Readies LTO-10 Tape Drives And Libraries
  • IBM i PTF Guide, Volume 27, Number 23
  • SEU’s Fate, An IBM i V8, And The Odds Of A Power13
  • Tandberg Bankruptcy Leaves A Hole In IBM Power Storage
  • RPG Code Generation And The Agentic Future Of IBM i
  • A Bunch Of IBM i-Power Systems Things To Be Aware Of
  • IBM i PTF Guide, Volume 27, Numbers 21 And 22

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle