OS/2 eZine - http://www.os2ezine.com
Spacer
February 16, 2002

Buy the CD 'This Space for Rent' by Pete Grubbs


Can't Get There From Here?

Ever notice how sometimes your OS/2 network applications are quirky while their Windows counterparts work just fine? Think you're being paranoid? Maybe not...

After two years of suffering random network failures across my OS/2 box I finally managed to locate the problem: MTU. That's right.. my MTU (Maximum Transmision Unit) was misconfigured and as a result network packets were being dropped randomily.

Common symptoms:

So what's the big deal you ask? Well, the problem with MTU misconfiguration is that you can't just fix the problem in one place and make it go away. I remember modifying my MTU value at least 20 times with no effect. The problem was that I was modifying the MTU in all the wrong places. There are plenty of ways to modify the MTU, many of which won't solve your problem. The Injoy documentation was both a blessing and a curse on this issue. It was a curse because it down-played the importance of MTU misconfiguration (stating that MTU problems are quite easy to diagnose). It was a blessing because it (eventually) helped me fix the problem. Besides, Bjarne (the author) was a lot of help. Many thanks go out to him and William L. Hartzell who pointed me in the right direction.

MTU misconfiguration probably isn't a problem to those of you using dial-up modems or cable connections, but for those unfortunate souls stuck using PPPoE the maximum MTU value is reduced to 1492, below the default value of 1500. Novice users often get confused.

Lets do it right!

Ok, so you've decided you need to change your MTU configuration. What do you do? In this article I will assume you're using Injoy Firewall and PPPoE (so your ideal MTU value is 1492).

First thing's first, lets take care of Injoy Firewall. The documentation reads:

Edit the ASCII file:

GATEWAY.CF

Locate the following section, and edit

[hardware]
fragmented packets prior to
up again (using the MTU), as
is enabled per default, which
rules to operate on full packets.
on the performance.

Remove the ';' in front of 'MTU' and change to 1492

Next, modify the MTU associated with your LAN adapter, loopback interface and ppp interface. The last two are optional but I'd do them "just in case" (I'm paranoid that way).

Also, I've found the following settings yielded better TCP/IP throughput and the timestmp flag prevents TCP/IP-related TRAPs. Simply create \tcpip\bin\b4tcp.cmd with the following contents:

inetcfg -s tcpswinsize 65536
inetcfg -s mtudiscover 0
inetcfg -s synattack 1
inetcfg -s syncookie 1
inetcfg -s timestmp 1

Don't make the same mistake I did: modifying the MTU of ppp0 is not enough. You must modify your adapter's MTU value as well.

Good hunting!


Gili Tzabari (mailto:sl@bbs.darktech.org) is studying toward his Bachelor of Software Engineering in Concordia University, Quebec, Canada. Constantly in the persuit of a great programming project he constantly shifts from one idea to the another... This week's project: Java for the People!

This article is courtesy of www.os2ezine.com. You can view it online at http://www.os2ezine.com/20020216/page_11.html.

Copyright (C) 2002. All Rights Reserved.