Teneo !!!

Aaron’s blog on Networking, and Enterprise Technology

Archive for February, 2009

Killer show command – The ’section’ filter

Posted by Aaron Paxson on February 16, 2009

More often than not, I’m wanting to pull out a small subset from my Cisco box’s running-configuration.

Usually, I would do a “show run | beg xxxx”, and just type in where I want the configuration to start from.

This is handy, so you don’t have to page through lots of text before finding your area. The problem is, the paging brings the text you entered to the top. By the time you “break” through the paging, you’ve already entered several lines, and your text is now scrolled up.

Enter the “section” filter. A filter command included in the ‘T’-series of the IOS since 12.3. This is really new to me, though it’s been out there awhile.

This will now give you the entire ’section’ of the configuration (i.e. the indented text of a configuration object).

For example, if you wanted to see your BGP configuration, you would enter:

#show run | section router bgp.

Or, if you want to see all of your router configs:

#show run | section router

VERY HANDY!!

For more information, you can find it here: http://www.cisco.com/en/US/docs/ios/12_3t/12_3t2/feature/guide/gtshfltr.html

 

UPDATE:   CCIEPersuit had blogged about this command back in 2007 (see, told you it wasn’t new, that’s just how far behind the times I am).  It is a MUCH more descriptive entry than mine.

Posted in General Blab | Tagged: , , , , | Leave a Comment »