sexta-feira, 9 de junho de 2017

Mikrotik - MTU calculation on MikroTik


MTU calculation on MikroTik


Maximum Transmission Unit is a term in information technology refers to the size of the largest data packet that can be transmitted over a network medium. MTU size is variable, depending on the network technology used.An example is the network based on Ethernet technology, the maximum MTU size is 1500 bytes. It is the task of the data link layer must determine the size of the MTU.
Setting MTU is usually done on a kind of device networking switches, routers and so on. Very rarely do the MTU setting manually on a workstation or host. If the IP layer receives packets to be forwarded to the network, the device will calculate the size of the package if added to the 20 bytes ip header. If it turns out the package to be delivered has ukran MTU larger than the MTU device that receives the packet, the packet will be fragmented, or cut into smaller sizes.


MTU great value makes it possible to transmit data faster, imagine if you've got a lot of data is then collected into one big box. Then we simply send all the data one time using a large box. But if untukran small box, then we need to send a couple of times. MTU value are not then there is always a good effect. The longer the MTU, the more unreliable the data transmission process. If there is any damage in the delivery package, the whole package is damaged will be resubmitted by the TCP (Transmission Control Protocol).
So also on systems that MikroTik RouterOS which has a large MTU size standard of each interface. In RouterOS for MTU is divided into several types: MTU L3 (IP / Layer-3), L2.5 MTU (MPLS / Layer2.5), L2 MTU (MAC / Layer-2), Full Frame MTU. Of the types of MTU, has a different standard. 
  • L3 MTU = 1500 (Data: 1480 + IP: 20), 
  • L2.5 MTU = 1504 (Data: 1480 + IP: 20 + MPLS: 4)
  • L2 MTU = 1508 (Data: 1480 + IP: 20 + MPLS: 4 + VLAN: 4)
  • FULL Frame MTU = 1522 (Data: 1480 + IP: 20 + MPLS: 4 + VLAN: 4 + ETH: 14).
The big difference MTU value of each type depends on the type of traffic that will be handled. If the MTU size is only pegged at a value 1500 (L3 MTU) without adding any type of MTU The others then for traffic with the service VLAN, MPLS, it will not pass. In normal conditions the data packets that have a size too big to be in fragments by the device automatically. Too many packages are difragment will result in packet queue that is also long, and the device that receives the package also must rearrange received packets. MTU size supported Mikrotik products can be found here . 
Especially if there are applications that require static value of data packets, the network administrator should be able to determine the size of data packets to be passed so that the package can be received well. Some of the services that transmit data over the network will usually add a header to the data packet, for example ping.
At the time of data out of the device, the data packet will be coupled with some headers, such as IP Header 20bytes, and ICMP header 8bytes. To perform the test, you can use the ping command -s -f on windows OS, ping -M -s on Linux, or ping -D -s on Mac OSX. Suppose we try pinging the 1500 package size, without fragmentation.
That happened the destination device can not receive because of the size of the package is too large. Why so, when the opponent has the MTU setting of 1500. 1500 is the size of the data packet size before adding header. Then we can calculate the exact size of the data so that the ping packets can be received. 
1500 = 20 (IP header) + 8 (ICMP header) + Data
Data = 1500-20 (IP header) - 8 (ICMP header)
Data = 1472
If we try pinging the 1472 size, the packet can be received well 
Another service is usually also add a header to a specific value, such as VPN PPTP and PPPoE. This service will add pptp header and checksum, while adding PPPoE header PPPoE, PPP ID, DST and SRC Address. 
PPTP:
Data = 1500-20 (IP Header) - 28 (PPTP Header) - 2 (checksum) = 1450
PPPOE
1500-6 (PPPoE Header) - 2 (PPP ID) - 12 (DST and SRC Adress) = 1480 
Calculation as above also apply when using the service lainBisa concluded that by increasing the size of the IP header, then the size of the data on which ditrasmisikan also getting smaller. Miminum MTU size is 576 bytes.
Path MTU Discovery 
To determine the value of MTU devices opponent, device connected to the network has a mechanism called path MTU discovery. This mechanism did not membuthkan feature or special service, but uses a fairly simple way that is using the ICMP error reporting mechanism.
 
fonte: http://mikrotik234.blogspot.com.br/2017/03/mtu-calculation-on-mikrotik.html 

0 comentários: