- [Narrator] Now that we've taken a look
at the theory of VTP.
Let's check out the configuration.
In this example, let's say that using this topology,
we want switches, SW1 and SW2 to be in server mode.
Switch SW3 we want it to be in client mode.
So, let's go into switch SW1.
And in global configuration mode, I'm going to say VTP mode,
and here we see our context-sensitive help,
and I'm going to set the mood to server,
and it probably already is a server by default,
but let's see.
Yeah, it says the device is already a VTP server.
Now let's set the VTP domain
and the domain needs to match among all the switches
that are going to be exchanging VTP information.
And I'll say VTP domain,
and we'll call this encore, let's press Enter.
And it looks like I've already set
the domain to encore.
And for security purposes, let's set up a password.
That way, somebody is not going to add a switch
into our topology and maybe accidentally
or intentionally override our switches VLAN databases
because they would have to have a matching password.
And to set the password, I'm going to say VTP password.
And I'll give a password
of capital S three C-R-E-T.
Not terribly secure, but easy to remember
for a lab environment.
So, I've sort of spelled that secret there,
and that's going to be our password.
And I also want to turn on VTP pruning.
I'll say, VTP pruning,
and let's talk about what that means.
If you think about a trunk, about a fault,
it carries traffic for all VLANs.
And if a switch is trying to afford a frame
to the appropriate destination,
if it doesn't know that destination,
then it's going to flood that frame out of all other ports,
other than the port the frame came in on
including flooding it over trucks.
And that means that broadcast, multicast,
unknown unicast traffic for a VLAN,
it's going to flow over all of our trunks.
Well, what if a destination switch on the other end
of my trunk doesn't have a member of VLAN 100 let's say?
Do I really want to send VLAN 100 broadcasts, multicast
and unknown unicast traffic over that other switch?
Probably not, that's going to be sort of a waste
because there's nobody that's a member of VLAN 100
in this example on that foreign switch.
So by turning on VTP pruning, we can intelligently say,
I'm only going to be sending this broadcast multicast,
and unknown unicast traffic over a trunk,
if the receiving switch has a member of this VLAN.
So, we're going to turn on VTP pruning,
and I'm going to set VTP version two on the switch.
That's really commonly used in today's networks,
even though version three is available and let's end.
Let's take a look at our configuration,
I'll say show VTP status.
And notice that this switch is capable
of running versions one, two or three
but currently we're running version two.
The domain name is encore, pruning is enabled
and we see that we're in server mode,
and our configuration revision number is 14.
Remember, when everybody in the topology
is in a steady-state,
everybody's configuration revision number should match.
And we see the MD5 hash of my password.
And let's go over to switch SW2
and give nearly an identical configuration.
We'll go into global configuration mode,
and I'll say the VTP mode is server.
The VTP domain is encore.
The VTP password
is capital S three C-R-E-T.
We want to enable a VTP pruning,
and let's have a matching version of version two.
Let's look at our status, I'll say show VTP status,
and by the way, I've already set up trunking
between over switches,
so, VTP advertisements can flow over these links.
And we see that we have what appears
to be a matching configuration revision number.
We've got a 14 here, if I go look at switch SW1
it was also 14.
So, we should agree on what our VLAN database is.
Let's see, I've got
VLANs that I've added of engineering and sales.
What about switch SW2?
If I do a show VLAN brief.
Do I have a matching set of VLANs?
I sure do.
And finally, let's go configure switch SW3
with one slight difference, let's set this to client mode.
In global configuration, I'll say VTP mode client.
And I was already set to client mode on this switch
from our previous demonstration.
I'll say my VTP domain is encore.
I need to have a matching VTP password.
Let's turn on pruning,
and when I try to set the version notice what happens.
If I say VTP version two it says,
nope, not allowed to do that
because you're in client mode unless
we were running VTP version three
and we're not, let's end.
Oh, and it's further evidence that we're in client mode
check this out.
If I try to create a VLAN, if I say VLAN,
let's say 500 is it going to work?
Nope, says you're not allowed to do that
because we're in client mode.
Have I learned VLANs though?
If I do a show VLAN brief.
I know about the sales and engineering VLANs.
Now let's create a new VLAN on switch SW1
and make sure that it's learned on switches SW2 and SW3.
So, let's go back to one of our server switch
which use, again, we can have more than one server switch.
And on switch SW1, I'm going to say,
let's create VLAN 300
and I'll give it a name of VPP_test.
Lets end that,
make sure we've added it to our VLAN database.
I'll do a show VLAN brief command.
There it is we've got a VTP test VLAN.
And the next question is, did this new VLAN get propagated
by VTP down to switches SW2 and SW3?
Let's find out.
Let's go down to switch SW2
and we'll say, show VLAN brief.
Does it have VLAN 300?
It does right there.
What about switch SW3 that was in client mode,
if I do a show VLAN brief.
Yes, it has also learned about this new VLAN.
Let's take a look at the VTP status on SW3,
we'll do a show VTP status command.
And let's check out the configuration revision number.
It's 15 does that match switch SW2?
Let's do a show VTP status.
Yes, it does.
What about SW1 show VTP status is it 15?
It is.
So, now we're in a steady-state environment.
Everybody in the topology,
everybody in this VTP domain specifically agrees on
what the VLAN database should look like.
And that's all, look at how we configure VTP.