R12 Publication-2025July16

Interface MTU Mismatch Check – Check All Interfaces

Example: Define an NIT to check for the interface MTU mismatch, which needs to define a macro variable for the spoke device.

Step1: Define a Seed Intent

  1. Add a device “BJ_core_3550” and run the commands show interface and show cdp neighbor detail on it.
    1. Run the command show interface to get the MTU information of all interfaces.
    2. Run the command show cdp neighbor detail to get information about all interfaces of the current device and the neighbor devices and interfaces.

  2. Merge the above two parsed tables.

  3. Add device “BJ*POP” and run the command show interface f0/0 on it to get its interfaces and MTU value.
  4. Set the macro variable for this device interface, and the command will be “show interface $intf”. Use it to get all 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.

Step2: Define the Neighbor Pair Replication

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 directly assign values for the spoke macro variable.
  4. Run this seed intent to view the result.