cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11534
Views
20
Helpful
5
Replies

IP MTU

e.ciollaro
Level 4
Level 4

Hi experts,

in my understanding if I configure an MTU on an interface, incoming/outgoing packets that are bigger then MTU are discarded. This limit applies to both originated by router, terminating on router and routed traffic.  What I didn't understand  is if the MTU specified in "ip mtu" command, applies just to packet originated or terminating on router or to router traffic too. 

Can you help me ?

Thx

enrico

5 Replies 5

Carlos Villagran
Cisco Employee
Cisco Employee

Hi!

Incoming/Outgoing packets transmitted over your interface which are bigger than your MTU are NOT discarded, they are fragmented in pieces of your MTU size, i.e  if your MTU configured in the interface is 1500 and a frame of 3000 is traversing your link you will have two fragments of 1500 transmitted over the interface.

This is applied to ANY frame traversing the link.

Best regards!

JC

Well, I my understanding discarding/fragmenting is related to two different command: "mtu" and "ip mtu"; if you configure mtu xxx and a frame is bigger then xxx,  the frame is discarded. If you configure ip mtu yyy and a packet is bigger then yyy, the packet is fragmented. Below what  find on Cisco doc:

  • Interface MTU—Checked by the SPA on traffic coming in from the network. Different interface types support different interface MTU sizes and defaults. The interface MTU defines the maximum packet size allowable (in bytes) for an interface before drops occur. If the frame is smaller than the interface MTU size, but is not smaller than the minimum frame size for the interface type (such as 64 bytes for Ethernet), then the frame continues to process.
  • IP MTU—Can be configured on an interface or subinterface. If an IP packet exceeds the IP MTU size, then the packet is fragmented.

http://www.cisco.com/c/en/us/td/docs/interfaces_modules/shared_port_adapters/configuration/ASR1000/ASRspasw/ASRcfget.html#pgfId-1188189

I did some test with GNS3 (see attached diagram) and read some documentation.

Firs of all I understand that:

  • ip mtu <val> command is the same as mtu but used just if the L2 payload is an ip packet; it includes L3 header (for both classical Cisco IOS software and IOS XR).
  • mpls mtu <val> command determines the maximum size of an MPLS packet (payload + mpls header)


So I did some test; I configured mpls between R1-R2-R3 with mpls ldp explicit-null to avoid PHP; this way I'm sure MPLS label is always used. On R2 and R2 serials I configured:

  • mtu 1000
  • ip mtu 500
  • mpls mtu 750


Test:

  • ping from R1 to R3 with size 750 and df bit ==>doesn't  work; packet is bigger then mpls mtu and has df-bit set, so R2 discards it
  • ping from R1 to R3 with size 746 and df bit ==> work; this mean that R2 doesn't chack ip mtu. I suppose because R2 dosn't work at layer 3; it just switch MPLS packets changing the Label but do nothing on IP packet. So it just check MPLS MTU


Then I remove MPLS between R2 and R3.

  • ping from R1 to R3 with size 720 and df bit ==>doesn't  work; this time R2 decapsulate ip form MPLS header and encapsulate in HDLC so it checks ip mtu and discard packet
  • ping from R1 to R3 with size 500 and df bit ==> work;  


Finally I tried without MPLS:

  • ping from R1 to R3 with size 500 and df bit ==> work;  
  • ping from R1 to R3 with size 501 and df bit ==> doesn't work;  now R2 modifies L2 frame so it checks ip mtu

So the answer to the initial question seems to be that ip mtu is used just if router has to encapsulate an IP packet over the layer 2 protocol and do tat also when routing packet not just if originates or terminates the packet.

Let me know if you agree

Bye

enrico

Yes, the MTU checking must be done before rewriting the frame. The Router should check the MTU established by the L2 technology (or configured) and decide how the packet will be fragmented (this is done by the CPU) and afterwards it should encapsulate the fragments as their corresponding L2 technology. 

So yes I agree, it is done when routing the packet.

Best regards!

JC

David_Che
Level 1
Level 1

MTU applied for any packet, including IP packet, mpls packet, clns packet etc.

if you set ip mtu, this will take effect for only IP packet.

if ip packet is bigger than IP MTU, check if DF bit is set, if set, just discard the packet and send icmp message to the originator. if not set, just fragment the packet and forward them altogether.

Review Cisco Networking for a $25 gift card