- [Instructor] It is important for you to understand
how VLAN traffic is forwarded between switches and a router.
This requires a port on the switch
to be configured as a VLAN trunk.
Trunk ports allow devices attached to different switches,
but assigned to the same VLAN group, to communicate
with one another across the entire switch topology.
Trunk ports are not a member of any of the configured
VLANs on the switch.
Additionally, trunk ports are used to forward traffic
from switch to switch for all configured VLANs.
I'm now going to show you how to create a trunk port
on the west switch, but this requires that I have another
switch in my typology.
So I'm going to go ahead and click on the little icon
for the switch at the bottom of the screen.
I'm going to go ahead and grab another 2950 switch,
drag it to my typology.
I'm going to click on the lightning bolt,
and then I'm going to click on the icon
for the crossover cable.
So I'm going to go ahead and connect these two switches
on their FastEthernet/24 ports.
I'm just using the last available port,
that's the best practice.
You can see that the link will come up
on these two switches.
I'm going to go ahead and rename this switch,
just as a best practice, I'm going to call this W_Switch2.
I'm going to go ahead in the command line,
enable, config, T, hostname, W_Switch2, Control + Z.
Go ahead and close this window,
and you can see that that connection
between the two switches is now active.
I'm going to go ahead and bring up the W_Switch,
I'm going to expand the screen, password is console0,
enable, secret one, configure from the terminal session,
and then the port that I want to create
as a trunk is Fa0/24.
This is an interface command, so I'm going to go into
interface fastethernet/24,
and the command is simply switchport mode,
I'm going to use a question mark here.
You can see that I can set my ports
to access dynamic or trunk.
Dynamic means it's going to auto-sense, but in this case
I want to just manually configure it as a trunk port,
so I'm going to choose the command trunk,
that sets my port as a trunk port.
If I do a Control + Z and I do a show vlan brief,
you'll see that port 24 is now gone.
It is not associated with any of my VLANs, it was in VLAN1.
If I issue the command, show interface trunk,
you will see that it shows me that Fa0/4 is on,
and that it is trunking for all of the VLANs,
1, 10, 20, 30, and 100.
Finally, if you want hosts in different VLANs
to communicate with one another,
you would also need to configure the port on the switch
that attaches to the west router as a trunk port.