(exciting music)
- So let me go back to GNS3 here.
So I've already preconfigured all of this stuff.
Let me go in and a couple of things here.
If you're using GNS3 like I am,
GNS3 is great for routing stuff.
Pretty much anything you'd ever need to do with routers,
all the way up to pretty much the
CCIE level, you could do in GNS3.
Switching, it's kinda weak.
It, there's a lot of switching
features that you can't do.
Most of what you need to know at the CCNA
level, you can do with switches on GNS3,
not everything but most everything.
But once you get to the CCNP level,
that's where GNS3 switching is really subpar.
And it's not their fault.
It's really the fault of, ya know, what
software images are available to put into this program.
But that being said, I'm not gonna really show
you the router's configuration.
I'll show you that in a second.
Let me just start with the switches configuration.
Let's go here to EtherSwitch One
and get rid of some of this other stuff.
These are the hosts.
Okay, so here in EtherSwitch One,
because this is, what this really is,
just so you know, 'cause you're gonna see
a different command here that you don't normally use.
Cisco sells some routers and when it comes to
routers and switches, this is common.
When you're buying a router or switch
at a very high level, you have a choice.
You can buy what's called a fixed configuration
chassis, what that means is you're buying one box,
all the interfaces or all the ports are
on that box and that's what you get.
So for example, let's say you bought a switch
that's a fixed configuration chassis that has 24 ports.
Well, let's say later on as your network grows,
all of a sudden, you've used up all those 24 ports.
You don't have any options, you gotta go buy another switch.
There's nothin' you can do to that switch to
give it more ports, you've used up everything.
Whereas in a modular chassis, whether it be
a router or a switch, basically what you're buying
is the box and then you get to choose what
sort of modules you want to plug in there.
Like maybe on a modular switch, you say, okay,
this switch could technically have modules inside of it.
Right now, I'm only gonna spend money to buy one module
that's a 24 port switching module.
And then if I run out of ports, I'll order
from Cisco another module and in that same chassis
I'll slide in another 24 port switching module.
Or in the case of a router, you can say, well,
right now all I need are land modules.
But later on, I'm gonna pull out one of those
land modules and I'm gonna put a wide area
networking module in there or a firewall
module or something like that.
So modular switches and routers are better
from the standpoint of scalability.
You can start small and then purchase more
things that you can plug in there,
sort of like your laptop, right?
When you buy your laptop, it's got additional ports
in it that are probably not used for something.
But later on, you can stick a DVD drive in there,
maybe stick in another Ethernet card if you wanted to.
Same thing with modular chassis.
Of course, the down side is, the modular chassis
are typically more expensive for that very reason.
What does that have to do with this?
Well, Cisco sells some routers that are modular
routers and some of the modules you can put in
there if you want to are switching modules.
It's actually a little module you can slide in
that's got like 16 ports or eight ports
and it's like a little self-contained
switch that's inside the router.
And that's what this is right here.
This EtherSwitch is actually a router
that's got a switching module inside of it.
Why is that important?
Because it doesn't really support all the
commands that real switches do,
that just something that was built as a switch,
it doesn't support all the commands.
And some of the commands that you would use
for like configuring or showing things
are a little bit different than if I was on a real switch.
So for example, review question, what command
would I type in a normal switch to see what vlans I've got?
Well, hopefully you said show vlan
and you'd be absolutely right.
But in this particular switch because it's
really a router with a switch module inside of it,
the show vlan command doesn't work.
That is a valid command on a real switch.
And on the CCNA Exam, that's what they would
expect you to know, the show vlan command.
But on this, it's actually show vlan-switch.
It's a little bit different.
So you can see here, here's my default vlan.
And according to my diagram, I'm on switch one
so FastEthernet 1/1 should be in there.
And it is and here's vlan2 that I configured.
And FastEthernet 1/2 is in that.
And you can see right here that is correct.
Now what about 1/3 and 1/15?
Both of these are configured as vlan trunks
so they are in multiple vlans.
So let's just take a look 1/15 as an example.
If you look through here, 1/15 doesn't show
up anywhere in this output.
It's not here because this only shows you ports
that are configured as access ports
that are in one vlan and one vlan only.
That's why 1/15 and 1/3 don't show up here.
Because those interfaces are trunks.
So to verify that, show interface trunk.
And now you can verify, okay, 1/3.
I used the switch port mode trunk command
which forced the interface to become a trunk.
It didn't have a choice in the matter.
That's why the same mode is on.
And later on, we'll see that there are other
ways you can tell a port to dynamically become a trunk
if certain parameters are exchanged between switches.
But that's not what I did here.
And you can see it's using 802.1q Encapsulation.
And the Native vlan is one.
Let's take a look at the configuration.
How would I look at the configuration of a router
or a switch, what would be the command I should type in?
Show run or the long command is show running-config.
Just keep hitting my space bar to get to the next level.
And here we see, here's my first trunk.
All I typed in was switchport mode trunk.
As a matter of fact this EtherSwitch module
does support this switchport trunk encapsulation.1q command.
It let me type that in but it defaulted to that.
It doesn't even support ISL so that's why we
don't even see it here in the output.
Swithport mode trunk is all I hate to do.
And I had to make sure that the interface was up.
And I did no shut which was also the default.
That's why we don't see that here.
And that's one thing about Cisco IOS.
If you type in a command that's already the
default behavior most of the time, you won't
see it in the running config.
Mostly what you see in the running config
is non-default commands, not always.
Okay, and so that's how we configured the switch.
If you are trunking to a router,
it's a little bit different.
Now the configuration on the switch side is still the same.
On FastEthernet 1/3, it's switchport mode trunk.
On 1/15, no different.
Let me show you a little shortcut here.
Instead of doing show run, I can say
show run Interface FastEthernet 1/15
and it only shows me that portion of the configuration.
Just that interface, I don't have to scroll through
everything so that's a nice, little shortcut.
So you can see, that's configured exactly the same way.
And the other side of the link, the switch on the other side
switch two, he's also configured that way.
Now for router, it's a little bit different.
I'll just show you real quickly
here the router's configuration.
So in the router's configuration, I didn't
really do anything on his main interface.
Remember how I talked about, when we were
talking about telnet and we were talking about VTY lines,
I said how on routers and switches, sometimes
they create these sort of imaginary logical
interfaces as like place holders for things?
We also talked about that when we did our
switched virtual interface, our interface vlan one
in the last video, I believe.
When we said, okay, where do I put an IP address
on a switch, oh interface vlan one.
Well, here are a couple of additional logical interfaces.
These are called sub-interfaces,
where you have some interface number
and then a dot and then some other number.
So I made these up from scratch.
These did not exist before.
And on a router, this is how you take a router
because if we look at our topology diagram,
where is it, right here.
Just like this interface here,
this interface here has to carry multiple broadcast domains.
Well, this link has to carry multiple broadcast domains.
Now, the switches, they don't really care about layer three.
All they care about is layer two.
But the router, he does care about layer three.
He is a host, remember, the router's interface
is a host just like a laptop is in a network.
And he has to have an IP address in a network.
But here we have sort of an interesting challenge
because we actually need this one interface
to participate in two networks, the 111 and the 222.
And normally, an interface can only be in one network.
So how do we assign more than one subnet to one interface?
Well, what we can do is we can trick the router.
We can say, hey router, I want you to make believe
that you have more than one interface here.
And that is what sub-interfaces are.
So by creating this interface out of thin air,
I've said, okay, on FastEthernet0/1,
I'm actually gonna divide you up into two interfaces.
0/1.1 and 0/1.2, now the number after
the dot could've been anything.
I could've said 0/1.55 and 0/1.19.
It's just the fact that there's a dot followed by
a number that tells the operating system,
okay, this is a new, logical interface that's being
created and it's associated with this physical interface.
I just chose to use .1 because to me it made sense
that this interface would be used for vlan1
and this .2 interface would be used for vlan2.
And then once I made my sub-interfaces, the router didn't
know what I wanted to do with these sub-interfaces.
It knew I was gonna put different subnets on there,
which I did with my IP addressing.
But I had to tell the router, hey, this sub-interface right
here, you need to be able to process tags, 802.1Q tags.
And so when an Ethernet frame comes in with
an 802.1Q tag and the vlan number inside there,
it says vlan2, the router says, oh okay,
this is a sub-interface that's gonna deal with that.
And when an Ethernet frame comes in with no tag,
which is on the native vlan,
this sub-interface is gonna deal with that.
So you see this extra work,
you don't have to do on switches.
Switches automatically know, they know
what vlans they've got and they know whatever
vlan you configured is gonna be traveling across that trunk.
But the router, he doesn't know what vlans exist
so I actually have to tell him with this
encapsulation dot1Q command.
So that being the case, let's finish up here
with taking a look at some of these tags.
So let's start with, let's open
up some sessions with my PCs.
Okay, so PC1, I'm gonna have him ping PC3.
Now PC3 here, show IP, so in the context of GNS3,
I'm using something called the virtual PC simulator.
VPCS and that's actually something that's built into GNS3.
It comes with it by default.
And like it looks like, it's a great little tool
for a simulated host here, sorta like a virtual PC.
So PC3 is, let's see here, 1.1.1.3
and from PC1, I should be able to ping that.
Yup, I can ping it.
Now, let's go ahead and start a sniffer trace
and the way I did this in GNS3 is I just right
clicked on the link and I clicked Start capture.
And yes, I wanna use FastEthernet1/15 on EtherSwitch 1.
Okay, so Wireshark is starting up right here.
Okay, there it goes, so while it's doing its thing,
let's do that ping again, alright so there goes my ping.
And PC4 is 2.2.2.3 so I'll ping that from here.
That ping was successful.
Okay, let's stop our sniffer trace.
And in wire, you can see here in Wireshark,
I'm getting a lot of stuff.
We haven't talked about spanning tree.
Spanning tree is actually a protocol you
learn at the ICND2 level so I'm not
gonna be talking about it in this series of videos.
But in Wireshark, if you wanna filter something out,
you say, okay, I wanna filter all this garbage.
I don't want to see this.
Just click on the frame and in this particular case,
I'll click on where it says Spanning Tree.
I right click and then as I right click I'll do
Apply as Filter and I'll say Not.
In other words, I don't wanna see stuff that matches this.
And it filters it out.
Okay, so before we take a look at that in depth.
So when vlan1, when PC1 pinged PC3,
that was going across vlan1 and that's the native vlan,
by default so we should not see
any 802.1Q tags in those pings.
So here we go, I'll click on it.
And you can see if I expand the Ethernet header,
you can see it's a regular Ethernet header.
You've got the Destination Mac, Source Mac
and then the Type Code and this particular Type Code,
it's carrying the number for IP version 4.
That is the reserve number for IPv4.
That probably is something you should memorize.
That in an Ethernet frame, the Ether
type value or 0x0800 is for IP version 4.
So no mention here or any kind of a tag
which is what we would expect.
Now, if I go back, when I ping from PC2 to PC4,
that ping came in on vlan2 and so the switch said,
okay, in order for me to put that across the trunk,
I have to apply an 802.1Q tag to that
indicating that this frame belongs to vlan2.
And we will see that in here.
I'll just click on one of those and there you can see it.
Ethernet two and look, the Type Code is now 0x8100.
That is the reserved value for an 802.1Q tag
and here is the tag right here.
If I open it up, you can see the fields.
There is a Priority field if you want to do quality of
service, not something you really
learn about at the ICND1 level.
Canonical and Format Identifier, don't worry about that.
No one's ever gonna ask you what that field is.
And then here, you can see, is our vlan identifier.
Vlan 2, it contains the number two.
So that concludes this section on vlan trunks.
(exciting music)