Configure trunk ports

To enable inter-switch VLAN communication, you need to configure switches to use VLAN trunking on the links between them. To configure a trunk port, the switchport mode trunk interface mode command is used. This type of interface can carry traffic of multiple VLANs. If your switches support both ISL and 802.1q frame tagging protocols, you also need to use the switchport trunk encapsulation {dot1q | isl} command to define the type of trunking.

Consider the following example:

trunking explained

Ports Fa0/10 and Fa0/11 on SW1 and Fa0/5 and Fa0/6 on SW2 are connected to end hosts and should be configured as access ports. However, the link between the switches needs to carry traffic of multiple VLANs and must be configured as trunk. Here is how we can configure ports on SW1 and SW2 to support trunking:

SW1:

switchport mode trunk

SW2:

switchport mode trunk command

Now the link between SW1 and SW2 can carry traffic from both VLANS – VLAN5 and VLAN10. You can verify that an interface is indeed a trunk interface by using the show interface Fa0/1 switchport command on SW1:

show interface switchport command

Because the switches we’ve used in the example above don’t support the Inter-Switch Link (ISL) protocol, there was no need to define the type of trunking with the switchport trunk encapsulation {dot1q | isl} command. 802.1q is the only supported trunking protocol on newer Cisco devices.

Subscribe to our Newsletter

Like us on Facebook

top
Geek University 2019