About This Document

The purpose of this document is to assist with configuring the 7318 and the 'cnsconnect' daemon for printers and modems. This document was designed for AIX System Administrators with a knowledge of AIX administration and the 7318. Using this document, configuring the 7318 and 'cnsconnect' takes about 20 minutes.

Using the reverse telnet function of the 7318, the 'cnsconnect' daemon can be used to provide a connection to a specific port on the 7318 and thereby access the device (printer or modem) attached to it. This document contains modules for the 7318 reverse telnet configuration and the 'cnsconnect' daemon configuration.

Document Scope

This document is designed to configure the 7318 and 'cnsconnect' only. This document does not cover the steps involved with adding a print queue or configuring modem applications like "ate" or "cu". Also, this document does not contain detailed explanations of the modules or steps used in the configuration methods.

Assumption And Terms

Before using this document, it is assumed that:

Terms Used in This Document:

Requirements

To use this document effectively, you must:

  1. Editing the 7318 configuration file

    In the 7318 configuration file, there are two sections that must be configured to enable reverse telnet (i.e. telnetting from the RS/6000 to a serial port on the 7318). The first is the "Port" stanza and its "Session" stanzas. The second section involves the "Telnetd" stanzas.

    1. Open the configuration file for the 7318 model S20 with your favorite editor. This file is typically in the /usr/lib/cns directory, and should be named after the 7318s Ethernet address.
    2. Find the "[PortXX]" stanza in the file for which you want to enable reverse telnet.

      Where XX refers to the port number 00 through 15.

    3. In the "[PortXX]" stanza, set 'mscreen' and 'tprint' to 0.

      Sample Stanza looks like the following:

       
          [Port00] 
          mscreen=0 
          tprint=0 
      
    4. If you are configuring this port for a modem, then uncomment the 'stty lin' in the "Port" stanza.

      Remove the ; sign on the 'stty' line in the "Port" stanza and add "hupcl clocal" to this line.

      Sample entry looks like the following:

       
          stty=9600 hupcl  clocal 
      
    5. In each of the "Session" stanzas for the port, change the application line from "command" or "dynamic" to "reserved".

      Sample Session Stanza [Session0] looks like the following:

       
          port=0 
          session=0 
          application=reserved 
          device=LDTCOM[Session1] 
          port=0 
          session=1 
          application=reserved 
          device=LDTCOM 
      

      Sample Session Stanza [Session2] looks like the following:

       
          port=0 
          session=2 
          application=reserved 
          device=LDTCOM 
      

      Sample Session Stanza [Session3] looks like the following:

       
          port=0 
          session=3 
          application=reserved 
          device=LDTCOM 
      
    6. If you are configuring this port for a printer then add an "stty=" line under the first session stanza for that port.

      The 'stty' line should read "stty=opost onlcr tab3".

      Sample Stanza [Session0] looks like the following:

       
          port=0 
          session=0 
          application=reserved 
          device=LDTCOM 
          stty=opost onlcr tab3 
      
    7. Find the "[Telnetd]" stanza in the file.
    8. Uncomment the "[Telnetd]" stanza if necessary.

      Set the "ntelnetds" line to the total number of ports you are configuring for reverse telnet. Make sure that both the "[Telnetd]" and "ntelnetds" lines are uncommented.

      Sample entry looks like the following:

       
          [Telnetd] 
          ntelnetds=1 
      
    9. Below the "[Telnetd]" stanza, find the numbered 'telnetd' stanza, "[Telnetd00]".

      For additional ports to be configured with reverse telnet, you will use additional [TelnetdXX] stanzas one for each physical port. (Where XX is incremented from 00 to 15 as more physical ports are configured for reverse telnet.)

    10. Uncomment the "[Telnetd00]", "device", "port", and "tcpPort" lines in the "[Telnetd00]" stanza.
    11. Set the port line to the physical serial port number that was configured above (i.e. 0 through 15).
    12. Set the "tcpPort=" line to a TCP Port number.

      This is the TCP port number to which this physical port will respond for telnet.

    13. Set the "device=" line to "COM".

      Sample Stanza [Telnetd00] looks like the following:

       
          device=COM 
          port=0 
          tcpPort=5101 
      
    14. Repeat steps 2 through 14 above for each additional port to be configured for reverse 'telnet' and 'cnsconnect'.
    15. Save any modifications and exit the 7318 configuration file.
  2. Editing the 'cnsconnect' Configuration file

    The 'cnsconnect' configuration file is used to specify how the 'cnsconnect' daemon will connect with the physical port on the 7318, and whether it will be used for a printer or modem.

    1. Open the /usr/lib/cns/cnsconnect.cnf file with your favorite editor.
    2. Go to the end of the file and add a new line.
    3. In the new line, specify the name of the special device file to be associated with the printer or modem on the 7318 (i.e. /dev/printer1 or /dev/modem1).
    4. Add some spaces after the device filename, and then specify the IP address of the 7318.
    5. Add some spaces after the IP address, and type the TCP port number that was specified in step 13 in the previous section.

      This is the TCP port number that was associated with the physical port number in the 7318 configuration file.

    6. Add some spaces after the TCP port number, and then type "bin" for a printer configuration or "hupcl" for a modem configuration.

      Sample entries look like the following:

       
          /dev/printer1   9.3.6.7         5101    bin        #For a printer 
          /dev/modem1  9.3.6.7         5102    hupcl    #For a modem 
      
  3. Reboot the 7318

    Now that we have made the necessary configuration changes, boot the 7318. The 7318 can be rebooted in two ways. Choose the most convenient method.

    1. Recycle the 7318's power by unplugging and re-plugging the power cord.
    2. Issue the 'load' command from the BIOS Console Session on the 7318.

      After approximately 20 seconds, the light sequence on the front of the 7318 should be either 1110 or 1101.If the sequence is (1 Flash 1 0) or (1 Flash 0 1), the 7318 has not completed the boot process successfully.

  4. Testing the port with a reverse telnet

    Once the 7318 has been rebooted, it should use the updated configuration file, and be ready for a reverse telnet to the configured port. To test the reverse telnet configuration follow the steps below.

    1. From the AIX shell prompt, type the command "tn 7318_ip_address tcp_port".

      Sample command and output look like the following:

       
          $ tn 9.3.6.7 5101 
          Connected to 9.3.6.7 
      

      If the 7318 port is configured correctly, you should receive the "Connected" message from telnet, and the connection should NOT drop automatically. If the connection stays established, you can drop the connection yourself by pressing Ctrl-T (control-T).

    2. Determine the next action.

      If the connection is never established, or is dropped immediately, inspect the 7318s internal log by typing "show log" at an s20 command prompt. (from a terminal attached to one of the 7318s serial ports).

      If the connection was successful, then proceed to the next section, Starting the 'cnsconnect' daemon.

  5. Starting the 'cnsconnect' daemon

    The 'cnsconnect' daemon associates a special device file with a reverse telnet connection. Applications can then reference this device file and utilize the telnet connection to access the printer or modem on the 7318 serial port.

    1. Once reverse telnet is working successfully and the cnsconnect.cnf file is configured, start the 'cnsconnect' daemon with the following:
       
          cnsconnect -c /usr/lib/cns/cnsconnect.cnf -l /tmp/cnsconn 
      
    2. Once 'cnsconnect' has started, execute:
       
          netstat -an | grep 7318_ip_address 
      

      There should be a connection listed in the ESTABLISHED state. Once this is the case, you can begin using the special device file (i.e. /dev/printer1 or /dev/modem1) with your application.

    3. You may also want to add the following line to the /etc/inittab file so that 'cnsconnect' is started automatically upon the RS/6000s reboot. Sample entry looks like the following:
       
          cnsconnect:2:wait:/usr/lib/cns/cnsconnect -c \ 
          /usr/lib/cns/cnsconnect.cnf > /dev/console 2>&1 
      

Configuring Cnsconnect for Printers and Modems: 7318.cnsconnect.32-41.com ITEM: FAX
Dated: 98/09/01~00:00 Category: com
This HTML file was generated 99/06/24~12:41:56
Comments or suggestions?
Contact us