MTU of IPV4 and IPV6

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

Communication in terms of maximum transmission unit (Maximum Transmission Unit, MTU) refers to the maximum data a layer above a communication protocol that can pass the packet size (in bytes). The maximum transmission unit of this parameter is usually associated with communication interface (network interface card, serial port and so on.).

Explain in detail

Internet protocol allows IP slice, and thus packets into small fragments by the link maximum transmission unit is smaller than the original size of the packet. This fragmentation process occurs at the network layer (third layer of the OSI model), the fourth layer is the transport layer, transport layer is the most important in OSI model layer, this is according to the window control transmission, rather than MTU. Transmission protocol and flow control and is based on the speed receiver can receive data sending rate appropriate provisions. In addition, the transport layer according to the maximum size of the network can handle long packets are forced to split. For example, Ethernet can not receive more than 1500 bytes of data packets. The transport layer the sender node partitioning data into smaller, at the same time to arrange a sequence number for each piece of data, so that data arrives at the transport layer of receiver nodes, in order to recombinant correctly, this process is known as the sort. It is the use of the packet to a maximum transmission unit network interface on the value of the. Slice the original packets are tagged markers, TCP layer can do that will host the packet into the original packets.

In the internet protocol, an Internet transmission path “ path maximum transmission unit ” is defined as a &ldquo from the source address to the destination address; the path ” the minimum values of the maximum transmission unit on IP jumps. Or, from another perspective, is without further slice can across the path “ ” maximum transmission unit.

RFC 1191 describes “ path MTU discovery method, which is between ” a two IP host path maximum transmission unit technology, its purpose is to avoid the IP patch. In this technique, the source address of the datagram DF (Don't Fragment, don't slice) position, and then gradually increase the size of the transmitted data submitted to — — any path will be grouped into pieces of equipment will be the datagram is discarded and returns a & ldquo data report; a large ” ICMP response to the source address — — thus, the source host is “ ” to not divided by the maximum transmission unit of this path.

Unfortunately, more and more network blocked ICMP transmission (for example in order to prevent DDOS attacks) — — this makes the path MTU discovery methods do not work, the most common manifestation is a link in the low data flow can work normally, but once there is a large amount of data to transmit at the same time, it will immediately hang up (such as when, use the IRC client will find it not after sending a ban on IP fraud Ping any response, this is because the connection is blocked the welcome message a lot). But, in a using the internet protocol network, from the source address to a destination address of “ ” often in response to various events (load balancing, congestion, power and so on) are dynamically modify the — — this may lead to the path the transmission unit change in the transmission process of — — sometimes repeated change. As a result, the maximum transmission unit for a new security work in the host at the same time, more packets are lost.

For the majority of using Ethernet LANs, maximum transmission unit value is 1500 bytes. But systems like PPPoE can reduce this value, which makes the use of maximum transmission unit discovery method may result in improper allocation: after the firewall site becomes unreachable. In this case, might as well find alternative, but it depends on how you control what part of the network. These methods include the change is used to establish the TCP connection firewall first grouped in one end of the MSS (Maximum Segment Size, maximum segment size).

For some support old versions of Ethernet protocol IBM system (such as XSeries), perhaps only in the maximum transmission unit is set to 1492 then in the present common LAN operate.

How to detect the gateway MTU

In this machine to open the DOS window, -f: Ping -l 1472 192.168.0.1 192.168.0.1 is the IP address of the gateway, 1472 is the length of data packet. Please note, the above parameters is “ -l” (lowercase L), but not “ -1”. If Ping, indicates that the data packet does not need to remove the package, can go through the gateway to send. If needs to be fragmented: Packet but DF set. said the data packets sent to apart. At this time, to reduce the length of data packet, and then execute the above ping command. From 1400 to 1472 to try a few times, you can find the appropriate packet length. The data packet length with the data of Baotou 28 bytes, can obtain the value of MTU. If the gateway MTU value is 1500, does not need to modify the. If the gateway firewall Ping barrier, can try directly to the MTU set to 1400.


How to modify the machine MTU

Modified methods are as follows:

Under Windows platform

1,Run regedit

2,Open: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces

3,Interfaces has many items, each item corresponds to a card. Please according to the following method to select the network card:

A,The machine is used to connect to the Internet network or dialup connection IP, such as 192.168.0.19,

B,Use the mouse to click on the Interfaces sub items, IPAddress items to see the key list,

C,If a key and the A IPAddress IP in the same 192.168.0.19, namely, the child is to find the card.

4,Enter the sub item, on the right side of the window, click the right mouse button, select “ new ” -> “ DWORD ” input name, “ MTU”, press enter. Then click the “ MTU”, modify window, enter the MTU value (typically 1480 decimal.).

Please put the base to decimal before completion. Set up, need to reboot to take effect.

Windows 7(XP,Vista is not measured)

1,Use the administrator privileges to run CMD

2,Use the Netsh interface IPv4 show subinterfaces commands have a look MTU and local name for the connection.

3,Use the Netsh interface IPv4 set subinterface "local connection" mtu=1000 store=persistent

(Note: the connection name is you use the above command to see the MTU values corresponding to the connection name, he is shown on the right. )

Attached to: 1, this method does not need to restart; 2, such as IPv6 will be on the IPv4 to IPv6

Linux can use the following command to modify the need root permissions

Ifconfig card MTU

Such as the ifconfig eth0 MTU 1460

MaxMTU is the largest TCP/IP transmission unit, in the TCP/IP protocol, it will transmit the data into smaller groups for transmission, each group size is 576 bytes. The Windows default byte is 1500, this is the standard Ethernet packets. ADSL use of PPPoE is slightly less than this value, usually 1492. Some sites use MaxMTU is greater than 1492, therefore, may cause some webpage cannot access. Modify the Windows default MaxMTU can solve this problem. Whether it is installed on the PC or PPPoE software is built in Modem PPPoE software, in use are likely to encounter this problem. If using the router the case, please in the firewall configuration => basic setting, MTU will change to a hand, is set to 1492. That how to determine the router can be obtained from the ISP MTU 1500, please see the attachment position of the circle.

The following numerical default some common link layer protocol of MTU network:

The FDDI protocol: 4352 bytes

Ethernet (Ethernet) protocol: 1500 bytes

PPPoE(ADSL)Protocol: 1492 bytes

X.25 protocol (Dial Up/Modem): 576 bytes

Point-to-Point: 4470 bytes

If the IP layer to the transmission of a data link layer of MTU is larger than IP layer, then will the datagram into. A datagram will be divided into a number of slices, each slice size is less than or equal to the MTU value of the link layer. When the same network hosts communicate with each other, the network of MTU on both sides of communication is very important. But when the host to many network to communication, on both sides of communication is the most important MTU minimum communication path, because the link layer MTU of different networks in different communication path. MTU minimum communication path is called the path MTU.


------------------------


The ipv6 mtu of interface 0 is 3100:
awang@awangdevpc:/tmp$ sudo tcpdump -ni eth0 -evvv icmp6

09:22:22.394905 f0:de:f1:fb:98:8b > 00:21:27:ac:f1:53, ethertype IPv6 (0x86dd), length 3110: (hlim 64, next-header Fragment (44) payload length: 3056) 1234::60ef:4cde:b1a1:d87e > 1234::2: frag (0xe5fc7cc4:0|3048) ICMP6, echo request, length 3048, seq 1
09:22:22.394934 f0:de:f1:fb:98:8b > 00:21:27:ac:f1:53, ethertype IPv6 (0x86dd), length 2022: (hlim 64, next-header Fragment (44) payload length: 1968) 1234::60ef:4cde:b1a1:d87e > 1234::2: frag (0xe5fc7cc4:3048|1960)

09:22:22.396538 00:21:27:ac:f1:53 > f0:de:f1:fb:98:8b, ethertype IPv6 (0x86dd), length 3110: (hlim 64, next-header Fragment (44) payload length: 3056) 1234::2 > 1234::60ef:4cde:b1a1:d87e: frag (0x249da4f6:0|3048) ICMP6, echo reply, length 3048, seq 1
09:22:22.396544 00:21:27:ac:f1:53 > f0:de:f1:fb:98:8b, ethertype IPv6 (0x86dd), length 2022: (hlim 64, next-header Fragment (44) payload length: 1968) 1234::2 > 1234::60ef:4cde:b1a1:d87e: frag (0x249da4f6:3048|1960)



1.  Algorithm:

1>  Is the biggest integer which is smaller than 3100.
2>  could be devided by 8.
Since "3096" match the rule, so use it in IP layer to fragment.  

2.  Then use the "3096" to caculate other length:
3>  Ethernet layer length : add the ethernet header length "14", the total length which is printed in ethernet layer is "3110".
4>  IP layber payload: Since the IP layber of IPV4 is 40, so the printed payload is 3056.  
5>  ICMP length : And the ICMP tyoe of IPV6 is 8, so the printed ICMP payload is 3048.

------------------------------------------------------
ipv4 mtu:

If set the ipv4 mtu of interface 0 to "1500", then ping an IP address whihc is directlly connected, then use tcpdump:


awang@awangdevpc:/tmp$ sudo tcpdump -ni eth0 -evvv icmp

09:39:53.721760 00:21:9b:58:ca:8f > 00:90:7f:95:70:98, ethertype IPv4 (0x0800), length 1514: (tos 0x0, ttl 64, id 8113, offset 0, flags [+], proto ICMP (1), length 1500)
    172.26.0.183 > 172.26.0.1: ICMP echo request, id 4321, seq 1, length 1480
09:39:53.721778 00:21:9b:58:ca:8f > 00:90:7f:95:70:98, ethertype IPv4 (0x0800), length 1514: (tos 0x0, ttl 64, id 8113, offset 1480, flags [+], proto ICMP (1), length 1500)
    172.26.0.183 > 172.26.0.1: icmp
09:39:53.721781 00:21:9b:58:ca:8f > 00:90:7f:95:70:98, ethertype IPv4 (0x0800), length 1514: (tos 0x0, ttl 64, id 8113, offset 2960, flags [+], proto ICMP (1), length 1500)
    172.26.0.183 > 172.26.0.1: icmp
09:39:53.721784 00:21:9b:58:ca:8f > 00:90:7f:95:70:98, ethertype IPv4 (0x0800), length 602: (tos 0x0, ttl 64, id 8113, offset 4440, flags [none], proto ICMP (1), length 588)
    172.26.0.183 > 172.26.0.1: icmp

09:39:53.722909 00:90:7f:95:70:98 > 00:21:9b:58:ca:8f, ethertype IPv4 (0x0800), length 1514: (tos 0x0, ttl 64, id 10621, offset 0, flags [+], proto ICMP (1), length 1500)
    172.26.0.1 > 172.26.0.183: ICMP echo reply, id 4321, seq 1, length 1480
09:39:53.723153 00:90:7f:95:70:98 > 00:21:9b:58:ca:8f, ethertype IPv4 (0x0800), length 1514: (tos 0x0, ttl 64, id 10621, offset 1480, flags [+], proto ICMP (1), length 1500)
    172.26.0.1 > 172.26.0.183: icmp
09:39:53.723161 00:90:7f:95:70:98 > 00:21:9b:58:ca:8f, ethertype IPv4 (0x0800), length 1514: (tos 0x0, ttl 64, id 10621, offset 2960, flags [+], proto ICMP (1), length 1500)
    172.26.0.1 > 172.26.0.183: icmp
09:39:53.723402 00:90:7f:95:70:98 > 00:21:9b:58:ca:8f, ethertype IPv4 (0x0800), length 602: (tos 0x0, ttl 64, id 10621, offset 4440, flags [none], proto ICMP (1), length 588)
    172.26.0.1 > 172.26.0.183: icmp

1.  Algorithm:
1>  Is the biggest integer which is smaller than 1500.
2>  could be devided by 4.
Since "1500" match the rule, so use it in IP layer to fragment.

2.  Then use the "3096" to caculate other length:
Ethernet layer length : Add the ethernet header length "14", the total length which is printed in ethernet layer is "1514".


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Dick at November 11, 2013 - 12:13 AM