How well do you know the Cisco iOS?
Hopefully in this video, I'm going to teach you some commands that you don't know.
In this video.
I'm going to show you some tips and tricks with regards to the Cisco iOS.
Hopefully this will make you a better Cisco network engineer.
A lot of these commands are available in the configurations fundamentals Configuration Guide Cisco have
multiple examples of this guide that show you, for instance, the basics like context sensitive help
Sealy editing shortcuts and features.
But I'm going to show you some more advanced stuff.
Please comment below this video and let me know at which point in the video you learn something.
So let's see how far you can get through this video without learning something new.
I'm running a genius three topology here.
There are two routers and the switch.
These are traditional Cisco routers as in they run traditional classic Cisco iOS show version shows
me that the version of operating system that this router is using is 15.6 to TI.
So classic traditional Cisco iOS.
Nothing spectacular or exceptional about the Cisco iOS.
These are Cisco viral images that I'm running within SE three.
Okay.
So let's start with something straight away.
Show question mark.
Now show here shows me a whole bunch of commands and I can scroll and scroll and scroll, but notice
show question mark, I see more as an option.
So I've simply typed show question mark.
When more is displayed, I can use multiple options like forward slash.
This allows me to filter, for instance for a keyword such as class.
So that's what I've typed.
iOS is faltering.
The output of this show command to class map more is displayed.
Once again, I can use forward slash and for instance search for rad as in radius.
So all I did was type show question mark and notice the output is being filtered.
Ford slash again.
VPN.
Output is filtered to web a VPN.
Now you can use this with many commands such as show run.
So an on top show run most displayed forward slash type something such as face.
The output is faulted until face is found as in interface loopback 100 Moore's displayed forward slash.
Let's look for something such as network.
This is filtering the output until the first network statement.
Now I've purposely used a sub command here rather than something such as router.
So as an example, I could filter for t y.
Now some people have said when I've shown them this previously that you can just type sho run pipe section
and let's say router slash v t y as an example.
And that will show you the router configuration and the VTI configuration.
And that's true.
I'm not trying to tell you which command is better than another.
I'm trying to show you different options.
This shows me the router sections as in router IP, router BGP, router OSPF.
And here I've got v y.
But notice when I type show run I could as an example filter the config for one keyword such as face.
So that's like a section of configuration.
But then I could filter for a different keyword, which could be a sub command such as 0.0.
So that's filtering.
To that, which is actually a regular expression.
So let's do forward slash again and say zero backslash dot zero.
So this is a regular expression saying Escape the special meaning of a dot.
A dot is any single character.
So that matched there.
But I'm going to actually look for 0.0 and that's filtered down to here.
So it's not a section of code.
It's a sub command.
And then I could filter for something else.
Let's say log.
This is showing me the configuration from a certain point.
In this example banner login.
But what you might have noticed is I've used, I think, four different search criteria in one show
command.
So I'm looking at output and I'm doing multiple searches on that output.
The closest that you can get is perhaps begin.
So show run, pipe begin and let's say log in.
That will show me the running configuration from the word logging as in banner logging.
But that's all it's going to give me.
But note, I have more here so I could do a search for VTI or some other kind of keyword.
It's not showing anything here because VTI was already displayed in.
There's no VTI the remaining config.
But what I could do is type show run, pipe, begin, face something further up in the configuration
as an interface and then I could search for router.
And then search for something else.
V.
T.
Y.
So the forward slash command is fantastic.
It doesn't just work with showrun run.
It basically works with any command where you've got more displayed.
So here I typed show IP route Moore's displayed.
So what I can do is use Ford slash and let's search for 172.
The show IP rot output is filtered to 172 and then I could filter for something else.
Let's say 192.168. 105.
Output is filtered to that point in the IP route command.
So Ford's really useful.
Another one that you could use.
No, please.
I'm going to just do show question mark here.
Now I'm going to use plus and let's.
Search for Roku.
This is filtering all that output to only show me show commands with Oro.
You in them.
Now you might say, Well, David, this is kind of pointless, but don't restrict your imagination.
Look at what this command can do and then play around with different options and see what works for
you.
The moral of the story is with a command showing more you could either use forward slash or you could
use plus.
And another option is minus where I don't want to see certain commands, so I want to remove everything,
let's say with ORU unit.
Now that's not a great example.
So let's do that with a routing command like show IP route.
So show IP route.
I don't want to see let's say 192 routes.
The routing table here has been filtered to remove 192.
And let me just show you the whole routing table to make the point.
Show IP route, no filtering.
We've got two routes.
We've got ten routes.
We've got 172 routes.
We've got 192 routes in the routing table here.
But if I type show IP route, I could say minus.
Don't show me 172.
Don't show me 192.
I don't want to see those routes in the output of this command.
Again, you could type show IP route pipe include well, let's do exclude, which is similar to minus
one 72192.
You could do it that way and that will show you equivalent output.
In this method you are doing the command before showing the output in the other method.
I'm typing a command when I see more, then I'm deciding what to exclude.
And I can do that multiple times with a backslash.
But I can't do that with a minus or plus, but with a backslash I could filter multiple times.
Okay.
So show run pipe.
Begin is similar to forge slash include is similar to plus exclude is similar to minus.
Okay.
So that's some basic commands plus minus forward slash.
You once again can do that with any commands.
So I'll show you one more example and then wrap it up here in BGP, I can use question mark, BGP question
mark gives me options.
I could see BGP, question mark plus max.
This only shows me.
Commands with the max keyword in them.
I filtered the output.
And again wherever you are and you use question mark and I shouldn't be using show they let me just
use question mark in global config mode with no options.
Wherever you are here you can use forward slash plus minus.
So arrow you as an example here shows me all commands in global config mode that have zero you in them
either as the command or as the description of the command.
So if you can just slightly remember what a command should give you, but you can't remember the exact
command you can filter that way if you want to.
Okay, but let's step it up a notch.
Let's enable Linux commands directly on the Cisco iOS.
Now I've discussed this command shell processing full in this video.
If you want to see more details, have a look at this playlist.
You can either enable this globally or you can just enable it on the current terminal.
But what this allows me to do is it allows me to use Linux commands such as CAT.
So show shell functions shows me options.
GREP is a great one, which I'm going to show you right now.
We've also got Interface, which I'll show you in a moment.
You've also got NLL, which numbers any line in the output.
Basically, there's a whole bunch of things we can do now that you can't typically do with Cisco, iOS,
so include exclude.
Commands like that are very limited here.
We can do nested grips, all kinds of interesting things.
So as an example, show IP Interface Brief gives me a list of interfaces on this router.
So there's the command again, show IP interface, brief bunch of output on the router.
So I'll just do that again.
There's the command.
Yeah, all the interfaces.
But what I could do now is say grep and only show me interfaces that are up.
So all those interfaces are up.
This command shows me all up interfaces.
Scrolling up to the previous command show IP interface brief shows me interfaces, but also shows me
interfaces that are down.
So these interfaces are currently done.
But I can do.
Nested groups now remove loop backs from that output.
So show me all interfaces that are up, but remove loopback interfaces.
Now, you could perhaps just do it this way.
Show me all interfaces except loopback interfaces, but notice those interfaces are administratively
down.
Again, use your imagination.
This is a positive match.
This is an exclusion.
So we basically doing an include and then an exclude.
But let me show you some more commands that I haven't discussed in other videos.
How about this?
Show me the running configuration, but begin with 0/0.
This is similar to begin, but I'm going to make it more complex in a moment.
But.
And let me push that to more because this is like Linux, so you can use more to show one page at a
time.
So that command that I run there shows the running configuration from this point, but it's showing
the entire running configuration and it went by very quickly.
If I push it to more, it's going to show me one page at a time.
So there's the command showing one page of output at a time.
But you could say, Well, I could just do that with Begin.
Okay, but how about this?
Show me the running configuration beginning at this point, but ending at router.
So in other words, scrolling up, we're going to start at this point, but only show me until this
point when we see routers stop the output.
Okay, so let's try that show run pipe grep, begin zero zero grep you router.
There's the output interface gigabit zero zero and notice it ended at the point specified ended at router.
Now again, if you don't want it to scroll past, if you've got a lot of output, you can use more.
So we're doing double grep sheer and pushing it to more to only show certain parts of the configuration.
But you could say, David, I could just use section like section interface.
But notice the difference with section interface.
I am seeing loopback interfaces and then I'm seeing my gigabit interfaces.
What I'm doing with grep here is I'm deciding which section of code I want to see.
Could be a small piece of code, could be a long piece of code.
And I'm not restricted by what I can search on.
I could, for instance, search on a exclamation.
So show me the output from zero zero until exclamation.
Basically search on anything you want.
Okay.
So there you go.
That did it.
Didn't do it previously.
Notice it started at gigabit 200, ended at exclamation y because when you do show run.
And I'll use my Ford slush again.
I like Ford slush.
I showed the config from this point until this point.
You basically have the power here to do what you want, search for whichever output you want.
So let's do it from grep tool.
Log in.
I want to see all the output from zero zero until log in.
So all the output from zero zero.
So 0/0 interface gigabit zero zero until log in.
So I see my interfaces, I see rotor and when I see log in it ends.
So actually I should have done control plane there.
So let's do plane because I don't want to get the banner.
So show me all the configuration from 0/0 until plane.
So there's interface gigabit to zero zero.
Scrolling all the way down until plane.
The plane control plane command is typically shown here in the output.
But I've I don't want to see that.
I just want to see up until that point.
Okay.
But grep is even more powerful.
How about this?
Typically commands or case sensitive, but I could say I so face I'm going to put in uppercase notice
please.
That face here is lowercase but I'm going to say ignore case.
When you use section or include or one of those commands, it's case sensitive.
So commands such as show run pipe include exclude or k sensitive.
But yeah, I've told it.
Show me the running configuration from face face being uppercase or lowercase.
Don't k until plane.
So I'm seeing all my loopback interfaces and then I'm seeing gigabit interfaces up to plane.
Now if you're not sure about options notice man which is a linux command for manual grep shows me options
so there's b match everything in a file after a pattern dash II or hyphen I ignore case you match everything
until a certain pattern of V is invert.
So typically when you do show run pipe include, you have to match the case here.
But with grip you don't have to.
So show run pipe include face.
This matches all lines with the word face in it.
I could say grep.
I.
And then my face can be any case I want.
Doesn't matter what the case is.
Yeah.
That wouldn't work with include.
So output is the same.
But let's say I want to exclude my loop backs.
So let's use a negative grep.
So V says exclude loopback interfaces.
So I'll use dash v loop.
So show me the ethernet interfaces but exclude the loopback interfaces and there you go.
I'm only seeing gigabit interfaces, so that's a really powerful option.
Now, this video is unfortunately getting quite long, so I'm going to have to put the more advanced
stuff that I wanted to show you in a separate video, but hopefully you found this useful again.
Please comment below and let me know what you've learnt.
At what time STEM did you actually learn something?
Which commands did you learn?
And as always, please, would you subscribe to my YouTube channel?
Please, would you like this video if you found it useful?
Please click on the bell to get notifications when I post a new video, we bought this.