11 Replies Latest reply: Feb 24, 2016 1:50 AM by 1001QA.NET RSS

    Do you think you know Cisco CLI? Configure MTU :-)

      I am not telling you where, why and for what purpose.

      Just let your mind fly and tell me in how many ways can you do it. Limit your answers to the R&S lab/written topics.

      Consider that you have a high end L3 switch, routing functions enabled.

      Before answering feel free ask any questions that might help you to craft your reply :-)

       

      And by the way, where did this go: "system mtu bla bla bla"
      I am reading for breakfast this:

      Cisco IOS Master Command List, All Releases

      First Published: February 29, 2008

      Last Modified: January 27, 2014

        • 1. Re: Do you think you know Cisco CLI? Configure MTU :-)
          Martin

          Commands will vary from CatOS to IOS and per device and model or series. 

          interface command is ip mtu x

          • 2. Re: Do you think you know Cisco CLI? Configure MTU :-)
            arteq

            cat os is history...

            • 3. Re: Do you think you know Cisco CLI? Configure MTU :-)

              Martin wrote:

               

              Commands will vary from CatOS to IOS and per device and model or series.

              interface command is ip mtu x

              What makes you bookmark all my posts ?

              • 4. Re: Do you think you know Cisco CLI? Configure MTU :-)
                Martin

                So, how many ways did u find it?

                 

                I think there are at least 2 maybe 3rd does it as well.  What's the answer?

                • 5. Re: Do you think you know Cisco CLI? Configure MTU :-)
                  narbik

                  Are you asking for "System mtu", "System alternate mtu", "Jumbo mtu", or "routing mtu"?

                   

                   

                   

                   

                  Narbik Kocharians
                  CCSI#30832, CCIE# 12410 (R&S, SP, Security)
                  www.MicronicsTraining.com
                  Sr. Technical Instructor, and a Cisco press Author

                  A Cisco Learning Partner

                  • 6. Re: Do you think you know Cisco CLI? Configure MTU :-)

                    Yes.

                    system mtu bytes

                    system mtu routing bytes

                    system mtu jumbo bytes


                    There is also a vlan level MTU which I believe controls the L2 MTU -port level and the question is how does it work in conjunction with sytem mtu

                    There is also an ip mtu

                    And I also vaguely remember reading something about configurin the MTU for the packets that originate from the router/switch itself.


                    You wouldn't expect a simple thing like this to become so complicated


                    Edit: Is alternate MTU R&S v5 topic ? Could not find it in my OS anyway

                    • 7. Re: Do you think you know Cisco CLI? Configure MTU :-)
                      narbik

                       

                      Let’s begin with a 3560 Switch. Please understand that I don’t have access to any device and I am configuring this based on my memory, so please excuse the typos if you see one.

                       

                      There are four MTU values that can be set:

                      System MTU

                      Jumbo MTU

                      System Alternate MTU

                      Routing MTU

                       

                      System MTU is set and changed for any Ethernet or FastEthernet interface (10/100).

                      Jumbo MTU will affect any Gig or TenGig interface/s with the highest value of 9000 Bytes

                      System MTU routing effects layer three interfaces.

                       

                      Let’s say you have SW1 that needs to establish an OSPF adjacency with a router:

                       

                      SW1(config)#int f0/1

                      SW1(config-if)#no swi

                      SW1(config-if)#ip addr 10.1.1.10 255.255.255.0

                      SW1(config-if)#No shut

                       

                      Let’s set the system MTU routing to be 1504:

                       

                      SW1(config)#system mtu routing 1504

                       

                      You will get an error

                       

                      The reason it doesn’t like the command is because system MTU routing is set based on the system MTU. Let’s change the system MTU:

                       

                      SW1(config)#system mtu 1998

                      You need to reload the switch

                       

                      Based on your console message, the switch needs to be reloaded for the changes to take effect, let’s save the config and reload the switch. Once the switch is up, we should verify the MTU sizes:

                       

                      SW1#sh system mtu

                       

                      System MTU size is 1998 bytes

                      System Jumbo MTU size is 1998 bytes

                      Routing MTU size is 1998 bytes

                       

                      So we can see that if we need to change the "system MTU routing", since by default it is set based on the "system MTU", we need to change the "system MTU" first, then reload the switch before we can change the "system MTU routing".

                       

                      Let’s change the "system MTU routing" to 1504.

                      SW1(config)#system mtu routing 1504

                      SW1(config)#

                       

                      Note: We didn’t have to reload the switch to do that.

                       

                      SW1#sh system mtu

                       

                      System MTU size is 1998 bytes

                      System Jumbo MTU size is 1998 bytes

                      Routing MTU size is 1504 bytes

                       

                      So we can see that changing "system MTU routing" does not change the "system MTU".

                      Now let’s configure router (R1) .

                       

                      R1(config)#int f0/0

                      R1(config-if)#ip addr 10.1.1.1 255.255.255.0

                      R1(config-if)#No shut

                       

                      Let’s test connectivity:

                       

                      R1#ping 10.1.1.10

                      This should be successful.

                       

                      Let’s configure OSPF on both devices:

                       

                      On R1

                       

                      R1(config)#router ospf 1

                      R1(config-router)#netw 0.0.0.0 0.0.0.0 a 0

                       

                      On SW1:

                       

                      SW1(config)#ip routing

                      SW1(config)#router ospf 1

                      SW1(config-router)#netw 0.0.0.0 0.0.0.0 a 0

                       

                      To verify the configuration:

                       

                      R1#sh ip ospf neighbor

                       

                      The neighbor will be in “EXSTART” state.

                       

                      The reason these devices are not forming adjacency is a mismatch in MTU sizes, let’s change the MTU of the switch:

                       

                      SW1(config)#system mtu routing 1500

                       

                      You should see a console message revealing that the adjacency was formed:

                       

                      Let’s change the MTU routing on the switch back to 1504, and what if you wanted to change the router’s MTU to 1504?

                       

                      SW1(config)#system mtu routing 1504

                      And clear ip ospf process and enter “Yes”.

                       

                      R1(config)#int f0/0

                      R1(config-if)#ip mtu ?

                      1500  MTU

                       

                      Well, we can see that the MTU has a maximum size of 1500, but this is the IP MTU, which sets the maximum MTU size of an IP packets sent out of a given interface. Is there another MTU that we can adjust?

                       

                      R1(config-if)#mtu ?

                        1600  MTU

                       

                      The MTU displayed above is the hardware MTU. Hardware MTU specifies the maximum packet length that the interface can support.

                      This is different to the “IP MTU” which determines whether an egress IP packet needs to be fragmented.

                       

                      Normally “IP MTU” must be lower or equal to the hardware MTU, and by default they are equal. Therefore, in order to change the “IP MTU”, the hardware MTU must be changed first, just like what we did on the switch, we had to change the system MTU and then reload the device and then change the system mtu routing. On the routers there is no need to save and reload.

                       

                      Let’s do that:

                       

                      R1(config-if)#mtu 1504

                       

                      You should see that OSPF established its adjacency.

                       

                      Now let’s test the “IP MTU” and the hardware MTU:

                       

                      Let’s configure R1 and R2 on the same VLAN and ping:

                       

                      R1(config-if)#int f0/0

                      R1(config-if)#ip addr 12.1.1.1 255.255.255.0

                      R1(config-if)#no shu

                       

                      R2(config)#int f0/0

                      R2(config-if)#ip addr 12.1.1.2 255.255.255.0

                      R2(config-if)#no shu

                       

                      Switch(config)#interface range f0/1-2

                      Switch(config-if-range)#swi mode acc

                      Switch(config-if-range)#swi acc v 12

                      Switch(config-if-range)#spannin portf

                      Switch(config-if-range)#no shu

                       

                      To test:

                      R1#ping 12.1.1.2

                      This should be successful.

                       

                      Let’s ping with packet size of 1500 and the “DF” bit set.

                       

                      R1#ping 12.1.1.2 size 1500 df-bit

                      This should not be a problem, meaning that the ping is going to be successful.

                       

                      No problems, the reason for this demonstration is to say that fragmentation happens on the way out meaning if R1 needs to fragment because its IP MTU is set to something lower, it will. But the receiving router, in this case R2 will not fragment packets on the ingress if the packet size is higher than set MTU and the packet will be dropped. Let’s test this:

                       

                       

                      R1#ping 12.1.1.2 size 1501 df-bit rep 2

                      This will NOT be successful

                       

                      What happened? Fragmentation does not happen on the ingress, it happens on the egress.

                       

                      R1#sh int f0/0 | i MTU

                        MTU 1600 

                       

                      We can see that the MTU on R1 is set to 1600, so we are pinging with a size of 1501 and we are asking R1 not to fragment with the “DF” bit set. In this case R1 does not need to fragment, but R2’s MTU is set to 1500, and since it will not fragment on the ingress, it will drop the packets.

                       

                      R2#sh int f0/0 | i MTU

                        MTU 1500 

                       

                      This is all good but what is the “system MTU alternate” on switches?

                       

                      MAY BE the reason you don’t see that on your switch is because they included it starting with 12.2(55)Se (IF I AM NOT WRONG, PLEASE CHECK), you can setup a single alternate MTU and assign it to one or bunch of interfaces. This can be accomplished using the following commands in the global configuration mode:

                       

                      Switch(config)#System mtu alternate bytes ----------------------- to setup the alternate MTU

                      Switch(config)#System mtu alternate interface f0/1

                       

                      Alternate MTU does not affect the routing MTU. If you assign an alternate MTU to an interface and the received packet size is larger than the configured alternate MTU size, the packet will be dropped.

                       

                      I hope this helped, but this is not something that you read and try to memorize, you need to lab this up and explain it back to yourself as you see the results. I was thinking about 2800 routers and 3560 switches when I wrote this answer.

                       

                      Narbik Kocharians
                      CCSI#30832, CCIE# 12410 (R&S, SP, Security)
                      www.MicronicsTraining.com
                      Sr. Technical Instructor, and a Cisco Press Author

                      A Cisco Learning Partner

                      • 8. Re: Do you think you know Cisco CLI? Configure MTU :-)

                        Before I rate this as 'the answer" could you please tell us about the mtu subcommand available under "vlan x" command?
                        How will that affect the L3 and L2 interfaces connected  with this vlan?

                         

                        thank you

                         

                        Edit: I am not planning to memorize. I had my own notes about the above, not with so extensive explainations and my question here was intended to be a challenge for our forum colleagues and to learn if I might have missed anything (which I did, the alternate one escaped me)

                         

                        I shall lab these some time in the future ... but for now I need to lab more important things first

                        • 9. Re: Do you think you know Cisco CLI? Configure MTU :-)
                          narbik

                          Between two Cisco Switches you don’t need to change the link layer MTU, but if you have a Cisco switch talking to a third party Switch that can not handle an MTU size of 1522 (Which Cisco switches can), then you can use the MTU command under the VLAN to accommodate that. I have not tested the MTU configured under VLANs.

                           

                           

                           

                          Narbik Kocharians
                          CCSI#30832, CCIE# 12410 (R&S, SP, Security)
                          www.MicronicsTraining.com
                          Sr. Technical Instructor, and a Cisco Press Author

                          A Cisco Learning Partner

                          • 10. Re: Do you think you know Cisco CLI? Configure MTU :-)
                            narbik

                            BTW, I am sorry for getting into this question, I was not aware that this was a challenge for potential CCIE students.

                             

                             

                             

                            Narbik Kocharians
                            CCSI#30832, CCIE# 12410 (R&S, SP, Security)
                            www.MicronicsTraining.com
                            Sr. Technical Instructor, and a Cisco Press Author

                            A Cisco Learning Partner

                            • 11. Re: Do you think you know Cisco CLI? Configure MTU :-)

                              Don't be sorry

                              Nobody took the challenge and it was both a challenge and a question.

                              When I asked the question I had things that were unclear to me and which you clarified above

                               

                              thanks and please jump in any time.

                              BTW, there is a discussion going on about PVST+ and MST interaction where we do have a challenge in finding the right answer.