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.
This document applies to AIX versions 3.2.5 through 4.x.
To use this document effectively, it is necessary to:
In the 7318 configuration file, there are two sections that must be configured to enable reverse telnet. For example, telnetting from the computer to a serial port on the 7318. The first is the Port stanza and its Session stanzas. The second section involves the Telnetd stanzas.
Where XX refers to the port number 00 through 15.
A sample stanza follows:
[Port00] mscreen=0 tprint=0
Remove the ";" (semicolon) sign on the stty line in the Port stanza and add hupcl clocal to this line.
A sample entry follows:
stty=9600 hupcl clocal
A sample Session stanza [Session0] follows:
port=0 session=0 application=reserved device=LDTCOM
A sample Session stanza [Session1] follows:
port=0 session=1 application=reserved device=LDTCOM
A sample Session stanza [Session2] follows:
port=0 session=2 application=reserved device=LDTCOM
A sample Session stanza [Session3] follows:
port=0 session=3 application=reserved device=LDTCOM
The stty line should read stty=opost onlcr tab3.
A sample Session stanza [Session0] follows:
port=0 session=0 application=reserved device=LDTCOM stty=opost onlcr tab3
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.
A sample entry follows:
[Telnetd] ntelnetds=1
For additional ports to be configured with reverse telnet, additional [TelnetdXX] stanzas should be used, one for each physical port. XX is incremented from 00 to 15 as more physical ports are configured for reverse telnet.
This is the TCP port number to which this physical port will respond for telnet.
A sample stanza [Telnetd00] follows:
device=COM port=0 tcpPort=5101
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.
This is the TCP port number that was associated with the physical port number in the 7318 configuration file.
Sample entries follow:
/dev/printer1 9.3.6.7 5101 bin #For a printer /dev/modem1 9.3.6.7 5102 hupcl #For a modem
Now that the necessary configuration changes have been made, boot the 7318. The 7318 can be rebooted in two ways. Choose the most convenient method.
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.
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.
Sample command and output follow:
$ 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).
If the connection is never established, or is dropped immediately, inspect the 7318's internal log by typing show log at an s20 command prompt (from a terminal attached to one of the 7318's serial ports). If this shows nothing, then there is probably a problem with the configuration of the modem or printer itself. Ensure that the modem or printer is configured and working correctly outside of cnsconnect.
If the connection was successful, then proceed to the next section, "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.
cnsconnect -c /usr/lib/cns/cnsconnect.cnf -l /tmp/cnsconn
netstat -an | grep 7318_ip_address
There should be a connection listed in the ESTABLISHED state. At this point, you can begin using the special device file (for example, /dev/printer1 or /dev/modem1) with your application.
cnsconnect:2:wait:/usr/lib/cns/cnsconnect -c \ /usr/lib/cns/cnsconnect.cnf > /dev/console 2>&1
[ Doc Ref: 90605199414596 Publish Date: Oct. 16, 2000 4FAX Ref: 7444 ]