IBM i > TIPS & TECHNIQUES > APPLICATION DEVELOPMENT

A PPP Monitor Utility

Here's a program developed to programmatically obtain the status of a PPP connection

Here's a program developed to programmatically obtain the

System i systems have communication capabilities as robust and feature-rich as any computing system out there. We can communicate via TCP/IP and SNA, sockets or APPC, Ethernet or dial-up--a host of possibilities. Many of the communication scenarios we employ are TCP/IP based, whether over a private network or the Internet. Trading partners and financial institutions often accept VPN connections or SSH connections to transfer data, or require encrypted files they can then send over a public network such as the Internet.

Dial-up access is another method that's been around as long as there have been systems that needed to communicate. Though dial-up was once the only method of communication, its use has decreased with the advent of the Internet and private networks. However, some trading partners and financial institutions still require a dial-up connection. One of the most popular protocols for dial-up is Point-to-Point Protocol (PPP). Another, less popular protocol is Serial Line Internet Protocol (SLIP). Today, most System i dial-up connections that use TCP/IP applications use PPP.

I won't cover the configuration of PPP in this article--you can obtain good information about setup and configuration from IBM's Information Center. I'll explain the operation of a program I developed to programmatically obtain the status of a PPP connection.

Dial Blues

We get used to network communications. Whether across a WAN or a LAN, we're used to having the systems and resources available when we want them. We don't need to establish a connection to these servers and resources--we just access them (though we may need to login first).

Alas, not so with dial-up. It's just not as reliable as WAN or LAN communications. Also, note that I'm specifically not talking about ISDN or DSL, both of which require a form of dial-up. I'm talking specifically about PPP--the simple, widely used protocol to connect to a system. Modems and POTS (plain old telephone system) lines are involved. Ever have a dropped connection back in the days of dial-up service to AOL or Compuserve? The same issues apply here. Ever had static on a phone line, whether it was a modem connection or just a voice call? That's the unreliability I'm talking about. And I've been experiencing that unreliability lately in a mission-critical application. You know, one of those applications that's run for years without a hiccup, and all of a sudden we're receiving errors that are near-impossible to troubleshoot. Aging phone lines? Aging modems? Aging communication adapters? Aging programmers? Whatever the case, we've been receiving PPP communication errors too regularly. That's why I developed this program.

So, if a PPP connection is inherently unreliable, how do we manage it? First, let's review how a connection is established. We use the Start TCP/IP Point-to-Point (STRTCPPTP) command to establish a PPP connection. The System i platform dials a remote system negotiates with it to establish the PPP connection. These are the steps:

  • Establishing the connection--negotiate the session values;
  • Authentication--authenticating the two sides;
  • Network state--the specific Network Control Protocol is started;
  • Open state--actual data transfer;
  • Termination--ending the connection;
  • Idle state--no active connection.

Once the connection is open, we use a TCP/IP-based service such as FTP or Telnet. The potential problem is the PPP connection could fail at any point in the session-creation process.

Michael Ryan is a technical editor with IBM Systems Magazine. Michael can be reached at michael@ryantechnology.com.


comments powered by Disqus

Advertisement

Advertisement

2017 Solutions Edition

A Comprehensive Online Buyer's Guide to Solutions, Services and Education.

A PPP Monitor Utility

Here's a program developed to programmatically obtain the status of a PPP connection

IBM Systems Magazine Subscribe Box Read Now Link Subscribe Now Link iPad App Google Play Store
IBMi News Sign Up Today! Past News Letters