You know, I've been in this industry for a long time and over the years you learn many tips and tricks.
But there's a much quicker way of learning a bunch of stuff than just many years of experience.
And the way to do that is to find someone who knows something or has learned something and can teach
you.
So, in other words, find mentors.
Now I'm going to be creating a series of videos where I want to help you become a better network engineer.
Don't spend 15 years like I have having to learn all these tips and tricks the hard way.
Just learn from these videos.
So hopefully the tips and tricks that I'm going to show you in this video and subsequent videos will
make you the so called ten x network engineer.
In other words, you'll become a network engineer that's set apart from others.
You're going to learn some commands in this video that I wish I had known many years ago.
Use these commands to set you apart from others in the industry.
When you go for an interview, or when you have a senior network engineer or someone else watching what
you're doing.
Use these commands and amaze them with what you can do.
In this video, I'm going to show you how you can leverage a Linux commands on classic Cisco iOS.
Now, I'm not talking about dropping into a Linux shell.
I'm not talking about enabling a Linux VM or Linux shell separately from the Cisco iOS.
These commands run directly within Cisco iOS.
This is classic Cisco iOS.
In other words, the iOS that's been running on network devices for many, many years.
I've tested this on multiple devices.
I'm going to use Genius three in this example, but I'll also show you that these commands work on older
devices, like 1900 routers.
So use these commands to get ahead to show others that, you know, stuff that many others in the industry
don't know.
Hopefully you'll enjoy this video.
If you do, please like it and please consider subscribing to my YouTube channel.
That really does help me.
Okay.
You ready to learn some really cool Cisco iOS commands?
Let me show you what's possible and show you how you can set yourself apart from others in the industry.
Glasses on.
Because I'm old.
Okay.
So here I've got a Cisco.
iOS router running in genius three show version shows me that this is via iOS.
Here's the version of operating system on this writer.
Now, some of you may already know some of these commands.
As an example, show IP interface brief shows me interfaces on this router.
But notice, yeah, I have got many, many loopback interfaces, so I've got my physical interfaces.
So gigabit is 00010203.
But notice a whole bunch of loopback interfaces.
Now there are plenty of these I'm going to use forward slash.
Now that command is available in Linux, you'll find it in VI as an example.
So here's a Linux device, you name.
Dutchie.
Notice I'm running linux here.
This is an ubuntu linux pc.
It's actually a docker container.
Running in June is three.
But what I'll do here is start vi.
And I've got a file here which is actually a show run of a switch configuration.
Notice when I use forward slash, I can filter as an example for face.
I can filter again for line and that just scrolls through the configuration to that point.
I'll put out a vie here.
So this forward slash allows me to falter as an example for one i.t.
It's going to take the show ip interface, brief command and filter it.
Notice filtering up to that point.
Notice loopback 192.
I'll filter again because what I'm actually looking for is this a loopback 300 interface starting with
192168 100.1 as the IP addresses and there's a whole bunch of these.
I'll filter again for let's say uhn as in tunnel and notice it filters all the way down to tunnel.
Now I have shown this forward slash command in other videos, but that's not what I want to show you
here.
I'm going to show you a really cool command.
Notice I'm going to go into global configuration mode and type shell processing full.
So I've enabled full shell processing.
That's the only command that you need.
And notice what I can do now.
So rather than doing it that way, like show IP interface brief and then having to filter through the
configuration looking for interfaces, I'm going to tap show IP interface, brief and notice what I'm
going to use here.
GREP grep is a Linux command that allows me to filter or search for stuff.
Now, some of you may already know include I could include, let's say one, IE two, and that shows
me all lines that include 192, but that includes statement is quite limiting.
I can only do one include.
I can only search for one thing, but notice what I can do here.
I can do a grep for let's say up.
So I'm looking for all interfaces that are up.
Now that's a bit boring because it's just going to show me every interface that's up.
But what I'm going to do now is do pipe grep and let's not show interfaces that include 172 and let's
also not show 192.
This is a three tier grep.
I'm doing a search for something and then I'm excluding something and I'm excluding something else.
So I'm doing a three type include as an example.
You can't do that with a standard include commands.
Notice this shows me interfaces that have up in the list.
So these interfaces are up, but I'm not seeing 172 and 192.
I've just filtered a whole range of interfaces and all I'm seeing are the gigabit interfaces and then
these tunnel interfaces and I've got two loopback interfaces here in the ten 100 range.
So that's really powerful.
I could do another one here, so let's remove those.
So let's say grep minus V and I could just do it this way where I could say remove loop.
I don't want to loop and notice that just shows me gigabit interfaces and tunnel interfaces.
Now some of you may say, well, you could just do that once and that's true.
Just play around with the commands and see what works for you.
So I could just do grep up, grep hyphen v loop.
So show me interfaces that have up in them, but don't show me loopback interfaces.
So that's a positive and negative grep of output.
You try and do that with just include commands.
Now you may be able to do some of that, but let's show you an example and a switch that may really
help you show IP interface brief.
This will show me interfaces on the switch.
I can see gigabit interfaces.
I can see vlan interfaces.
Some of the interfaces are up, some of them are down.
But what I could do is say, show me interfaces that are up, but don't show me interfaces that don't
have an IP address assigned on them.
That can be really useful if you've got a large configuration and you only want to see interfaces that
have an IP address on them and that are up.
Okay.
So how about show run grep?
1.1.
Now that dot is actually a regular expression.
Notice we've got a matching character there.
We've got a matching character here, here and here.
What I could do, however, is say grep again for, let's say ten.
So show me everything that has 1.1.
In other words, one something, one in it, but filter that to only show me a lines that have ten in
it.
So something like this.
Now you might say, well, I could have just done include ten as an example, and that's true.
But don't use these examples to limit what you're thinking.
Use these examples just to show you what's possible and then think out of the box.
How can you use this to try different things and see if you can think of ideas of how you can use these
commands and add them below this video?
Tell me examples that you've found useful.
Now notice I can do an include, but I can't do an exclude here.
So with grep I can do that.
So the include exclude option is kind of limiting.
But with grep I could say show me that.
But let's do hyphen V or dash v, let's exclude gig.
And.
That's probably because I didn't use grep there.
So grep dash v gig notice, same kind of result as I had over there.
This is a double include.
If you like, or double grip.
Show me something that matches twice.
You have got show me a matching line, but don't show me this line that matches.
So we've got to include exclude.
You can't do that with the traditional show run pipe include show, run, pipe, exclude.
Here I'm doing include exclude at the same time.
Okay, so let's look at some other Linux commands.
Here's my Linux PC once again.
So you name A shows me that I'm using Linux hyphen hyphen help gives me help options with this command.
But on a Cisco device as an example I can type you name dash.
This shows me that I'm using iOS V as an example.
Now just like in Linux I can use man.
So look at the manuals.
So give me details of you name.
Notice lots of options available with your name.
So you name dash a shows me all the information about this router.
Se just gives me the version, sets eos v dn gives me the name of the router.
But let's try r.
That's the version of operating system.
So if you just want to get the version of operating system, there you go.
That could be useful in a script as an example or V gives me details of the version.
Very similar to the output over here with.
Now again, Linux does something very similar.
I could say you name A gives me all the output.
SW tells me that this is Linux.
This Shell option has many commands.
Now you may be wondering what commands are supported.
I don't want to make this video too long.
I'll show you some more complex stuff in a separate video.
But if you want to start investigating what options are available, we have this show Shell Functions
Command that will show us which functions are supported by this command.
So notice a very basic one.
Cat we've got cut, we've got echo, we've got grep, which I've been showing you at the moment.
So search for regular expressions in piped output or files.
We've got head.
More.
Plenty of Linux commands available here.
So let's use head and tail.
So show run head will show me the first ten lines of the running configuration.
So there you go.
So first few lines of the running configuration, I could also say tail, which will show me the last
few lines of the running configuration.
That's very basic stuff.
Cat allows me to read a file.
So if I type r notice there's some files and flash.
Let's do this show run.
And this is a this is very much a Linux command.
I'm going to pipe the show running configuration to show run dot cfg.
So I'm going to tap show run pipe that configuration or push that configuration to the to a file in
flash.
So DA shows me that that file exists in Flash.
And what I can do here is type more, show run, see cfg.
And notice there's the file that I'm reading from Flash.
But how about this?
Let's do a show IP route.
And actually let's push that to show ip route txt.
So that file once again exists in the flesh of the router.
So what I'll do here is use cat.
So cat ip route text.
Cat just shows you the whole file in one go.
Notice there are a lot of routes.
Here.
So I'm may have preferred to use more.
More?
Shows me one line at a time rather than just show me the whole output in one go.
So while we're waiting for that, let's go back into Linux.
So clear.
Liz shows me the file here.
Catch show run.
Now shows me the running configuration in one go.
So that was a bit quick.
So notice catch show run whole configuration in one go.
I could do more.
Notice that shows me one page of configuration at a time.
Same here.
Rather than using cat, I may prefer to use more.
So I'm reading that file from Flash.
But what it allows me to do here is press Q to quit.
So rather than seeing all that output, I can just see one page at a time and then quit.
So I could go on for a long time here.
Notice we are using classic EOS here and I was able to use these commands by just running the shell
processing full command.
Now in other videos, I'm going to show you even more powerful ways of leveraging this to make you stand
out from the competition as a network engineer.
So learn this stuff and hopefully it will save you a lot of time in the real world.
It will help you become a better network engineer, and it will help you differentiate yourself from
others in the industry.
Now, hopefully this is going to change the way that you work.
Hopefully it's going to separate you from others that you work with or others in interviews.
Hopefully it will show people that you work with, that you're serious, and that you are an excellent
network engineer.
Once again, if you don't mind, please subscribe to my YouTube channel and please like this video.
I'm David Bumble.
I want to wish you all the very best.