understanding "ip mtu" under router interface configuration

m4rtinm4rtin Member Posts: 170
According to Cisco command-reference, "ip mtu" sets the maximum transmission unit(MTU) size of IP packets sent on an interface. I set up an Cisco router interface with following parameters:
R1#sh run int Fa0/0
Building configuration...

Current configuration : 160 bytes
!
interface FastEthernet0/0
 mtu 1600
 ip address 10.10.10.2 255.255.255.0
 ip mtu 1200
 duplex auto
 speed auto
 ipv6 enable
 no keepalive
 no cdp enable
end

R1#


As you can see, IP MTU is 1200B and Ethernet MTU is 1600B. If I try to reach another host(10.10.10.1) on this broadcast domain using 1400B packets(more than "ip mtu"), then it works fine:
R1#ping 10.10.10.1 source 10.10.10.2 size 1400                        

Type escape sequence to abort.
Sending 5, 1400-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds:
Packet sent with a source address of 10.10.10.2 
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
R1#

..but packets received by 10.10.10.1 host are fragmented as they should be. However, if I use IPv6 protocol and 1400B packets:
R1#ping ipv6 fe80::215:58ff:fe2a:843e source FastEthernet0/0 size 1400
Output Interface: FastEthernet0/0
Type escape sequence to abort.
Sending 5, 1400-byte ICMP Echos to FE80::215:58FF:FE2A:843E, timeout is 2 seconds:
Packet sent with a source address of FE80::215:FAFF:FE8D:2EF6%FastEthernet0/0
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 0/1/8 ms
R1#

..then packets received by 10.10.10.1 host are not fragmented. In addition, as much as I have tested, looks like both Ethernet MTU and "ip mtu" start from the IP header and stop with the payload. This is confirmed by Jeremy Stretch from packetlife.net:

MTUs.png

Is "ip mtu" exactly the same as Ethernet MTU(configured with "mtu" command on router under interface configuration) but affects only IPv4 traffic? Or am I missing something?

Comments

  • srgsrg Member Posts: 140
    Yes you tune the IPv6 MTU with the ipv6 mtu command, it isnt affected by ip mtu.
    (config-if)#ipv6 mtu ?
      <1280-1500>  MTU (bytes)
    
  • NetworkVeteranNetworkVeteran Member Posts: 2,338 ■■■■■■■■□□
    Is "ip mtu" exactly the same as Ethernet MTU(configured with "mtu" command on router under interface configuration) but affects only IPv4 traffic? Or am I missing something?
    Good show on your research! If the above were true, what packet size would you expect to see if you go to an interface with default configuration, add the statement "ip mtu 1600", and send a 1560-byte IP packet? What actually happens? Another interesting aspect of the MTU configuration commands, is how they respond to one or two 4-byte 802.1Q tags.

    Just some additional thoughts for your consideration. :)
  • m4rtinm4rtin Member Posts: 170
    srg wrote: »
    Yes you tune the IPv6 MTU with the ipv6 mtu command, it isnt affected by ip mtu.
    (config-if)#ipv6 mtu ?
      <1280-1500>  MTU (bytes)
    

    I see. I set "ipv6 mtu 1280" under Fa0/0 configuration and now if execute "ping ipv6 fe80::215:58ff:fe2a:843e source FastEthernet0/0 size 1400" then host with IPv6 address fe80::215:58ff:fe2a:843e receives fragmented ICMP6 "echo request" messages:
    09:26:00.077275 00:15:fa:8d:2e:f6 > 00:15:58:2a:84:3e, ethertype IPv6 (0x86dd), length 1294: fe80::215:faff:fe8d:2ef6 > fe80::215:58ff:fe2a:843e: frag (0|1232) ICMP6, echo request, seq 0, length 1232
    09:26:00.077298 00:15:fa:8d:2e:f6 > 00:15:58:2a:84:3e, ethertype IPv6 (0x86dd), length 190: fe80::215:faff:fe8d:2ef6 > fe80::215:58ff:fe2a:843e: frag (1232|12[IMG]https://us.v-cdn.net/6030959/uploads/images/smilies/icon_cool.gif[/IMG]
    


    If the above were true, what packet size would you expect to see if you go to an interface with default configuration, add the statement "ip mtu 1600", and send a 1560-byte IP packet?

    Default Ethernet MTU on interface should be always 1500 bytes. You can't set the "ip mtu" or "ipv6 mtu" higher than Ethernet MTU:
    R1#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    R1(config)#int Fa0/0
    R1(config-if)#mtu 1500
    R1(config-if)#ip mtu ?
      <68-1500>  MTU (bytes)
    
    R1(config-if)#ipv6 mtu ?
      <1280-1500>  MTU (bytes)
    
    R1(config-if)#mtu 1300 
    R1(config-if)#ip mtu ? 
      <68-1300>  MTU (bytes)
    
    R1(config-if)#ipv6 mtu ?
      <1280-1300>  MTU (bytes)
    
    R1(config-if)#end      
    R1#
    


    Still, is the "ip mtu" exactly the same as Ethernet MTU(configured with "mtu" command on router under interface configuration) but affects only IPv4 traffic? And "ipv6 mtu" is exactly the same as Ethernet MTU, but affects only IPv6 traffic? In which situation one would need to have different MTU values for different network layer protocols?
Sign In or Register to comment.