« CiscoBlog Forums...They're here...I'm frightened... | Main | Looking for Network Diagram Ideas? »
April 29, 2008
Yet More Handy IOS Filtering Commands
A list of commands you can use to filter output on a Cisco router:
show run | include <word>
show run | interface <interface>
show run | begin <word>
show run | section include <word>
The "section" command is my newest discovery. For example, if I want to see the configuration of ALL FastEthernet interfaces on my lab router, I could type:
PE1-T1#sh run | section include FastEthernet
interface FastEthernet1/0
description connection to PE1 Internet Router
ip address 51.88.99.2 255.255.255.252
speed 100
full-duplex
interface FastEthernet1/1
no ip address
shutdown
duplex auto
speed auto
interface FastEthernet2/0
no ip address
shutdown
duplex auto
speed auto
interface FastEthernet2/1
ip address 10.7.255.100 255.255.0.0
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
interface FastEthernet3/0
no ip address
shutdown
duplex auto
speed auto
interface FastEthernet3/1
no ip address
shutdown
duplex auto
speed auto
Posted by JC at April 29, 2008 11:22 AM
Trackback Pings
TrackBack URL for this entry:
http://www.cioara.org/cgi-bin/mt-tb.cgi/265
Comments
Awesome tips. Very helpful. Personally, I'd appreciate more tips like these.
Posted by: michoudi at April 29, 2008 1:11 PM
Good one, you might want to check my compilation as well http://www.davidsudjiman.info/2008/03/18/cisco-cli-tips/
Posted by: David Sudjiman at April 29, 2008 3:59 PM
Doesn't
show run interface fastethernet X/X
do the same thing?
Posted by: Shaun at April 29, 2008 8:09 PM
No. Show run interface fastethernet X/X shows only the X/X interface.
This command shows all ethernet interfaces.
Posted by: Smail at April 30, 2008 2:21 AM
Its not present when I try it. Whhich IOS version was this introduced in? I'm on 12.2(25).
Posted by: Dan at May 2, 2008 3:37 AM
I think it's only in 12.4 line, I've tried it on a few routers running 12.3 and it's not in there.
Posted by: Rob at May 6, 2008 8:11 PM