VLAN Trunking
A trunk is a link that carries traffic for more than one VLAN. Trunks multiplex traffic from multiple VLANs. Trunks connect switches and allow ports on multiple switches to be assigned to the same VLAN.
Two methods of identifying VLANs over trunk links are:
Inter-Switch Link (ISL) – A Cisco proprietary method that encapsulates the original frame in a header, which contains VLAN information. It is protocol-independent and can identify Cisco Discovery Protocol (CDP) and bridge protocol data unit (BPDU) frames.
802.1Q – Standards-based, tags the frames (inserts a field into the original frame immediately after the source MAC address field), and supports Ethernet and Token Ring networks.
When a frame comes into a switch port, the frame is tagged internally within the switch with the VLAN number of the port. When it reaches the outgoing port, the internal tag is removed. If the exit port is a trunk port, then its VLAN is identified in either the ISL encapsulation or the 802.1Q tag. The switch on the other end of the trunk removes the ISL or 802.1Q information, checks the VLAN of the frame, and adds the internal tag. If the exit port is a user port, then the original frame is sent out unchanged, making the use of VLANs transparent to the user.
If a nontrunking port receives an ISL-encapsulated frame, the frame is dropped. If the ISL header and footer cause the MTU size to beexceeded, it might be counted as an error.
If a nontrunking port receives an 802.1Q frame, the source and destination MAC addresses are read, the tag field is ignored, and the frame is switched normally at Layer 2.
Configuring a Trunk Link
Ports can become trunk ports either by static configuration or dynamic negotiation using Dynamic Trunking Protocol (DTP). A switch port can be in one of five DTP modes:
Access – The port is a user port in a single VLAN.
Trunk – The port negotiates trunking with the port on the other end of the link.
Non-negotiate – The port is a trunk and does not do DTP negotiation with the other side of the link.
Dynamic Desirable – Actively negotiates trunking with the other side of the link. It becomes a trunk if the port on the other switch is set to trunk, dynamic desirable, or dynamic auto mode.
Dynamic Auto – Passively waits to be contacted by the other switch. It becomes a trunk if the other end is set to trunk or dynamic desirable mode.
Configure a port for trunking at the interface configuration mode:
(config-if)#switchport mode {dynamic {auto | desirable} | trunk}
If dynamic mode is used, DTP negotiates the trunking state and encapsulation.
If trunk mode is used, you must specify encapsulation:
(config-if)#switchport trunk encapsulation {isl | dot1q |
negotiate}
Native VLAN with 802.1Q
If you are using 802.1Q, specify a native VLAN for the trunk link with
the command:
(config-if)#switchport trunk native vlan vlan no
Frames from the native VLAN are sent over the trunk link untagged. Native VLAN is the VLAN the port would be in if it were not a trunk, and it must match on both sides of the trunk link. VLAN 1 is the default
native VLAN for all ports.
VLANs Allowed on the Trunk
By default, a trunk carries traffic for all VLANs. You can change that behavior for a particular trunk link by giving the following command at the interface config mode:
switchport trunk allowed vlan vlans
Make sure that both sides of a trunk link allow the same VLANs.
Verifying a Trunk Link
Two commands you can use to verify your trunk configuration are:
#show running-config
#show interfaces [interface no.] switchport | trunk
Using the trunk keyword with the show interfaces command gives information about the trunk link:
# show interfaces fastethernet 0/1 trunk
Port Mode Encapsulation Status Native
vlan
Fa0/1 desirable n-802.1q trunking 1
Port Vlans allowed on trunk
Fa0/1 1-150
<further output omitted>
Comments
(There are currently no comments for this post.)