Cisco IOS Command Tip – How To Use Show Command Filters Effectively

hub

Cisco IOS Command Filters – Why You Need Them

For the beginning and CCNA network engineer, we spend a lot of time looking at the running configuration of the Cisco IOS router or switch.  Filters are an extremely useful part of the Cisco IOS command line and every network engineer should be able to use them effectively as they save a lot of time when used properly.  If you want to get your CCNA certification and be an effective network engineer, you should know this.

Ciso IOS Command Filters – Available In Cisco IOS

There are several show command filters for the Cisco IOS Command, which are usually used in conjunction with the “show run” and “show start” commands to view parts of the configuration.

Router#sh run | ?
append    Append redirected output to URL (URLs supporting append operation
only)
begin     Begin with the line that matches
exclude   Exclude lines that match
include   Include lines that match
redirect  Redirect output to URL
section   Filter a section of output
tee       Copy output to URL

The most common filters to use with this Cisco IOS command are include and exclude, which return only the lines of the configuration which contain the specified word.  For example,

Router#sh run | i interface
interface FastEthernet0/0
interface FastEthernet0/1

A more interesting use of this Cisco command would be to combine the filters, like as follows.

Router>sh ip nat trans | i Pro|15.0.0.1
Pro Inside global Inside local Outside local Outside global
--- 15.0.0.1 192.168.10.1 --- ---
Router>

In the above Cisco IOS command example, this is used to show both the header row as well as filter for a particular address in the NAT translation status output.

To Be Continued…

In a 2nd part of this post, I’ll be writing about the section filter.  Do subscribe to my RSS feed to make sure you don’t miss it.

Cheers,
Francis (@SavvyNetCert)

Technorati Tags: , , ,

Bookmark and Share

Comments

2 Responses to “Cisco IOS Command Tip – How To Use Show Command Filters Effectively”

Share Your Thoughts

Spam Protection by WP-SpamFree