In a separate Nugget, we discussed the concepts
of an 802.1Q ethernet trunk.
And in this Nugget, I'd like to walk you through step-by-step
how to configure the ports on switches to behave as a trunk.
We get to leverage delivers the same topology that we used when
we discussed the concepts, so our primary job here is to go
into the configuration on switch-1 and switch-2 to these
two ports--
gig 0/0 on switch-1 and gig 1/0 on switch-2 ,
and specify that we want to use 802.1Q tags and that protocol
for trunking.
And in addition to specifying the protocol we
want to use for the trunking, we also
want to tell these two port specifically
that they are to behave as trunks.
And what I thought would be also fun
is to show you the configuration for the access ports as well.
So we'll do the whole thing in this demonstration, which
includes specifying that gig 0/1 and 0/2 on switch-1
are access ports in VLAN 100, as well as switch-2's gig 1/1.
And then we'll configure gig 0/3 on switch-1, as well as gig 1/2
and gig 1/3 on switch-1 and 2 respectively
that those ports should be associated with VLAN 200.
We'll also specify on the respective switches that
on these ports connected them together that they should use
802.1Q as the protocol and that they should behave as trunks.
And so with the intent of this not
being just a typing exercise, let
me walk through all of the commands,
and then we'll go ahead and put them into the switches.
On switch-1, we're going to go ahead
into configuration mode on the Cisco switch.
Our first two access ports on switch-1
are going to be gig 0/1 and gig 0/2.
So we'll configure those two access ports
by going into interface configuration mode for both
of them at the same time and using the command switchport
mode access.
This specifies the access port.
Then we'll associated those access ports with VLAN 100.
Then we'll exit out of that range configuration
mode for those interfaces.
And, then we'll go specifically over to gig 0/3
and do the same command there-- switchport mode access,
but on it, will specify that it's in VLAN 200.
Then exiting that interface, we'll
go over to interface gig 0/0, which
is the connection between switch-1 and switch-2.
And we'll specify that we want to use
dot1Q as the trunk encapsulation with the command switchport
trunk encapsulation dot1Q and then the second command
switchport mode trunk that takes out any ambiguity that we
want this port to be a trunk.
And then we can exit out of configuration mode
and use the wr command which, is the equivalent of copy running
config to startup config.
And the benefit of that is so that when the switch reboots,
it'll remember the configuration that we're providing it
right now.
And then as we scroll down and take a look
at the commands for the second switch, they're right here.
And they're all very similar commands.
Working from the left to the right on switch-2,
we're going to configure gig 1/0 to use dot1Q encapsulation
and to tell it to go ahead and act as a trunk.
We'll also going into gig 1/1, configure
it to be an access port associated with VLAN 100,
and then we'll go to the interfaces gig 1/2 and 1/3
to tell us which of those two ports
are access ports and then also to associate VLAN 200
with those access ports.
Then we'll end to take us out of configuration mode on the Cisco
switch, and we'll do a wr for write
to save that configuration so that when it reboots,
the switch will continue to remember the configuration
that we're giving it right now.
So I'll move these commands over a little bit.
And let's scroll up, and we'll grab
all the commands for switch number 1 first, right click,
Copy those.
And then go to the interface for switch number
1, right click, which will go ahead and paste that all in.
So there's switch-1's configuration.
And let's go over to switch-2 and repeat the process.
So here on switch-2, we'll go get
switch-2's configuration, right click, put it in our clipboard
in our buffer, and I'll simply right
click here in the interface for switch-2, which
we'll go ahead and paste it in.
And I'll finish it off by putting
in the wr to save the configuration to the startup
config.
And it is done.
Now the big question might be, OK Keith, we've
configured some access ports.
We configured the trunk ports.
How do we verify it?
Great question.
We can verify the access ports that we configured-- here
we're on switch-2-- we can verify those by using
the command show VLAN brief.
And that confirms that VLAN 100 has associated with it gig 1/1
that port, and that gig 1/2 and 1/3
are associated with VLAN 200.
So we're getting access ports.
Perfect.
Now notice here, as we show our VLAN information,
it's not showing us in our list of ports,
it is not showing us gig 1/0.
And that's because gig 1/0 is not acting as an access port.
It's acting as a trunk.
And we have a separate command that we can use to see that.
And that command would be show interfaces,
or you can use a shortcut of int space trunk, and press Enter.
And this allows us to verify that gig 1/0 is currently using
the encapsulation of 802.1Q and is in the current status
of trunking, which is great news.
And beyond just allowing that range of VLANs
to go across the trunk, down here
it's showing us that it's actively forwarding
and allowing VLAN's 100 and 200, which
we're concerned with in our typology,
to be allowed over the trunk.
Any traffic from those VLANs as they go over the trunk are
going to get an 802.1Q tag so that the switch that receives
that information over the trunk knows exactly which VLAN
the incoming frame belongs to.
In this Nugget, we walked through the process of both
creating and verifying an 802.1Q trunk going between two Cisco
switches.
I hope this has been informative for you,
and I'd like to thank you for viewing.