View Full Version : TCP/IP Testing Round 3

September 7th, 2007, 07:54 AM
This is a little premature, but I'm dying to see how it goes.

My little TCP/IP test program is running again. You cat get to it by doing:

telnet 2023

The program is a small server that accepts up to 9 incoming connections. It is not a telnet server, so it is dependent upon your telnet client doing local echoing. Things like backspacing can hose it up, so just retype a command if it doesn't understand the command. Command parsing is a little crude too, so avoid extra spaces, chars, etc. (Upper/lower case does not matter.)

The interesting thing to do is to use the 'sockets' command to see who else is on, and the 'stats' command to see how my TCP/IP stack is holding up. There is also a crude message sending ability - you can send small messages to other users. And lastly, there is a 'sysop page' function for those of you who remember the BBS era.

This is running on a 386-40 at the moment, and I'm tracing everything that comes in or out just in case there is a bug I need to capture. It will be running for a few hours - give it a shot!

Background: I'm testing a new TCP/IP stack that I started working on in Nov 2005. It uses a packet driver directly to talk on the network. Everything from the packet driver on up (ARP, IP, UDP and TCP) was written from scratch. The development language is Turbo C++ 3.0 for DOS, and I use a 386-40 for development. The code will run well on an 8088 class machine.

I run a public test like this periodically to try to flush out subtle bugs. Having multiple people from multiple machines and OSes try to use the code concurrently is a very good test. So while the end product that you see is almost trivial, there is a lot of work to make it run.


September 8th, 2007, 07:32 AM
The test is still going:


Server started: Fri Sep 07 13:54:57 2007
Session start: Fri Sep 07 13:55:17 2007
Current time: Sat Sep 08 10:25:31 2007

Active sessions 1, Max Active sessions 7, Total Sessions: 50

Tcp Pkts Sent 3386 Rcvd 3433 Retrans 36 Seq/Ack errs 8 Dropped 0
Pkt stats: Incoming pkts: 4515 Dropped: 0 Sent: 3575

If you haven't given it a shot, it's really easy and it would help me test this code. You can telnet in from Windows, DOS, Unix, etc - it doesn't matter as long as it is ASCII.

telnet 2023

(That's my home Linux machine, which is serving as the firewall. Port 2023 will be forwarded directly to the 386-40 running the test.)

And here is a sample of what you can expect:


info - machine info
msg n - send msg to session n Example: msg 3 Hello
quit - disconnect
sockets - see active sockets
stats - server statistics
sysop - page sysop

There is no character echoing or line editing so be careful
typing. At worst you just have to try again.

Thanks again,

September 8th, 2007, 08:59 AM
Very nice and FAST!
I gave it a try today just before 1pm EDT.

I was session# 50 and sent a few messages to session #0 which I assume is the console.

Keep up the good work!

September 8th, 2007, 03:04 PM
works good.. i connected with a Haxintosh Pentium 4 3GHz Mac OS X system. (I didn't know the Darwin version of Telnet permitted differen't port numbers.. I know my PowerPC Mac wouldn't do this before, atleast I thought it didn't)

September 8th, 2007, 06:22 PM
Testing is done. I didn't get the activity that I was hoping for, but I think I got enough.


Terry Yager
September 8th, 2007, 10:17 PM
Let me know when you get that echo thing working in 2K, I'll try again.


September 9th, 2007, 01:31 AM
Is it still online? I can test from a 5150 :)

September 9th, 2007, 01:38 AM
Nope, he says earlier he had enough for now.

September 9th, 2007, 05:46 AM
A total of 57 connections were made.

Tcp packets sent: 4264
received 4316
retransmitted 36
Sequence/ACK errors: 8
Dropped packets: 0

Packet driver packets received: 5889
sent: 4480
Dropped: 0

Only two sessions got 'stuck' and that was probably due to the other side closing the connections without doing the final TCP/IP handshaking. I was able to force the connections closed, which is a big improvement over my code in Dec. (I didn't have that feature back then.)

In my normal testing I send 3MB files back and forth to a Linux machine. That generates as much traffic in 6 seconds as this 1.5 day test took. The idea of the test was to see what would happen when my application was juggling multiple connections at the same time from a wide variety of machines. I think at best I had 4 people connected simultaneously, so it wasn't as good as a stress test as I was hoping for.

I think for the next time around I'm going to add Telnet parameter negotiation so that I can control the echoing, provide line editing, and other screen control functions. I'm also going to improve the crude 'chat' feature. I don't want to replicate an IRC server, but several people chatting to each other is exactly the kind of stress testing I'm looking for.

They'd have to chat about vintage machines, of course. ;-0

September 9th, 2007, 08:08 AM
Perhaps if you set up a particular time and date you could get all the sessions firing at the same time.

September 9th, 2007, 08:15 AM
I'll probably plan on doing that as well. The most important thing now is to do the telnet negotiation so that telnet clients will work nicely without line editing or echoing problems.

One day it will grow up into a full blown BBS, but the idea of doing line editing for a message board is daunting. I did it once before and it wasn't fun back then. ;-0 People expect so much more now - line editing is trivial compared to the full screen editing people expect.

September 17th, 2007, 12:53 AM
Yo, MB - I notice you're into DOS networking stuff...
In this stash of stuff I got, there's 2-3 software packages of LANtastic, and another box that says LANtastic StreamServer, or something like that.

Any interest in it? Gotta get that stuff outta the way, and a few other DOS software items as well...


September 17th, 2007, 12:25 PM
Old networking gear is interesting, but I'm going to have to pass .. I have my hands full already.