Using pipe to search Cisco configuration
If I had to describe to someone what is `pipe` in terms of Cisco IOS I would say it is additional filter for show or more command. If I compare it to some other operating systems I would say it is something like grep in Linux.
Now, there is few additional commands you can add to pipe. First pipe is this `|`character.
If you want just some part of configuration type following as I did:
TestRouter1#show running-config | section eigrp
Key word is section and eigrp is argument which has to be matched. Only EIGRP section of configuration file will be shownOutput is shown below:
TestRouter1#show running-config | section eigrp
router eigrp 10
network 10.0.0.0
network 192.168.100.0
auto-summary
Other command you can use are begin, include, exclude. It is clear that command begin output will start with argument added to mentioned command. Exclude will remove lines with argument added to command and include will show only lines with argument added.
Best part is, let`s name it as `double pipe`. Sometimes pipe output can be very long thus not usable. Let imagine you want to see what access lists are applied to what interfaces. Type following:
TestRouter1#show running-config | include interface|group
Now after include there are two arguments: interface and group separated with pipe. Output will show that on FastEthernet has associated access list.
TestRouter1#show running-config | include interface|group
interface FastEthernet0/0
ip access-group TestACL in
interface FastEthernet0/1
interface FastEthernet1/0
interface Serial2/0
interface Serial2/1
interface Serial2/2
interface Serial2/3
I hope that this tutorial was informative to you and thank toy for visiting this website.