Friday, January 7, 2011

Maximum Transmission Unit(MTU)

Maximum Transmission Unit(MTU) Refers to a kind of communication protocol that can be a new layer above the biggest packets through size (in bytes for unit). Maximum transmission units this parameter normally and communication interface relevant (network interface card, serial ports, etc.).


Detailed explanation

The Internet protocol allows IP subdivision, thus can be divided into small enough data submitted by the maximum transmission sequence by less than the original size packet unit of the link. This fragmentation process occurs on the network layer (layer 3 of the OSI model, after entry for the transport layer: O S I model is one of the most important layer, here is according to the window control transmission, rather than MTU. Transfer protocol simultaneously flow control or may receive data based on receiving the speed regulation proper sending rate level. In addition, the transport layer to the web can deal with the largest size will longer packet force division. For example, Ethernet cannot receive greater than 1 to 5 0 0 bytes of data packets. The sender node of the transport layer data divided into smaller add-on, at the same time for each add-on to arrange a serial number, so that the recipient node of the data at the transport layer in the correct order reorganization. This process is called sort.), it is using group sent to link the network interface with the maximum transmission unit value. Original grouping piece-wise were added marker, such purpose host's IP layer can group restructured into the original data reported.

In the Internet protocol, an Internet transmission path "path maximum transmission unit" is defined as from the source address to the destination address passes "path" all the maximum transmission units IP jump the minimum value. Or from another Angle, is no further subdivision can walk through this article "path" of the maximum transmission units.

RFC 1191 describes "path maximum transmission unit found method", this is a kind of determined between two IP host maximum transmission unit technical path, its purpose is to avoid IP subdivision. In this technology, the source address data submitted to the DF (Don 't Fragment, Don't piece-wise) position, then gradually increase a transmitted data submitted to the size - path any need for subdivision of the group will this data submitted equipment will be discarded and return a "data submitted to the ICMP response to excessive" source address - so, source host is "study" to need not undertake piece-wise can through this path of the biggest maximum transmission units.

Unfortunately, more and more network blocked ICMP transmission (for example to prevent DDOS attack) - which path maximum transmission unit found methods can not work normally, its performance is a common connection at low data traffic situations can work normally, but once a large data sent simultaneously, would immediately hung (e.g. in use IRC of time, the customer can be found in sending a ban IP cheating the ping then can not get any response, this is because the connection by the amount of welcome message blocked). And, in another use Internet protocol networks, from the source address to the destination address "path" often in response to various events (load balance, congestion, power off, etc.) and be dynamically change - and this may lead to path maximum transmission units during transmission change -- sometimes even repeatedly change. As a result, the host searching for new can work safely maximum transmission units at the same time, more packet be lost.

For most use of Ethernet lans nowadays for maximum transmission unit value is 1500 bytes. But like PPPoE such a system will reduce this value, so it is in use maximum transmission units found method may cause such result: some in misconfiguration firewall after site becomes unreachable. To this kind of circumstance, or are likely to find alternative method, but it depends on how you control which part of the network. These methods including changes to the firewall TCP connection to one end of the first group of MSS (can do, the largest Segment piecewise Size).

For some support old version of the Ethernet protocol (such as IBM system XSeries), and may only in the maximum transmission unit set for 1492 only after in the present common LAN operate.

How to detect gateway MTU

In this machine open DOS window, implementation: the ping - f - 192.168.0.1 which is 192.168.0.1 l 1472 gateway IP address, 1472 is the length of the packet. Please note that the above parameters is "- l" (lowercase l), rather than "- 1". If can the ping general, said packet doesn't need unpacking, can send out through the gateway. If the Packet needs to be appeared: fragmented please. DF set. Say to send a Packet need apart. At this time, reduce packet length, then execute the above the ping command. From 14 to try a few more times between 1472, they can find suitable packet length. The packet length plus data baotou 28 bytes, get MTU values. If detected gateway MTU value is 1500, don't need to modify. If gateway a firewall ping impassability, can try directly set as 1400 MTU.

How to modify the MTU

Modification method is as follows:

Windows of lans

1, operation regedit

2 and open: HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services for possible Tcpip \ \ \ Interfaces

3, under the Interfaces to have multiple items, each subentry corresponds to a network adapter. Please click below methods selection nic:

A, determine the machine used to connect the Internet nic or IP dial-up connection, such as 192.168.0.19;

B, use the mouse to click on the items of the Interfaces, check key value from the list of IPAddress research, C, if IPAddress key value with A same, i.e. the IP 192.168.0.19, then the subentry is finding the network adapter.

4, enter the items on the right window, according to the right mouse button, select "new" - > "dwords value", input the name "MTU", press enter. Reoccupy mouse click "MTU", modify, fill in the popup window MTU value (usually a decimal 1480).

First, please fill in the base before set to a decimal number. Setting, need to restart a machine could take effect. Windows XP, 7 (measured) not Vista

1, use administrator privileges operation CMD

2, use with ipv4 netsh subinterfaces command see MTU display and local connection name.

Three, use netsh with ipv4 set subinterface "connection name" mtu = 300 store = persistent

(note: this connection name is you use the above command see MTU value corresponding this connection, his name on the right shows.

Add: 1, this method without restarting; 2, thus ipv6 will above ipv4 into ipv6 Linux under can use as follows commands modifications need root permissions

Ifconfig nic MTU values

If ifconfig eth0 mtu 146

MaxMTU is the biggest TCP/IP transmission units, the TCP/IP protocol, and will transmit data into small groups for transmission, each group size 576 bytes. Windows default bytes for 1500, this is Ethernet grouping criteria. ADSL use PPPoE is slightly less than the numerical, generally for 1492. And some of the site USES MaxMTU than 1492, therefore, may cause some web pages cannot access. Modify Windows default MaxMTU can solve this problem. Both PC installation PPPoE software or are built-in Modem of PPPoE software, in use are likely to encounter this problem. If use routers appear such circumstance, ask the firewall configuration = > basic setting, instead of manual, set MTU for 1492. That is how to determine the router can be obtained from the ISP MTU for 1500, please see attached to circle of position.

No comments:

Post a Comment