Pipe command in Cisco IOS

In this article I describe PIPE command in Cisco IOS in Cisco Routers and switches. Basic commands of IOS in Cisco Router relates to set the hostname, password etc on first time. The result of basic commands of IOS in Cisco Router initially saved in running configuration and we need to copy the running configuration into the startup configuration. The PIPE command in Cisco IOS run by the CLI command lines.

IOS is acronym for Internetwork Operating System which is related to Cisco networking devices. IOS Internetwork Operating System provides the facility to run the PIPE command in Cisco IOS. PIPE command in Cisco IOS short out the result as per requirement of user. I will brief the PIPE command in Cisco IOS with example later in this article. Before going to learn the PIPE command in Cisco IOS let’s take a review on some basics of Cisco IOS.

The configuration remain save in IOS memory via two way running and startup configuration. Basically running configuration is the settings which are running when a router is in functional condition. It is not necessary the running configuration remain save and come back when the router rebooted due to any reason. The startup configuration keep the setting in hard memory of router. Every time when router power on the startup configuration settings comes by default. The running configuration deleted automatically when the router goes power off. It is just like working with RAM and ROM.

The network administrator can change the configurations by basic commands of IOS in Cisco Router and maintain the networking device in a network by using Cisco IOS commands. IOS is an application which run as operating system for the networking devices like router or switch. Command Line Interface CLI in Cisco IOS provides a command line interface to a remote computer with various Cisco IOS command modes for network administrator. IOS load after a fix booting sequence every time when we boot the router or switch. On booting the router the startup configuration load in to the RAM of router So before learning about the Basic commands of IOS lets see some basic fundamentals of IOS Internetwork Operating System. You can also read the IOS booting sequence here.

PIPE command in Cisco IOS Necessity

IOS Internetwork Operating System is a Cisco propriety for Cisco networking devices like routers and switches. Network administrator can work with various Cisco IOS command modes of any networking device from a computer in the network. It is very helpful to run the PIPE Command in Cisco IOS when we need to short the result as per our requirment. The purpose of PIPE Command in Cisco IOS is to avoid the search unknown string in the CLI. All the routing configuration and other settings saved in the IOS Internetwork Operating System of router. Before going to learn about the PIPE Command in Cisco IOS of Router lets see some basic terms related to the IOS.

IOS Internetwork Operating System provide to do any changes on any interface or the router or switch. IOS Internetwork Operating System allowed to maintain the networking device from a very far location remotely. The IOS of Cisco can be integrated with other networking devices like IBM and SNA. The Cisco IOS command modes are very user friendly, the user can take the help about any command from CLI for a device.

You may also like to read --  Configure VLAN Trunking Protocol VTP

The IOS Internetwork Operating System allow to configure the encryption, routing and authentication in the router or switches. IOS Internetwork Operating System have three variants XE, XR and Nexus. The XE version available with aggregation service routers and catalyst switches. XR version available with carrier routers. Nexus allow to configure the Nexus family devices. Before IOS Internetwork Operating System Cisco run the CatOS on its networking devices. IOS Internetwork Operating System is operating system independent means you can run the IOS on windows as well as on Linux or Unix operating system. The IOS developed in the decade of 1980 for Cisco routers.

Types of memory used to run the PIPE Command in Cisco IOS

There are multiple types of memory available in the router which takes part in the IOS Internetwork Operating System to run the PIPE Command in Cisco IOS. It is necessary to know about the various types of memory used in router for various purpose. We can say that each memory is responsible for different task for the IOS Internetwork Operating System. A Cisco router contains four main memories RAM, ROM, NVRAM and Flash memory.

RAM stands for Random Access Memory which is like a RAM in any computer. In a Router, RAM stores the running configuration and routing table with routing protocol. The IOS loaded in the RAM After the completion of IOS Booting sequence in the router. RAM stores the data until the router is power ON. After shutting down the router, all data stored in RAM will erase automatically.

ROM the Read Only Memory stores the data permanently in it. The ROM loaded the previously saved configuration in IOS Internetwork Operating System of router. Mostly the bootstrap start up program stored in ROM. The initial function known as POST is also stored in ROM and run during the first step of IOS Booting sequence in router.

NVRAM memory is a type of RAM but it is Non-Volatile. The data saved previously in the NVRAM loaded after completion of IOS Booting sequence in router. It means the data stored in it doesn’t depends on Power on or off. We can write the data multiple times on it. ROM is read only memory. The main difference between NVRAM and ROM is that data of NVRAM can be changed by configuration.

Another type of memory available in router is Flash memory. Flash memory keep save the IOS image. Flash memory is read and writable memory. In case of any error in the IOS Booting sequence the image of IOS can be used for booting the router.

You may also like to read --  Command Line Interface CLI in Cisco IOS

The Basic commands of IOS in detail including PIPE command

Some basic configurations of Cisco Router are necessary to set first time. These basic configurations provide the information of router and allow you to access it. PIPE Command in Cisco IOS is one of basic commands of IOS which can be used again and again during working with the CLI of a router or switch. The PIPE Command in Cisco IOS tells the router not to display the result of any command after the specified string. There are a lots of commands available in Cisco IOS for various configurations. I will also describe that How to use command Line interface perfectly. As we know there are three command modes in Cisco IOS. You can read the full article related to command modes here.

PIPE Command in Cisco IOS explained in brief

Pipe command in Cisco IOS is not any syntax which can be type. Pipe is a special character looks like vertical line. The Pipe character looks like | . generally pipe character used for programming in computer languages. Pipe command in Cisco IOS provides the output of command as per requirement of user. Pipe character is shown in below picture of keyboard.

In this article the hostname of example router is ccnatutorials.

Pipe command in Cisco IOS, ccna , ccna tutorial

Full commands in Cisco ios

all commands show the full result in the CLI. For example show running-config command will show the full result of all configuration. User have to find out a particular term in the result. Remaining result is not useful to user. When you run show running-config command in CLI it will give the result like below text.

The result of show running-config command 

 ccnatutorials#show running-config  
 Building configuration...
 
 Current configuration : 804 bytes
 !
 version 12.4
 no service timestamps log datetime msec
 no service timestamps debug datetime msec
 no service password-encryption
 !
 hostname ccnatutorials
 !
 ip cef
 no ipv6 cef
 !
 spanning-tree mode pvst
 !
 interface Loopback0
 ip address 3.3.3.3 255.0.0.0
 !
 interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
 shutdown
 !
 interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
 !
 interface Serial0/0/0
 no ip address
 clock rate 2000000
 !
 interface Serial0/0/1
 ip address 11.0.0.3 255.0.0.0
 !
 interface Vlan1
 no ip address
 shutdown
 !
 router ospf 1
 log-adjacency-changes
 network 11.0.0.0 0.255.255.255 area 1
 !
 ip classless
 !
 ip flow-export version 9
 !
 line con 0
 !
 line aux 0
 !
 line vty 0 4
 login
 end 

Out of all text if user want to check only spanning-tree configuration remaining result is not useful. To filter the result as per requirement Pipe | character is used. With pipe character the result will be like below. So how to use this pipe character efficiently.

 ccnatutorials#show running-config | include spanning
 spanning-tree mode pvst
 ccnatutorials# 
Pipe command in Cisco IOS, ccna , ccna tutorial

How to use Pipe command in Cisco IOS ?Pipe command filter the result of any command in CLI of router. Pipe character placed after the full command and after pipe character the query command. There are three types query you can search with pipe character. Begin, exclude and include are sub commands of pipe character. Here we see these three sub commands in details.

You may also like to read --  Setting Up Inter VLAN Routing on a Layer 3 Switch

Begin query with Pipe command in Cisco IOS

As name suggest begin will show the result include the character begin with. For example in above show running-config result we have all settings in one window. Suppose i want to see the result after spanning-tree configuration. By running the following command i will get the result after spanning word. The result before spanning will not be displayed. See the below example.

 With begin pipe command the result before spanning is not display 

 ccnatutorials#show running-config | begin spanning
 spanning-tree mode pvst
 !
 interface Loopback0
 ip address 3.3.3.3 255.0.0.0
 !
 interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
 shutdown
 !
 interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
 !
 interface Serial0/0/0
 no ip address
 clock rate 2000000
 !
 interface Serial0/0/1
 ip address 11.0.0.3 255.0.0.0
 !
 interface Vlan1
 no ip address
 shutdown
 !
 router ospf 1
 log-adjacency-changes
 network 11.0.0.0 0.255.255.255 area 1
 !
 ip classless
 !
 ip flow-export version 9
 !
 line con 0
 line aux 0
 !
 line vty 0 4
 login
 end
 ccnatutorials# 

Exclude query with Pipe command in Cisco IOS

similar to begin command the exclude query with pipe command in Cisco IOS exclude the line containing the word. You have to type the word after exclude which you do not want to see in the result. See the below example in its result the spanning tree line is not shown in display.

 Result not containing the line include spanning

 ccnatutorials#show running-config | exclude spanning
 Building configuration...
 Current configuration : 824 bytes
 !
 version 12.4
 no service timestamps log datetime msec
 no service timestamps debug datetime msec
 no service password-encryption
 !
 hostname ccnatutorials
 !
 ip cef
 no ipv6 cef
 !
 no ip domain-lookup
 interface Loopback0
 ip address 3.3.3.3 255.0.0.0
 !
 interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
 shutdown
 !
 interface FastEthernet0/1
 no ip address
 duplex auto
 speed auto
 shutdown
 !
 interface Serial0/0/0
 no ip address
 clock rate 2000000
 !
 interface Serial0/0/1
 ip address 11.0.0.3 255.0.0.0
 !
 interface Vlan1
 no ip address
 shutdown
 !
 router ospf 1
 log-adjacency-changes
 network 11.0.0.0 0.255.255.255 area 1
 !
 ip classless
 !
 ip flow-export version 9
 line con 0
 !
 line aux 0
 !
 line vty 0 4
 login
 end
 ccnatutorials# 

Include query with Pipe command in Cisco IOS

Include query filter the result includes only words used in command. Remaining part of result will not be display. We see the results in above commands so now we use same command with include spanning. See the result below

Pipe command in Cisco IOS, ccna , ccna tutorial

The above examples are explained how the pipe command in Cisco IOS works and how we can use this pipe character.

I hope this article may be helpful to you. For any query or suggestion on this article you may contact us or drop a comment below. your suggestions are always welcome by us.

Share this article in your social circle :)
,

Leave a Reply

Your email address will not be published. Required fields are marked *