MTU
(Maximum Transmission Unit): What exactly is this mystical MTU
anyway? The Maximum Transmission Unit of a network is the greatest
amount of data or "packet" size that can be transferred in one
physical frame on that network. This packet also contains the
header and trailer information, which are kind of like addresses
for each packet that are required by the routers on the network.
Fragmentation will occur if a packet is sent across a network
that has an MTU smaller than the packet's frame length. This
will lead to reduced performance levels as fragments need to
be reassembled. When a connection is opened between two computers,
they must agree on an MTU.Windows uses this default packet size
to negotiate with. This is done by comparing MTUs and selecting
the smaller of the two. If this value is set too high for the
routers to handle between the two computers, then this info
is fragmented into a packet size that the router can handle.
This negotiation takes some time and can double the time it
takes to send a single packet. Therefore; if the ISP uses an
MTU then every time a connection is started. Windows must adjust
to an acceptable MTU.By setting this value manually, you can
greatly reduce the amount of work that Windows must do to negotiate
and reach an acceptable MTU.
With
Windows 95, all versions, including OSR2, have a "hidden"
default for MTU set in the registry at 1500. This is appropriate
for LAN's and all Ethernet connections, but can be very inefficient
when using a PPP dialup connection. This has now been recognized
by Microsoft and corrected in Windows 98 to some extent. It's
really quite simple. Any intermediary IP routers encountered
on the Internet which are set to an MTU less than 1500, when
they handle your TCP/IP request, will often fragment an MTU,
breaking it up into smaller units, before sending it out on
the network.
MTU
is normally set in conjunction with MSS, the Maximum Segment
Size, and RWIN, the TCP Receive WINdow. MSS is the largest segment
of TCP data that the winsock is prepared to receive on that
connection. MSS must be smaller than MTU by at least 40 bytes,
the size of the header and trailer information. RWIN determines
how much data the receiving computer is prepared to receive.
If RWIN is set too large it will result in greater loss of data
if a packet is lost or damaged. If it is set too small (e.g.
1x MSS), transmission will be very slow. Normally RWIN is set
to either 4x, 6x or 8x MSS. Here's a simple analogy. TCP/IP
takes an e-mail letter (or web page) and cuts it into nice neat
squares (packets). It puts each piece in an envelope with the
address (header) of where it’s going for the routers to
send it along its way. Then all the letters are delivered to
your mailbox. So...
MSS
=
the size of each cut square of paper
MTU = the size of the envelope (which must
be slightly bigger than the square of paper)
RWIN = the size of the mailbox which "receives"
the letters
The
maximum speed of TCP/IP transfers through a SLIP (Serial Line
Protocol) or PPP (Point to Point Protocol) connection is, first
and foremost, limited by the speed of the modem. In an ideal
world, for an already compressed file, you should be able to
get 3.2 Kbytes/sec transfers with a 28.8 Kbps (kilobits per
second) connection; 2.7 Kbytes/sec with a 24 Kbps connection;
1.6 Kbytes/sec with a 14.4 Kbps connection; etc. Roughly speaking,
each one Byte/sec of delivered TCP data rate requires 9 bps
of modem connect rate. Note that newer modems allow for much
greater compression of certain types of files. Text files and
html files can often be compressed by a factor of 2x or 3x,
effectively doubling or tripling the speeds mentioned above.
The
data transfer speeds mentioned above are the ideal speeds one
can achieve, but this is often thwarted by fragmentation which
may occur in the transmission of packets of data. As you visit
various web sites, you may encounter routers on the download
path with an IP default MTU of only 576 bytes. Thus, if you
use the Windows default MTU settings of 1500, this can often
result in packet fragmentation slowdown (since you are trying
to use TCP segments (MSS) larger than 536 bytes.) Avoiding fragmentation
has a major effect on file download speed, whether we are talking
about html and image files from the web or straight text data
bits in your e-mail program.
An
MTU of 576 used to be the most common MTU setting in use and
was generally referred to as the "Internet Standard".
However modern routers are more often than not set to 1500 as
an MTU. So why use a smaller MTU? Well in an ideal world, you
would not do that any longer. You'd use 1500 and be done with
it. However, there is still a good deal of Internet congestion
out there, more than ever, really. And with this congestion,
packets of data are "dropped" and as a result need
to be retransmitted. Simply put, it takes just over 1/3 as long
to retransmit a smaller packet, say 576 bytes in size, than
it does to retransmit one 1500 bytes in size.
So
in summary, whether you’re ISP, the site you are going
to. Or the intermediary routers involved have any 576 MTU settings
or not, setting your own computer's MTU to a setting smaller
than 1500 (like 576) will often result in faster download speeds
for those using Dialup connections.
Download speeds for Broadband connections like cable DSL, and
Satellite. Broadband connections work best with an MTU setting
of 1500; however they work better with significantly higher
RWIN settings than Dialup .So how can you avoid fragmentation
during TCP data transfers? Very simple... you can limit the
MTU of your TCP/IP request to a smaller or optimum size. Most
people that are using Windows 95 and the Win95 Dialup Adapter,
which employs the winsock.dll in C:\Windows and wsock32.dll
file in C:\Windows\System (wsock32n.dll belongs to MSIE). You
are probably using a PPP dialup connection which most ISP's
use these days. All versions of Windows 95 are set up by default
to request a maximum MTU of 1500. You can, however, change that
default setting. And, it turns out, depending on how your ISP
and other routers encountered on the Internet handle your TCP/IP
requests, that a MaxMTU setting of 576, often referred to as
the "Internet Standard", will in many cases avoid
the fragmentation of packets of data and the slow transfer speeds
which result. Note that if your ISP is using an MTU lower than
576, (typical with a less efficient SLIP connection, for example),
then you will want to lower your MaxMTU setting to match your
ISP's. So, check with your ISP to see what he is using for MTU,
if you find that the recommended settings are not producing
good results for you.
RWIN
(Receive Window):
The
TCP Receive window size is the amount of receive data (in bytes)
that can be buffered at one time on a connection. That is the
amount of data the sending host can send before waiting for
an acknowledgement and a window update from the receiving host.
Matching the receive window to even increments of the MSS increases
the percentage of full-sized TCP segments utilized during bulk
data transmissions is the MaxMTU ( 40 bytes for TCP and IP headers).
The
RWIN default is 8192 bytes rounded up to the nearest MSS increment
for the connection. If that isn’t at least 4 times the MSS,
then it’s adjusted to 4*MSS, with a max size of 64k.bytes. With
widows 95 default MaxMTU of 1500, the default RWIN is rounded
to 8760 (1460*4).Performance can be greatly improved by setting
RWIN to a lower value such as 4 times your MSS (MTU-40).The
trick is to bring it to a value below 8192.Many users have better
success with 6,8 or even 10* MSS. However; manually setting
RWIN may decrease performance because it takes the control away
from windows, and if the MTU is negotiated to a different value,
then the size of the RWIN is no longer a whole integer multiple.
Therefore; for adjusting RWIN to be effective you must make
sure your MTU is set where it will not renegotiate to a lower
value.
Note: If you are experiencing problems such as your browser
stopping in the middle of a page, an MTU value of 576 might
fix the problem.
TTL
(Time To Live): Specifies the default time to live (TTL) for
IP packets from Microsoft TCP/IP. It is a field in the Internet
Protocol header which indicates how many more hops this packet
should be allowed to make before being discarded or returned.
This time specifies the maximum number of routers that the packet
may be forwarded through on to its destination. That means the
maximum number of hops permitted. For example Windows 95 default
is 32,. However; with our internet today this number should
be larger say 128.
Session
Keep Alive: You specifies how often to send session keep alive
packets on active sessions. When downloading, this will keep
your connection that has stalled from timing out. Windows default
value is 60 minutes, it is recommended to set it to 10 minutes.
. NDI Cache: Your source routing paths are stored in a cache
and NDI Cache is the size of that cache. It has a very large
effect on the performance of your TCP connection. For example,
if your MaxMTU is set to 576 or below, it is recommended to
set the NDI cache to 16, and if your MaxMTU is greater than
576 then set your NDI Cache to 32.