Task No 4 - Optimization.

The guts of this page is the work of Chuck Hedrick, one of our systems guys. It was a reply to a posting of mine on ru.comp.qa.network

Subject: Re: CSLIP with MTU of 1006?

alang@paul.rutgers.edu (Bill Lang) writes:

>I use Parker, Mingus, etc. for SLIP into Rutgers. They offer and I use
>an MTU of 1006. Most of the things I've seen talk about 512 for SLIP
>and 256 for CSLIP.

>I was wondering if the Rutgers dialup Cisco routers can really handle
>an MTU of 1006 combined with CSLIP, or does it cause fragmentation, and
>or other performance problems?

Optimally, SLIP uses an MTU of 1006 or 1500 and an MSS of 256 or 512. MTU is the maximum legal packet size. MSS is the largest packet size actually used for TCP connections. You want a fairly small packet size for telnet in order to give reasonably smooth output. 128 or 256 gives good results for telnet, but may be too small for FTP over the Internet. If you're using a 14400 modem, 512 is a good compromise. For slower modems you probably want to use something smaller. (That's if you care about smoothness of telnet output. A lot of people don't notice, and a lot of TCP/IP software under Windows is so wretched that it doesn't make any difference. If you don't care, or your TCP/IP implementation isn't very good, you might as well use the full 1006 or 1500, which will give better FTP throughput.) While you want smallish TCP packets, there's no reason to set the MTU to be small. In a proper TCP/IP implementation, the MSS is used when a TCP connection is opened to negotiate with the other end on the packet size. The MTU is used to decide when to fragment packets. There's never any benefit to fragmentation. So the MTU generally should be as big as the physical network medium allows. Since our terminal servers are connected to Ethernet, the MTU should be 1500. Of course the different is not relevant for TCP connections, since the packets there won't ever be bigger than the MSS anyway. But for protocols using UDP, you may end up with large packets. You might as well use a large MTU so they don't get fragmented.

Now, that's the theory. The practice is rather more complex.

First, some TCP/IP implementations don't provide for separate MTU and MSS. E.g. the Windows NT that I use at home seems to ignore any attempt to set the MSS. Most TCP/IP's automatically set the MSS to be the minimum of the one you request and the MTU. So if there's no way to set the MSS explicitly, you can get the effect of a small one by setting a small MTU instead. That's what I do with Windows NT. Under Linux I set an MTU of 1500 and an MSS of 256. (However in order to do this I have to use some facilities that aren't well documented, so I'm not sure how common it is.) Note that there's a danger in this: whenever the MTU's on the two ends (i.e. the one on your PC and the one on the terminal server) disagree, you can end up in trouble. If someone sends a large packet to you, the terminal server will fragment it down to the size of its MTU. If that's larger than the MTU on your end, your software will probably discard the packet. However most home users are using TCP for almost all of their traffic. Typically the only use of UDP at home is for hostname lookups. Since hostname lookups typically use fairly small packets, you can often get away with using a small MTU, if you can't separately set the MSS.

Note by the way that RUCS dialups normally have an MTU of 1006, while LCSR uses 1500. (RUCS is optimizing for an old Berkeley Unix SLIP implementation, which is fixed to an MTU of 1006. LCSR is optimizing for PC and Linux SLIP implementations, for which 1500 is typically better.) This can be changed by typing "term slip mtu NNN" on the terminal server before using the SLIP command.

In summary:

if you are using the a SLIP that has its MTU fixed at 1006
{
    make sure the terminal server has an MTU of 1006
}
else
{
    if you are using a SLIP where you an adjust both MTU and MSS
    {
        use an MTU that's the same as your terminal server,
        and preferably 1500
        [For NCSA telnet and CUTCP, it *must* be 1500];
        if you want smooth telnet output, and your TCP
            implementation is capable of delivering it
        {
            use an MSS of 256 for 9600 or 512 for 14400
        }
        else
        {
            use an MSS that's the same as the MTU
        }
    }
    else
    {
        if you want smooth telnet output, and your TCP
            implementation is capable of delivering it
        {
            use an MTU of 256 for 9600 or 512 for 14400
            [if you do a lot of FTP to non-Rutgers locations,
            use 512]
        }
        else
        {
            use an MTU that's the same as your terminal server,
            preferably 1500
            [for NCSA telnet and CUTCP, it *must* be 1500]
        }
    }
}

Return to main SLIP page.

About This Page.

This page and any related applications were created by
Bill Lang (alang@paul.rutgers.edu) or (langw@pt.cyanamid.com)