Community
  • infoblox:blogs/tags/dns-threat-intelligence
2019-11-19T11:00:50
1 minute

Modify Cisco interface description on all Trunking Interface

A customer wanted to modify all "trunking" interfaces description to add the CDP neighbor name to it.

On this page

A customer wanted to modify all “trunking” interfaces description to add the CDP neighbor name to it.

Not a problem for NetMRI

This script will grab the CDP neighbor’s name and add it to the interface that it’s configured on. Script-Filter: $vendor eq "Cisco" and $sysdescr like /IOS/ ####################################################################### # Action: Execute Command Batch

Action-Commands: sh int trunk | inc trunking

Output-Triggers: Parse Output ####################################################################### # Trigger: Parse Output Trigger-Variables: #This regex finds the interfaces $cdpport /((Gi|Fa)+\d+(\/\d{1,2}|\/\d{1,2}\/\d+|\/\d{1,2}\.\d+|\/\d{1,2}\:\d+)?|\w+-\w+\d{1,3})/ Trigger-Template: [[$cdpport]]\s.+on\s.+802.1q\s.+trunking\s.+ Trigger-Commands: sh cdp ne $cdpport Output-Triggers: Show CDP #################### # Trigger: Show CDP Trigger-Variables: $cdpname /\w.+/ Trigger-Template: Device.+[[$cdpname]]\..+\..+.+ Trigger-Commands: DEBUG: conf t DEBUG: int $cdpport DEBUG: desc $cdpname

Now you can change the description to anything you choose not just CDP

Additional scripts can be found on our GitHub Repo

Article Tags
  • infoblox:blogs/tags/domain-impersonation-threats
  • infoblox:blogs/category/security
You might also be interested in