R12.1-JA-2025June05

Interface MTU Mismatch Check – Check Specific Interfaces

Instead of checking all interface MTU mismatches for hub devices, you may just want to check the interface MTU for certain interfaces of hub devices. In such cases, you can use the command show interface $interface to retrieve the MTU information for certain interfaces. The seed intent logic is displayed as below:

A screenshot of a computerDescription automatically generated

Example: Define an NIT to check for a certain interface MTU mismatch.

  1. Define a seed intent.
    1. Add a device “BJ_core_3550” and run the commands show interface f0/1 and show cdp neighbor detail on it.
      Run the command show interface f0/1 to get the certain MTU information of this interface.

    2. Run the command show cdp neighbor detail to get information about all interfaces of the current device and the neighbor devices and interfaces.

    3. Merge the above two parsed tables.

    4. Add device “BJ*POP” and run the command show interface f0/0 on it to get its interfaces and MTU value.

      Set the macro variable for this device interface, and the command will be show interface $intf. Use it to get certain neighbor interfaces and MTU values.
      And use this macro variable to define a diagnosis to compare the MTU of this device and device “BJ_core3550”.

      Information

      Note:  When executing an intent to check the match between a device and its neighbor devices, you can define a diagnosis message that specifies the mismatched neighbor device. Use the variable $this_device.Hostname for other device and $this_device for the host device in the diagnosis message. This ensures that device names are accurately reflected in the messages upon intent execution.


  1. Enable and define the neighbor pair replication.
    1. Assign roles for the seed devices. Device “BJ_core_3550” is the hub device and “BJ*POP” is the spoke device of “BJ_core_3550”.
    2. Define the neighbor variable logic for the hub device. In this case, the neighbor is from the cdp_nbr column of the table parsed by the command show cdp neighbor detail.

    3. Define the macro variable for the spoke device. In this case, use the nbr_intf column in the merged table to assign the value for the spoke macro variable.

    4. Filter the neighbor table by selecting a matching column for the hub macro variable to make the interfaces in the two devices match.

  1. Run this seed intent to view the result.

This NIT can be used in troubleshooting scenarios as a follow-up NIT. If you check the interface status/error for a certain device interface, and when there’s any error information for that interface, you can pass the device along with the interface information to the NIT to perform further interface MTU checks.

A diagram of a computer

Description automatically generated

The logic is shown above, and let’s assume that home intent is used to check interface errors for devices “R1” and “R2”. If there’s any interface error, you can further pass the device along with the interface to check whether there’s an MTU mismatch for these devices with neighbor devices.