Couple of things to note:

You might want to read my previous article on VLANs – How to Configure VLANS on a Cisco Switch Download the Cisco Packet Tracer Trunking Lab In this example below switch “s0” will be a trunk server and “s1” will be a client. .1 is plugged into s0 port 1, .2 is plugged into s0 port 2, .3 is plugged into s1 port 3, and .4 is plugged into s1 port 4 The two switches are cross connected with at Port 24 on each switch. VTP domain is jaredheinrichs VTP password is: JARED

Trunking

Trunking is the process of allowing VLAN communication over physically connected switches. In order for a switch receiving a frame to know the destination VLAN of that from, a tag is placed on the frame indication the destination VLAN by the transmitting switch (ie. Frame tagging).

Cisco has it’s own (Inter-Switch Protocol) ISL is Cisco proprietary. It encapsulates every frame before it crosses the trunk and doesn’t recognize the native vlan. Most of the newer Cisco switches don’t even allow you to configure this on them any more. Dot1Q is much better protocol. IEEE 802.1Q or dot1q – Is the industry standard. Only get’s 4-byte header added onto the frame. Won’t even do that if the frame is destined for the native vlan.

To view the trunks and what types of Encapsulation it is using (ISL vs IEEE 802.1Q) type:

show interface trunk

To enable a trunk type:

conf t

int fast 0/1 <— Enter the port you want to enable the trunk on.

<— Enter the port you want to enable the trunk on. switchport mode trunk

To disable a trunk just turn the port back to an access port.

conf t

int fast 0/1 <— Enter the port that the trunk has been enabled on.

<— Enter the port that the trunk has been enabled on. switchport mode access

There are 5 options for trunking:

On – The switch port is unconditionally trunking, whether the other end of the trunk likes it or not. Off – The port will NOT trunk with the remote partner under any circumstances. To turn the port off you need to change the port to an access port. Auto – Means it will trunk… BUT the other side has to ask for the trunk first! If the other side is in “Desirable” or “On” Mode. The trunk will form. If both sides are in Auto… you will NOT get a trunk! Desirable – This is the default port type on Cisco 2950’s. It means it is actively attempting to trunk. If the remote port is on, auto or desirable the two will form a trunk. Nonegotiate – means port will go into permanent trunking mode but Dynamic Trunking Protocol (DTP) frames are not sent across the trunk.

Now that we’ve got the switchs trunking you need to let them exchange VLAN info. To do this we will need to configure VLAN Trunking Protocol (VTP).

VTP (VLAN Trunking Protocol)

VLAN Trunking Protocol (VTP) is a Cisco proprietary protocol that allows switches to advertise VLAN information between other members of the same VTP domain. VTP allows a consistent view of the switched network across all switches. VTP servers will know about every vlan… Even VLANs that have no members on that switch. VTP server sends out advertisements every 5 minutes and immediately upon and change.

Server Mode – VLANs can be created, modified and deleted. The server will make this change to every single switch in the domain. Keeps info in “non-volatile” memory.. ie. it won’t be lost on restarting the machine. Client Mode – VLANs cannot be modified, created, or deleted. VTP clients must query the VTP server for the configuration from the server on reboot. Transparent Mode – It can FORWARD the VTP information to another switch. The switches will not process the VTP information. ie. It’s a switch onto itself but can forward VTP advertisements.

To change these modes you will need to run the commands:

conf t

vtp mode client or

or vtp mode server or

or vtp mode transparent

There are couple of things you need to do in order to make sure VTP works:

VTP domains need to match. The VTP names are case sensitive. So if one is named “JARED” and the other one is named “Jared” it will not work. By default the VTP domain is NULL.

You can’t configure VTP with only Clients.

If you use VTP passwords you need to make sure that the VTP passwords match (case sensitive).

To set the VTP domain on the switch you need to configure it on the switch. To do this you need to type:

conf t

vtp domain jaredheinrichs

To View the VTP Status:

show VTP status

VTP keeps track of revisions via the “configuration revision number”

To setup VTP password type these command on all switches:

conf t

vtp password JARED

Service password encryption do not encrypt the vtp password. The VTP password is not in the config. To see the VTP Password you need to use the command:

show vtp password

A newer version will be coming out that will encrypt the VTP password.

Configuring the Cisco Trunking Packet Tracer Lab

Ok here’s the config from start to finish We will start on “s0”.

conf t

int fast 0/1

switchport access vlan 2

int fast 0/2

switchport acces vlan 3

int fast 0/24

switchport mode trunk <– Because the other switch is set to “server” by default the trunk should be automatic. It will automatically get information about all the VLANS.

<– Because the other switch is set to “server” by default the trunk should be automatic. It will automatically get information about all the VLANS. exit

hit ctrl+c

vtp domain jaredheinrichs

vtp password JARED

show vlan brief <– Make sure the VLAN’s have been set. You should notice port 24 is not listed.

<– Make sure the VLAN’s have been set. You should notice port 24 is not listed. show interface trunk <— Should be using Dot1Q, and VLANs 1,2,3 should be set to use the trunk

<— Should be using Dot1Q, and VLANs 1,2,3 should be set to use the trunk show vtp status <— Confirm VTP domain, operating mode (Server) and # of VLANS

<— Confirm VTP domain, operating mode (Server) and # of VLANS show vtp password <— To confirm

<— To confirm wr <—Let’s save the config

We’re done with the first switch. Let’s move over to “s1”

conf t

show vtp status <— The domain jaredheinrichs should already be configured as well as the VLANs.

<— The domain jaredheinrichs should already be configured as well as the VLANs. vtp password JARED

show vtp password <—Let’s confirm the password has been set

<—Let’s confirm the password has been set vtp mode client <—Let’s change this from a server to a client. From now on, All settings will have to be configured on s0. All settings have to be synced dynamically to s1.

<—Let’s change this from a server to a client. From now on, All settings will have to be configured on s0. All settings have to be synced dynamically to s1. int fast 0/3

switchport access vlan 2

int fast 0/4

switchport access vlan 3

Hit Ctrl+C

show vlan brief

wr <—Let’s save the config

I hope this helps you figure out how to setup trunking on a Cisco switch. If you want more information here is a great article directly from Cisco