96 Cisco LAN Switching Configuration Handbook
Note Not all switches enable you to negotiate a trunk encapsulation setting. The
2900XL and 3500XL trunks default to isl, and you must use the switchport trunk encap-
sulation command to change the encapsulation type. The 2950 and some 4000 switches
support only 802.1Q trunking and provide no options for changing the trunk type.
c. (Optional) Specify the native VLAN:
Note Cisco Discovery Protocol (CDP) version 2 passes native VLAN information
between Cisco switches. If you have a native VLAN mismatch, you see CDP error messages
on the console output.
Specifying VLANs to Trunk
By default a trunk link carries all the VLANs that exist on the switch. This is because all
VLANs are active on a trunk link; and as long as the VLAN is in the switch's local data-
base, traffic for that VLAN is carried across the trunks. You can elect to selectively
remove and add VLANs from a trunk link. To specify which VLANs to add or remove
from a trunk link, use the following commands.
(Optional) Manually remove VLANs from a trunk link:
1.
(global) interface type mod/port
(interface) switchport trunk allowed vlan remove vlanlist
The other option when choosing a trunk link is the encapsulation method. For
Layer 2 IOS switches, such as the 2900XL or the 3500XL, the default encapsula-
tion method is isl. You can change from the default with the switchport trunk
encapsulation command. For integrated IOS switches, the default encapsulation
is negotiate. This method signals between the trunked ports to choose an encap-
sulation method. (ISL is preferred over 802.1Q.) The negotiate option is valid for
auto or desirable trunking modes only. If you choose on as the mode or if you
want to force a particular method or if the other side of the trunk cannot negoti-
ate the trunking type, you must choose the option isl or dot1Q to specify the
encapsulation method.
(global) interface type mod/port
(interface) switchport trunk native vlan number
For switches running 802.1Q as the trunking mechanism, the native VLAN of
each port on the trunk must match. The native VLAN on IOS devices is config-
ured for VLAN 1, so the native VLAN does match. If you choose to change the
native VLAN, use the switchport trunk native vlan command to specify the
native VLAN. Remember that the native VLAN must match on both sides of the
trunk link for 802.1Q; otherwise the link will not work. If there is a native VLAN
mismatch, Spanning Tree Protocol (STP) places the port in a port VLAN ID
(PVID) inconsistent state and will not forward on the link.