(electronic music)
- So at this point, you should hopefully feel
pretty comfortable with adding routers,
and switches, and frame relay switches
into your topology, into your GNS3 network.
So, you might be getting to the point
where you say, you know what?
I'd really like to add a host into my network.
I'd like to have a host for a variety of reasons.
Maybe to ping back and forth,
or to do some other types of testing.
Now, let's step back here for a second.
You might wonder, well Keith, why do I need a host?
I mean, if I just wanted to do ping tests,
or if I want to generate some,
just test access lists or something like that,
can't I just plug in another router
and ping from the other router?
Well certainly, you can do that.
But keep in mind one thing.
Anytime you plug a router into your topology
and then you start it, you're consuming
another instance of router memory.
If that software that that router's running
takes 500 megabits per second,
let's say it's a 7200 series router,
now you're just eating up a lot more RAM
in your laptop simply to have some device
that you can ping from.
So for here, for something like that
and a lot of other useful reasons,
I'd like to talk about the VPCS,
the Virtual PC Simulator that's included
as yet another built in node within GNS3.
Now, I've been using this quite a bit
throughout the various topologies,
and I've been promising you, well,
I'll get to it, I'll get to it.
Well now is our time to talk about it.
So, let's talk about it a little bit.
So first of all, this particular node is available
right here in the Browse End Devices section.
So, that's where you would find this.
So, click on that,
and then we're gonna be using VPCS.
So, you just drag and drop it on just
like you normally would.
Now these, unlike your built in Ethernet switches
and your built in frame relay switch and everything,
these you can turn on and turn off.
And notice that bu default, is deactivated.
It's turned off.
So, let me get rid of this one here.
So, I've already go three instances
of my Virtual PCs in this particular topology.
And, I wanna show you some of the real power behind this.
For example, let's start out with PC number two here.
And in this particular PC, I just wanna give
it a static IP address and mask,
and a static default gateway.
Real easy to do that.
So, just go ahead and double-click on it to open it up,
and this is what your console window will look like.
It actually has a pretty intuitive Help menu,
and I like it a lot.
I just type, for example, the question mark,
and you can see all the different options
are available to you here.
So in my particular case, I'll say,
well, I wanna add a static IP address.
Well, we can see from here that
IP is probably what I want to do.
IP what, what should I do?
IP and you can actually see, it gives you an example.
IP, the address, the mask, and then the default gateway.
So, my particular case if I want this guy
to be 4.4.4.1, I would just type IP 4.4.4.1/24,
and then this default gateway is 4.4.4.2.
So you can see, it's a little bit of a different
syntax than typing an IP address on a router's interface,
where you actually type IP address.
Here, you just type, as you can see.
Now, there's one.
Before I go any further with VPCS,
one very important thing you have to remember.
Let's think about routers for a second.
If you make a change in your router's configuration,
you're making a change in the running configuration, right?
So, what happens if you stop that router,
and you haven't saved those configs,
or you completely stop your project.
Anything in your running config that has
not been saved, is gone.
It's wiped out.
So that's why, as hopefully by this point in time
you know, with routers, you should always issue
the right memory command or the Copy, Run, Start
command after you make changes.
Well in a similar way, these Virtual PCs,
when you make a change so their configuration,
like I just did here, you have to save it.
If you don't, the moment you turn off that
Virtual PC or the moment you exit from your GNS3 project,
whatever you configured your Virtual PC for,
his settings will be gone.
It'll vanish.
So, how do we save his settings?
It's simply the save command.
And, that's all you have to do.
So, remember that with your Virtual PC to issue
the save command whenever you make a change.
So, that's a way of configuring a static IP Address,
mask, and default gateway.
What about over here, PC number one?
I wanna configure him as a DHCP client.
Well, this is another powerful thing
we can do here within VPCS.
So I'll just double-click on him,
so I'm on PC one, and now,
if I do ip ?, I can just do ip dhcp.
That's all I have to do.
Now, there are some options if you wish.
But if you just do ip dhcp, the moment you type that,
it will send out a DHCP discover message and attempt
to get an IP address.
Now, this guy already has an IP address,
as you can see, 1.1.1.4.
So, let's see actually how this works in action.
So number one, let's try releasing that address
and getting a new one.
So ip dhcp, and it says right here,
- r, actually -x is to release the address.
So, -x.
Sho ip, okay so now we have nothing, right.
So, -x was to release the address and now it's gone.
Still remember the DNS settings and the DHCP server,
but the address is gone.
So, how do I get a new one?
Just ip dhcp.
I'll explain to you in just a moment
what these letters mean.
And, there we go.
So, what did those letters mean that I was looking at?
This is actually showing you the DHCP decode.
This is the discover, and then you sent another discover,
and then he received a DHCP offer, then the client
sent out a DHCP request, and the transaction
was finished by receiving a DHCP acknowledgement.
And what's kinda nice is you can drill
down even further than that.
If I do ip dhcp ?, you'll see
I can also do -d to actually get a packet decode.
So, let's try that, ip dhcp.
I want to release my address in -d.
I want to see the decode of it.
And there we go, see?
So, he sent out a DHCP Option 53,
which is a release message.
And now, I can do ip dhcp -d
to actually watch the whole process in action.
So now, he's sending out requests.
There's the reply, and then we're done.
So, let's go up to the top here.
Okay, so the first message was a DHCP Discover.
Then he sent out another Discover.
And then, we received back the Offer,
and we can see all the information
that was included in that offer.
Then, we sent out a DHCP Request.
And the final step in the process was
a DHCP server sent back to us, a DHCP acknowledgement.
So, the -d option is very useful in this
particular case as far as DHCP is concerned,
if you want to actually watch the DHCP transaction.
Now, you might be wondering, now wait a second Keith,
who is the DHCP server in this particular topology?
Well, as you go through your CCNA studies,
one of the things they're gonna expect
you to know is how to configure a router as a DHCP server.
I'm not gonna go into the details of that right now.
I will show you that I've done that on router two.
If I show you his configuration,
right up here towards that top is
the DHCP configuration configuring this
particular router as the DHCP server.
So, that was already pre-done.
Let's get back to VPCS here for a moment.
So another powerful tool of VPCS, you can ping from it.
For example, I can ping from PC1 to PC3
to see if my routing and frame relay
and everything is set up.
So, let's see if PC1 can ping 5.5.5.1.
Let's see if it works.
We're getting a time out,
and then the ping is successful.
Now you might be thinking, okay Keith, but big deal.
I mean, I can ping from a router.
Why use this Virtual PC?
Well, the Virtual PC for one thing uses a lot less
memory than another router instance does.
So yes, you could have put a router
into your topology and had that router set up as
a DHCP client, and watched the DHCP transaction.
Sure you could have done that.
Sure you could ping from a router and watch that
and test your access lists and stuff.
But remember, that router is using up
a lot more memory in your laptop than VPCS is.
And, there's things you can do from here
within VCPS that you can't do within a router.
For example, look what happens when I type pin ?.
I can do UDP pings.
I can do TCP pings.
I can set any, if I'm doing a TCP ping,
I can set any of the flags within the Tcp header.
What if I'm testing quality of service,
and I need to have a packet generator.
I wanna see if my quality of service policers,
or our markers or stuff are working correctly.
Well, how would you create a packet generator
out of a Syscall Router?
It would be kinda hard to do.
A ping's not gonna do it.
But here with VPCS, I could ping via UDP,
and do it like every five seconds.
And then, I could use the -t option
to say, just keep going.
For example, ping.
Who do I want to ping?
5.5.5.1.
Now, I wanna do -2, because I want to be in UDP mode,
and then I wanna do -i, and I'll have those
pings go out every 10 milliseconds, that's -i.
And then, I'm gonna do -t.
Keep those pings going, until I stop them.
And, there they go.
Now, let's keep running with them for a moment.
I'll just keep letting them go.
Now if I go over my router, router two,
on router two, let's go ahead and check
out those that are going through him right now,
and they should be coming in Fast Ethernet 0/0
and going out Serial 2/0.
So if I had some sort of policer or something
else like that configured for quality of service,
maybe I applied it to Serial 2/0.
Let's see what the actual output rate is right now,
considering massive UPD pings are leaving on that interface.
All right, so let's go to router two.
Sho int ser 2/0.
We can see that right now, the output rate
is about 16,000 bits per second.
Now, I tried this before I did this recording
and if you wait, oh about five or six minutes,
this will get up, not too far.
It'll go, I waited for about three or four minutes
and it got up to about 64,000 bits per second.
But as far as just QOS testing is concerned,
that's fine, right?
If you just wanna create a simple policer
and try to police this down to three kilobits per second
or eight kilobits per second, you could do that.
But in order to test a policer, you have to have
some traffic coming in to police it.
So, this VPCS can be used to generate that traffic.
But, we're not done yet.
So, let me go back to my VPCS.
Control C, break out of it.
For you aspiring CCNA candidates,
you're gonna be learning about Cisco access lists.
How do you test your access lists?
Well certainly, you can create simple
access lists like blocking telnet or blocking ping,
because telnet and ping traffic is stuff you
can source from a router, right?
You can jump onto a router, and from that router,
you can type ping or telnet,
and then see if your access list works.
But if you want, what if you want to create
some more complex access lists that are maybe
blocking or permitting certain TCP ports or UDP ports.
In that case, how would you generate the traffic
to actually test that access list?
You could do it from right here within VPCS.
As an example, on router four here,
I have created an outbound access list
of Fast Ethernet 0/0.
And, that outbound access list is permitting
all traffic except UDP traffic going
to port number 99 as a destination.
Sh run.
So you can see here, I applied the access list.
There's the access group outbound.
And if I go to access list 101,
here is that access list.
Denying all UDP traffic from the 1.1.1 network
to the 5.5.5 network if the destination UPD
port number is 99, and then permitting everything else.
So, how would I test that?
Well, let's go back to my VPCS.
So, ping ?.
All right, so why don't we do ping 5.5.5.1,
that's the remote PC, and why don't we do -2 for UDP,
and then let's do -p.
And notice, it's a lowercase p here.
Very important that you select the lowercase p
for the port number, as opposed to
the uppercase P for protocol, which is
the IP protocol in the IP header.
So, I'm gonna do -p, and let's start out with the port
number that should be okay.
The access list should allow UDP pings
going to destination port 90.
Might get a timeout for one or two of 'em,
but then they should work.
There we go, so now, they're working.
Now, let's test to see if the access list works.
Let's change that destination port number to 99.
The access list is supposed to drop that.
And, it is.
We're getting communication administratively prohibited.
So, this is a great way to also test your access lists.
There's a lot of other things this can do here as well.
One other thing I wanna show you, which is really neat.
If you just do set ?, you'll see that one
of the options is the set dump option.
So, you can do set dump all,
and what this does, it's actually like doing
a debug packet all on a router.
This basically says now, any packet that this
PC sends out, whether it be a UDP ping,
a TCP ping, whatever, I wanna see all of it.
So for example, let's do that same UDP ping I just did.
See now, we get a lot more information about it.
We see the 3.3.3.2, so that's the actual address
of the router that has the access list on it.
We see the time-to-live, we see milliseconds,
we see the ICMP type code.
Okay, this isn't that big of a deal.
But, look at the real power of this.
What if I want to test out TCP?
Maybe, you just learned about TCP
and you wanna see, okay, I've learned
there's this TCP three way handshake.
I've learned a little bit about the TCP flags.
So, I wanna see some of that stuff in action.
Well, we can do this, ping ?.
Let's do ping 5.5.5.1.
Now remember, we still have the set dump all configured.
Right, that didn't stop, right there.
Set dump all.
It's sort of like a debug all in the world of VPCS.
So, we'll do ping 5.5.5.1.
Let's do -3 for TCP mode,
and why don't we do a, that's it.
Well, just do that.
But, TPC pings to 5.5.5.1.
Okay, so something is blocking this.
Can we ping 5.5.5.1?
Yeah, we can still ping it.
We just can't do a TCP ping.
Sequence two, 5.5.5.1 -3.
- 3 is supposed to be TCP mode, all right.
Well, let's go over to our routers
real quickly and troubleshoot this.
First of all, let me look at my access list on router four.
So, I'm denying UDP.
I'm permitting all other IP.
So, that should be all right, okay?
Let's now go over to the remote PC of 5.5.5.1,
and let's verify that he actually has an IP address.
And he is 5.5.5.1, and his default gateway is 5.5.5.2.
All right, that looks good.
So, there's no reason I can think of at this point
why those TCP pings were not functional.
Let's set the dump to off, set dump off.
That's sort of like an undebug all
in the world of Cisco terminology.
Ping 5.5.5.1.
Okay, well -3 should be TCP mode.
And just like a Cisco router, you can use
the up and down arrows on your keyboard
because it does keep a command history
of what you've done.
Ping 5.5.5.1 -3, and we'll do a count of three of them.
Okay, so that's working.
All right, so now let's turn the set dump back on.
Set dump all.
And, let's do that ping again.
Hmm, okay.
Well, set dump ?.
Ah, it's set dump detail.
That's what we're looking for, set dump detail.
That's like an IP packet detail.
All right, now let's do that ping again.
There we go, that's what I was looking for,
set dump detail is what we were looking for.
So, let's go ahead and after our ping is done here,
which I think it's done, set dump off.
And starting at the top,
we can see the detail we were looking for.
So, let's go all the way to the top of this TCP stream.
Okay, so here was when I did my TCP ping.
So here we see, source address, destination address.
Protocol is TCP.
Acknowledgement number, sequence number, flags.
This is the sync, this is the TCP sync.
Here is the incoming sync ack, and the ack.
So right here, these three show me all the details
of my TCP 3 way handshake.
Now, we can see the push bit and the ack bit are set.
So as you can go through this, you can get
a lot more information than you normally could
in just a regular debug IP packet within a router,
using the set dump detail.
And once again, set dump off was the way
that you turn it off.
So, there's a lot more that you can do with Virtual PCs.
I would encourage you to Google VPCS.
There's a lot of documentation out there on it.
But hopefully in this video, I've given you
a good starting point as far as some good ideas
as to ways you can use this to test
various features and protocols in your topology.
(electronic music)