• Diniz Martins

Linux scripts on Cisco IOS

The Cisco IOS Shell (IOS.sh) feature provides shell scripting capability to the Cisco IOS command-line-interface (CLI) environment. Cisco IOS.sh enhances the process of controlling and configuring an IOS router using the CLI by including, variable substitution, paths, conditional statements, loops, pipes, and so on to enhance the user experience of Cisco IOS CLI users.

These tests were performed using version 15.2(4).S4 on Cisco 7606 router.

Users have options to enable and disable the Cisco IOS.sh environment in the global configuration mode using the shell processing full command. This is the recommended option. The shell processing command without the full keyword enables the default behavior of Cisco IOS.sh to be avialble. But to enable shell processing and access all its functions, use the shell processing full command.

To enable shell processing on the terminal and to enable trace enter the following:

To disable shell processing, use the no form of the command:

To disable shell processing on the terminal enter the following:

The Cisco IOS.sh feature is integrated into the existing IOS CLI environment. This feature must be enabled either in configuration, or using a terminal command before being able to access all its functions.

After the Cisco IOS.sh is enabled, users can perform the following tasks:

• Defining and using environment variables;

• Using control constructs to automate repetitive tasks;

• Creating and using Cisco IOS.sh functions;

• Using a new set of built-in function, that provide various text processing facilities;

• Using extended pipelines to use the output of one command as input for another one;

• Evaluating logical and arithmetic expressions for tests and variable setting;

• Using online manual pages describing these changes.

Command to check "input errors" on interfaces:

This is the output if you insert the same command but without "terminal shell":

Command to save in a text file:

Using "grep" to filter the search:

Using "tail" on your log:

Command to ping hosts between -

243 views0 comments

Recent Posts

See All

Installing Cisco ISE

The Cisco Identity Services Engine (ISE) is a next-generation identity and access control policy platform that provides a single policy plane across the entire organization combining multiple services

Napalm | Network Automation

Napalm is a vendor neutral, cross-platform open source project that provides a unified API to network devices, is written in Python and already works with the most popular automation frameworks. You d

Disable weak cipher and TLS on CISCO FMC

Transport Layer Security, or TLS, is a widely adopted security protocol designed to facilitate privacy and data security for communications over the Internet. A primary use case of TLS is encrypting t