1834804 Members
2199 Online
110070 Solutions
New Discussion

telnet data loss

 
SOLVED
Go to solution
Steve H_1
New Member

telnet data loss

Hi,

I have a problem on my HP-UX10.20 platform. When a user pastes a 'largish' block of data into a telnet session only a small portion is being received.

I used the following test harness to diagnose the problem:

/tmp/read.sh

#!/bin/ksh
trap "stty echo" 1 0
stty -echo
while true
do
read line
echo "$line"
done

Test Data

0...:....|....:....|....:....|....:....|....:....|....:....|....:....|....:....
|
1...:....|....:....|....:....|....:....|....:....|....:....|....:....|....:....
|
2...:....|....:....|....:....|....:....|....:....|....:....|....:....|....:....
|
3...:....|....:....|....:....|....:....|....:....|....:....|....:....|....:....
|
4...:....|....:....|....:....|....:....|....:....|....:....|....:....|....:....
|
5...:....|....:....|....:....|....:....|....:....|....:....|....:....|....:....
|
6...:....|....:....|....:....|....:....|....:....|....:....|....:....|....:....
|
7...:....|....:....|....:....|....:....|....:....|....:....|....:....|....:....
|
8...:....|....:....|....:....|....:....|....:....|....:....|....:....|....:....
|
9...:....|....:....|....:....|....:....|....:....|....:....|....:....|....:....
|
10...:....|....:....|....:....|....:....|....:....|....:....|....:....|....:....
|

To reproduce, I ran the read.sh script, then pasted 8 of the test data lines to
the server. All 8 were displayed correctly. When I try with 10 lines of test data, only the last 28 chars(or 29 or 30 depending on what CRLF's are being sent) are received.

However, this test works fine on my HP-UX11 & AIX platforms so I was wondering if it is a patch problem with 10.20.

I have made sure any telnet patches that looked suitable are installed PHNE_13413, PHNE_24821, PHNE_24822, PHNE_21872 but I still have the problem.

Any help pointing me in the right direction to resolve this would be much appreciated.

Regards Steve.
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: telnet data loss

I've never seen this problem on 10.20. I suspect what you really have is a speed/duplex mismatch between the UNIX box and its corresponding switch port. Surprisingly, typical telnet applications will work just well enough with a duplex mismatch to seem normal until hi i/o rates occur. Check the settings on BOTH ends and make certain that they are hard set. Next, try some ftp transfers of 10MB files or so and make sure than the transfer rates in both directions are reasonable (~ 50% or so of theoretical maximum).
If it ain't broke, I can fix that.
Steven E. Protter
Exalted Contributor

Re: telnet data loss

This could also be a problem with the telnet client or the clipboard on the windows client.

Investigate A. Clay's idea first, I think its a better one. If nothing is found, try a different telnet client or a pc with a different os.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steve H_1
New Member

Re: telnet data loss

Thanks for the replies,

I will investigate for any speed/duplexing issues.

I should have put in my original post that the problem exhibits itself on 3 different telnet clients which is what made me think it's more server based(telnetd)than client side.

Just as an aside, I printed off the telnet conversations between RGTERM and the HPUX 10.20 (which exhibits the problem) and 11.00 (which works ok):

HP-UX 10.20 Telnet Negotiation

<-- IAC DO ENVIRONMENT
--> IAC WONT ENVIRONMENT
<-- IAC DO TERMINAL-TYPE
--> IAC WILL TERMINAL-TYPE
<-- IAC SB TERMINAL-TYPE ARG:1
--> IAC SB TTY-TYPE 0 MENTERM IAC SE
<-- IAC SE
<-- IAC DO TERMINAL-SPEED
--> IAC WILL TERMINAL-SPEED
<-- IAC SB TERMINAL-SPEED ARG:1
--> IAC SB TERMINAL-SPEED 0 19200,19200 IAC SE
<-- IAC SE
<-- IAC WILL ECHO
--> IAC DO ECHO
<-- IAC WILL SUPPRESS-GO-AHEAD
--> IAC DO SUPPRESS-GO-AHEAD
<-- IAC DO NAWS
--> IAC WILL NAWS
--> IAC SB NAWS 80 50 IAC SE
<-- IAC DO FLOW-CONTROL
--> IAC WONT FLOW-CONTROL
<-- IAC DO ECHO
--> IAC WONT ECHO

HP-UX 11.00 Telnet Negotiation

<-- IAC DO ENVIRONMENT
--> IAC WONT ENVIRONMENT
<-- IAC DO TERMINAL-TYPE
--> IAC WILL TERMINAL-TYPE
<-- IAC SB TERMINAL-TYPE ARG:1
--> IAC SB TTY-TYPE 0 MENTERM IAC SE
<-- IAC SE
<-- IAC DO TERMINAL-SPEED
--> IAC WILL TERMINAL-SPEED
<-- IAC SB TERMINAL-SPEED ARG:1
--> IAC SB TERMINAL-SPEED 0 19200,19200 IAC SE
<-- IAC SE
<-- IAC WILL ECHO
--> IAC DO ECHO
<-- IAC WILL SUPPRESS-GO-AHEAD
--> IAC DO SUPPRESS-GO-AHEAD
<-- IAC DO NAWS
--> IAC WILL NAWS
--> IAC SB NAWS 80 50 IAC SE
<-- IAC DO FLOW-CONTROL
--> IAC WONT FLOW-CONTROL
<-- IAC DO ECHO
--> IAC WONT ECHO

Both chats seem identical.

An interesting problem :)

Regards Steve
Sridhar Bhaskarla
Honored Contributor
Solution

Re: telnet data loss

Hi Steve,

What does your 'stty -a" print?.

Make sure your ixon and ixoff are set.

$stty ixon
$stty ixoff

and try.

ixoff and ixon control the input/output queues of the terminal.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Steve H_1
New Member

Re: telnet data loss

Thanks Sridhar that sorted it.

I completely overlooked the stty settings and on our 10.20 platform ixon was being set but not ixoff.

I set ixoff and all data copies and pastes perfectly.

Thanks to all who replied.

Regards Steve.