Subject: Re: ftp transfer speed anomaly
To: Space Case <wormey@eskimo.com>
From: John F. Woods <jfw@jfwhome.funhouse.com>
List: current-users
Date: 12/18/1998 22:01:09
>20:34:20.039148 jared.wormspace.com.1158 > gate2.wormspace.com.ftp-data: P 110224:111400(1176) ack 1 win 8760 (DF)
>20:34:20.040731 jared.wormspace.com.1158 > gate2.wormspace.com.ftp-data: . 111400:112860(1460) ack 1 win 8760 (DF)
>20:34:20.636320 jared.wormspace.com.1158 > gate2.wormspace.com.ftp-data: P 110224:111684(1460) ack 1 win 8760 (DF)

>OK, I kinda see that.  I see no other mention of 111400 in the data stream
>besides these two.  Is that a dropped packet?

No; it just didn't bother transmitting a full-sized packet the first time
(110224-111400), so when it retransmitted starting at 110224, the *second*
time it had enough data to fill an Ethernet packet.

> <319 gateway /home/allen>% netstat -pip
> ip:
>         951494 total packets received
>         879 bad header checksums
>         617 with incorrect version number

On a typical Ethernet, you should see approximately 0 of either of these
errors.  You're getting corrupted packets.  (And intriguingly, some of those
corrupted packets actually pass the IP header checksum!  This is not
surprising, though; the IP checksum is disturbingly weak.)

> <320 gateway /home/allen>% netstat -ptcp
>                 35421 discarded for bad checksums
>                 1 discarded for bad header offset field

Again; corrupted packets (which sneak through IP's header checksum) getting
nailed by the TCP packet checksum.

> There seems to have been a *heck* of a lot of out-of-order packets...

Presumably packets received after a discarded packet.

>>You might have cabling problems that are corrupting packets from the
>> Win98 box, although that seems less than likely if the Ethernet checksum
>> is OK.

>Wouldn't that affect data going the other way, too?  Downloads to the Win98
>box average 900KB/sec.

ACK packets are short.  The corruption could be packet-length dependant.
Although with the problem I was seeing, once one packet went bad, the hub
seemed to corrupt all further packets until the wire went quiet.

> An additional data point -- my Q650, running MacOS 8.1, transfers in both
> directions at ~270KB/sec.  At this point, I suspect the most likely answer
> is that the Win98 box is breaking it on the way out.  I do have another
> enet card (different manuf/model) that I can try in it.

Definitely try that; also see if you can change your Ethernet hub (or even
plug the W98 box into the NetBSD box directly with a crossover cable).

> The only other hardware I have is a second Q650 running NetBSD, but it's
> also -current as of a week or so ago.  I could try sampling on there at
> the same time to see if it catches any differences...

I suspect that if it were a NetBSD problem, others would be seeing it a lot.
(*I* would be seeing it a lot. ;-)  So I now very strongly suspect either
the W98 interface card or the cabling or ethernet hub.