So are you serious about becoming a better network engineer.
Are you going to become better than others around you or others in the industry.
In this video I'm going to show you how to use Linux commands on Cisco IOW devices so that you can do
things that others don't know how to do.
In a previous video which I've linked here and below I showed you how do you enable or use Linux commands
by running a single command on a Cisco IOW device.
I'm not talking about dropping into a Linux shell or running a virtual machine on a Cisco device by
simply typing one command on a Cisco IOW device.
You can run Linux commands such as grep man more and many others.
You can also run scripts on Cisco IOW devices.
So in other words you can run linux scripts directly on the device by enabling a single command.
Now this video is a continuation of the previous video and additional videos that I've created.
I wanted to add scripting to this video but the videos got too long.
So in this video I'm going to answer some questions.
I'm also going to address some feedback that I've received about showing you additional options available
through these commands.
These commands are available as part of the Cisco eyewear show.
You don't need to run anything fancy to use these commands and Cisco IOW it's available on traditional
Cisco IOW as well as additional platforms such as iris XY.
Now I'm going to ask you a favor if you find this video useful please consider subscribing to my YouTube
channel please like this video.
Click the button to get notifications so that you know we're not upload videos like this change your
life today.
Spend time going through this video and learning things that other network engineers don't know so that
you can amaze a senior network engineer when they see what you can do.
Or you can email someone when you go for an interview learn these commands and set yourself apart from
others.
OK so without further ado let's get started.
Don't believe people who tell you that you can't use Linux commands such as grep or man or more on Cisco.
IOW you can on traditional Cisco IOW.
Now this feature is available from version 15 dot one of Cisco IOW it's been around for a long time.
This document as you can see was first published in March 25 2000 and 11.
So it's been around for a long time.
But you do need version 15 or leader of Cisco.
IOW I've got in this genus we topology a traditional Cisco IOW switch and Iow rotor but I've also got
a exe e router.
So this is a Cisco CSR.
Now if you're not sure what that is.
This is classic or traditional Cisco IOW that's been around for many years.
Now if you've used traditional devices such as 30 750 switches or twenty eight hundred routers and so
forth.
This is the Iaw that we're talking about.
So in this example the switches using the IRS layer to this router is a Cisco Iowa's v router so show
version on the road.
Notice it's running the Iaw So Iowa's V.
That's the version of IOW but this CSR router is running.
IOW XY so notice a virtual X software.
Notice the difference here x 86 64 bit Linux.
Wikipedia has a decent explanation of what Cisco IOW X is.
It's basically the new Iaw.
The problem with traditional Cisco IAW is its monolithic.
There were so many features in it that became very difficult to manage or to develop on traditional
Cisco eyewear supports things such as IP X Apple talk from many many years ago.
Some of those features have been removed but what you'll find is a lot of features still exist in the
monolithic traditional classic Cisco USA.
This version of IAW was developed for the HSR 1000 series riders and the big thing to note is its bolt
on Linux.
So rather than just having Cisco IOW running directly on a switch or router we have Linux running and
then the Iaw runs as a separate process.
On top of Linux and that's why you can drop down to Linux shell and Cisco Iris XY.
Now why am I telling you this.
Because one of the questions I got asked is Is this Linux feature supported on XY.
And the answer is yes but I'm not just going to show you that I'm gonna show you an answer to another
question as well.
One of the questions was from a number of people was David.
Does it use a lot of CPE.
Does it use a lot of memory to enable this feature.
And I want to show you that the two ways to set this up you can either use the terminal option or you
can use the configuration option.
The configuration option is the option that I showed you in the previous video where I said Shell processing
full that is actually what they recommend basically that features then enabled on the device but you
don't have to do it that way.
You can enable it just for the current terminal.
So back in my June 23 topology what I'll do is I'll do this on XY so notice if I type show run Python
grep and let's say face it tells me that grep is not a supported command.
But if I enable terminal shell that feature will be available on this device to show run pipe grep face.
Notice that works if I exit out of the console so I've exited out of the console in this example and
go back into the console and type show run type grep face.
Notice the command is no longer supported.
So again if I typed terminal as a bunch of options here.
But let's say shell and then run that command again.
Notice it works but as soon as I exit out of the shell that command no longer works.
So I'm only enabling this for the current terminal.
So if you concerned about you know processing power memory utilization just enable it on the current
terminal.
It will only work for the current terminal and then it'll stop working once you once you exit your terminal.
Now I haven't seen any information saying that this will use a lot of memory or take a lot of CPSU power.
You basically just extending the commands that the device can support.
I guess they have answered two questions.
Is it supported in XY.
Yes it is.
Is it supported on traditional IOW.
Yes it is.
Can you enable it just for the current terminal.
Yes you can.
So if you're concerned about leaving this running only enabled for your current terminal.
So if you're working on the device and you type that command you'll be able to do things that a engineer
who doesn't know about this won't be able to do so they'll see using commands that you know doesn't
work for them because you've just enabled the terminal shell on your current shell.
So that's quite nice to know.
Now someone else commented David you should have shown that grep doesn't have to be case sensitive.
So let me show you that.
Firstly on a switch if I type show run pipe include face.
This is not using the Linux commands.
This is just include.
Notice that works.
But if I say face with uppercase it doesn't work because this is case sensitive.
So the traditional include exclude commands use regular expressions.
And they keep sensitive.
Now the same is true if I use grep here.
Notice show run pipe grep face that works.
But if I use face uppercase it's not going to work.
I'm getting a duplex mismatch in my June 23 topology.
I'll quickly fix that.
So a duplex full on the router go back to the switch
notice.
This doesn't work.
So show run pipe grip face upper case doesn't work not going to work in this example.
But if I say Dash I notice it does work because I'm saying ignore case if you're not sure about commands
simply use man.
So use the man pages or manual pages.
So man and the specific command and notice Dash I or hyphen I ignore.
Case.
So that's really nice if you're not sure about you know is it uppercase or is it lowercase or if you
just wanna ignore case then use Dash I makes it a lot simpler in many ways to search for text now once
again to see the functions available use the command show shall function.
So I'll just do that again.
Show shell functions shows you the various functions available and here's a nice one.
No the lines in the input.
If I type show run traditionally I can use this command show run.
Line number that shows me the lines next to the running configuration.
That doesn't work as an example with the command show IP route.
So nodes show IP right.
Line No.
The switch is doing a domain lookup here it works with show run but doesn't work with I'll be right.
I'll just talk.
No IP domain look up so we didn't have that happening again.
So gain notice and show IP rocked line but doesn't work.
Show IP rot.
Question mark.
Lot of options here but no options for line number.
What I can do is say pipe and an.
And notice I get a line numbers next to the output.
Now this switch is learning a lot of rots from the router so perhaps you don't want to do it that way.
You probably want to push this to more so you can see one page of output at a time or you may want to
push this to a file so that you don't have so much output displayed so rather than doing it that way.
I'm gonna say pipe more.
Notice I get one page at a time and I can use spacebar to go through the output or simply use q to quit.
So just quit out of that if I don't want to see the entire configuration.
What's nice about this is I could say grep for let's say 70.
So show me.
Line 70 but I might just want to see a line that begins with 70 so carrot means beginning of line.
This is basic regular expressions so that could be quite useful you can now use line numbers on any
come on the show IP interface brief shows me a list of interfaces on the switch.
I can point that to an L to get a line numbers so I'll just make us a bit bigger.
So notice I see line numbers and what you could do is when you're talking to someone I'd say go and
have a look at line number 20.
As an example now again I'm just using very basic examples here usually imagination to think about what
you could use this for.
I could as an example once again say grep carrot beginning of line let's say 20.
Have a look at line 20.
So if you and I were discussing a configuration I could say use this command and go look at the specific
line in the output of any command and then let's discuss that command rather than trying to look for
a command in a long running configuration or in a big writing table or something.
We can narrow it down to a specific line.
Now you can also do this show IP interface brief and let's do sort that just sorts the output notice.
This is typically at the beginning.
So show IP interface brief we have interface ip address method status protocol first but you could sort
the output if you like and then push that to more so if you wanted to sort output alphabetically you
could do that.
Let's do a funny one with show run.
So typically show run looks like this.
There's a standard show run but what I'll do is sort that alphabetically
and as you can see the output is just being dumped.
So I should have pushed that to more once again.
So let's push that to more and notice BGP is the first command that we've got.
I P then log in then media type goes all the way down to
to v land.
So I've been able to sort the output.
So if you wanted to sort something alphabetically you could do that rather than trying to look for something
but I mean there are perhaps better ways of doing this you could just for instance grep for something
and in this case I've used the wrong word.
So let's say v lan grep for Vila
now I've got to ask this because this is YouTube.
Please subscribe to my YouTube channel.
Click on the ball to receive notifications when I post a new video.
And please put comments below this video.
Tell me did you find this video useful.
Have you got ideas of things that you can do with what I want with what you've learnt in this video.