Differences between version 4 and previous revision of MTU.
Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 4 | Last edited on Monday, December 27, 2004 7:38:20 am | by AristotlePagaltzis | Revert |
Older page: | version 3 | Last edited on Thursday, December 16, 2004 11:31:30 am | by PerryLorier | Revert |
@@ -1,18 +1,12 @@
[Acronym] for __M__aximum __T__ransmittion __U__nit.
-The largest packet that can be sent over a link. For ethernet
and [PPP] this is usually 1500.
The minimum [MTU] you should ever use is 576.
The maximum [MTU] for [IPv4] is 65536, although I know
of no link that can handle
packets this large
.
+The size of the
largest packet that can be sent over a link. For [Ethernet]
and [PPP] this is usually 1500. The minimum [MTU] you should ever use is 576. The maximum [MTU] for [IPv4] is 65536, used in some gigabit [Ethernet] configurations. Since tunneling protocols such as [PPP] require a few bytes
of overhead per
packets, the [MTU] on their link is usually slightly lower than 1500. Many [ADSL] MoDem~s use 1470 here
.
-%%%
-%%%
+Each packet requires overhead: it needs a header containing addresses, port numbers, [TTL], flags, etc. Therefore, larger packets equal better use of the bandwidth. If the [MTU] is smaller than necessary, more packets than necessary will be sent. However, with an [MTU] set high, if packets have to be routed through a link with a smaller [MTU], they'll need to be fragmented, ie broken into smaller packets. F.ex, when sending 1500 byte [Ethernet] packets through a 1470 byte [MTU] [PPP] link, the end of every packet will be broken into a tiny 30-byte fragment.
-''If your
MTU is very small
, you'll be sending more
packets than necessary
. Since each packet needs a header containing addresses, port numbers, ttl, flags, etc
, it's best
to send larger packets
.''
+The [TCP/IP] stacks in [Linux] and most other recent OperatingSystem~s use a clever system called __path [
MTU] discovery__ to address this problem. The [MTU] for a new connection
is set low
, but gradually increases, while the
packets are sent with the __don't fragment__ flag set
. When the [MTU] grows beyond the smallest [MTU] of any link anywhere in the route
, the responsible gateway will refuse to route the packets because they're too large to send them without fragmenting them but
it's not allowed
to do that
. Instead, it will notify the source host with a __Need to fragment, but don
't fragment is set__ [ICMP] message. At this point the sending host knows the maximum fragmentation-free [MTU] size it can use on this connection, which is the most bandwidth-efficient size for packets.
-''OTOH if your MTU is very large
and has to go
through a link with a smaller MTU
, it'll normally be broken into smaller packets (fragmented). For tunneling protocols such as PPTP (used by many ADSL modems)
the MTU is slightly smaller than 1500 because the tunneling uses a few bytes for itself
. If you're sending 1500-byte packets over a 1470-byte link, the second part of every packet is going
to get broken into
a tiny 30-byte fragment which is really inefficient
.''
+Unfortunately, some particularly clueless SysAdmin~s ignorantly block any
and all [ICMP] packets from passing
through their gateways without fully understanding why [ICMP] is an important part of [IP]
, and/or without thinking of
the consequences
. Banks seem
to be
a major transgressor here
.
-
-''Linux (and most other recent OS's) use a clever system called 'path-MTU-discovery'; Linux starts any new connection only sending very small packets and gradually makes them bigger. At the same time it sets the 'don't fragment' flag on all the packets. If a link somewhere is using a too-small MTU and wants to fragment them it's not allowed to, so it sends back an ICMP message 'Need to fragment, but don't fragment is set'. When we get this back, we know what's the largest packet we can use on that connection without it getting fragmented, which happens to be the most efficient size..''
-
-''The reason I bothered to tell you all this is because some IDIOT admins (particularly BANKS!) ignorantly block all ICMP without fully understanding why ICMP is an important part of IP, and/or without thinking of the consequences. I just wanted to vent that, OK?
:-) - zcat ''
-
-----
-Some common (and not so common) [MTU sizes|http://www-12.lotus.com/ldd/doc/domino_notes/5./readme.nsf//f397306f052d9ea3852567740049a10a?OpenDocument]
+See also
:
+*
Some common (and not so common) [MTU sizes | http://www-12.lotus.com/ldd/doc/domino_notes/5./readme.nsf//f397306f052d9ea3852567740049a10a?OpenDocument]