defect122

Maximum Transmission Unit - MTU - testversion

Feb 20th, 2012
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. Maximum transmission unit (MTU):
  2.  
  3. The Maximum Transmission Unit (MTU) describes the maximum size of a IP packet to fit fully without being fragmented in an Ethernet frame. Therefore the MTU is the maximum payload of an Ethernet frame, which is 1500 Byte. The 1500 Bytes are payload plus the 14 Byte Header. The IPv4 packet has a Headersize of about 20 Bytes plus its payload of data. If it exceeds 1500 Bytes in length it will be fragmented by the next router on its way to the destination.
  4. Important to note is that the MTU and the MSS only include the payload of a packet without the headers which of course add some additional bytes to the whole load of data.
  5. According to PPPoE definition, the MTU for most internet users is 1492 Bytes. 1500 minus the 8 Bytes of payload of PPPoE.
  6. The same applies to the transport layer. Since TCP packets are referred to as segments its called MSS here (Maximum Segment Size). Analogous to the Ethernet-MTU the MSS describes the maximum data load a TCP segment can have to fit in a IP packet without counting the headers. The MSS must be at least 40 Bytes smaller than the MTU since the TCP Header add another 20 Bytes. So, you need to subtract the 20 Bytes of the IPv4-Header and the 20 Bytes of the TCPv4-Header from the Ethernet-MTU to get the MSS:
  7. 1500-20-20 = 1460 Bytes or you can write it as MSS = MTU - 40
  8. If the TCP segment is bigger than the MSS it will be fragmented.
  9.  
  10. Example:
  11.  
  12. Payload = PacketLength – HeaderLength
  13.  
  14. The payload of a IP packet is the MTU of the Ethernetframe. The packetlength of a TCP packet is:
  15.  
  16. TCPPacketLength = TCPHeaderLength + MSS
  17.  
  18. MSS = payload of a IP packet
  19.  
  20. (as mentioned above the MSS can also be written as):
  21. MSS = MTU – TCPHeaderlength – IPHeaderlength
  22.  
  23. The MSS can further be influenced by the Optionsfield in the IP-header:
  24.  
  25. MSS = MTU – TCPHeaderlength – IPHeaderlength – Options
  26.  
  27.  
  28.  
  29.  
  30.  
  31. You can see the MTU for your own Home-made LAN if you use ping. Type in PING -l 1472 "ip-adress of a host/ of your router". 1472 is standard here because ICMP is used for PING which has a payload of 8 Bytes. Plus the 20 Bytes for the IP Header and the 18 Bytes for the Ethernetheader. So the 1472 is the MTU. If you type in the same as above such as PING -l 1473 "ip-adress of a host or of your router" the process will be finished normally, because the packet is fragmented into parts.
  32. But if you type in PING -l 1473 -f "IP adress of a host/router" you will get an error message like "Packets need to be fragmented but DF set". The -f switch means the "Don´t fragment" (DF) – options is set so the packet will not be sent fragmented along its way because it is forbidden using -f.
Advertisement
Add Comment
Please, Sign In to add comment