Define Macro Variable for Both Hub and Spoke Devices
In this case, you may just want to perform diagnosis on part of the interfaces of the hub device instead of all interfaces. When both hub and spoke devices have macro variables, matching the interfaces in the two devices is a key point. To resolve this, you can filter the neighbor table by selecting a matching column for the hub macro variable.
For example, the hub and spoke devices both use the command show interface $intf to get corresponding interfaces. You can select the neighbor_interface column for the spoke macro variable and select local_interface as the mapping column for the hub macro variable to find the relationship between them.

Depending on the selected neighbor source, the scope of the value bound to the macro variable that can be selected in the hub and spoke devices is also different.
- The value scope of the hub macro variable can be used from the ADT table or use the default value.
- After configuring the macro variable for the hub device, the value scope of the spoke macro variable is summarised as follows.
- Variable in Neighbor Table: the variables in the neighbor table of the hub device to which this spoke device belongs.
- ADT Variable: the ADT variable in the domain.
- Hub Macro Variable: hub macro variable.