User Tools

Site Tools


howto_sh_pattern_and_interface_cisco

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

howto_sh_pattern_and_interface_cisco [2012/03/09 10:43]
howto_sh_pattern_and_interface_cisco [2012/03/09 10:43] (current)
Line 1: Line 1:
 +====== Find all interfaces matching with a certain pattern - Cisco IOS ======
  
 +Here an example with the description field
 +
 +<code>
 +sh int desc | i DHKESXDDPCOP00+
 +</code>
 +
 +This will yield the following
 +
 +<code>
 +Gi1/0/                       up             up       DHKESXDDPCOP001 SC
 +Gi1/0/                       up             up       DHKESXDDPCOP004 SC
 +Gi1/0/                       up             up       DHKESXDDPCOP002 SC
 +Gi1/0/12                       up             up       DHKESXDDPCOP003 SC
 +Gi2/0/                       up             up       DHKESXDDPCOP001 DD
 +Gi2/0/                       up             up       DHKESXDDPCOP004 DD
 +Gi2/0/                       up             up       DHKESXDDPCOP002 DD
 +Gi2/0/12                       up             up       DHKESXDDPCOP003 DD
 +Gi3/0/                       up             up       DHKESXDDPCOP001 NFS
 +Gi3/0/                       up             up       DHKESXDDPCOP004 NFS
 +Gi3/0/                       up             up       DHKESXDDPCOP002 NFS
 +Gi3/0/12                       up             up       DHKESXDDPCOP003 NFS
 +Gi4/0/                       up             up       DHKESXDDPCOP001 NFS
 +Gi4/0/                       up             up       DHKESXDDPCOP004 NFS
 +Gi4/0/                       up             up       DHKESXDDPCOP002 NFS
 +Gi4/0/12                       up             up       DHKESXDDPCOP003 NFS
 +
 +</code>
 +
 +sh = show
 +
 +int = interface
 +
 +desc = description
 +
 +| i = include with the following text
 +
 +DHKESXDDPCOP00+ = all descriptors matching DHKESXDDPCOP00 and whatever follows on that line (indicated by the +
 +<HTML>
 +
 +<!-- AddThis Button BEGIN -->
 +<a class="addthis_button" href="http://addthis.com/bookmark.php?v=250&amp;username=xa-4beeaaab61b514bf"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4beeaaab61b514bf"></script>
 +<!-- AddThis Button END -->
 +<br>
 +<br>
 +</HTML>
 +
 +Share this knowledge with your friends!
howto_sh_pattern_and_interface_cisco.txt ยท Last modified: 2012/03/09 10:43 (external edit)