VLAN trunking

802.1Q

The IEEE 802.1Q standard trunking protocol uses an extra tag in the MAC header to identify the VLAN membership of a frame across bridges. This tag is used for VLAN and quality of service (QoS) priority identification.

The VLAN ID (VID) associates a frame with a specific VLAN and provides the information that switches need to process the frame across the network. Notice that a tagged frame is 4 bytes longer than an untagged frame and contains 2 bytes of Tag Protocol Identifier (TPID) and 2 bytes of Tag Control Information (TCI). These components of an 802.1Q tagged frame are described in more detail here:

■ TPID—The Tag Protocol Identifier has a defined value of 8100 in hex; with the EtherType set at 8100, this frame is identified as carrying the IEEE 802.1Q/802.1P tag.

■ Priority—The first 3 bits of the Tag Control Information define user priority; notice the eight (23) possible priority levels. IEEE 802.1P defines the operation for these 3 user-priority bits.

■ CFI—The Canonical Format Indicator is a single-bit flag, always set to 0 for Ethernet switches. CFI is used for compatibility reasons between Ethernet networks and Token Ring.

■ VID—VLAN ID identifies the VLAN; notice it allows the identification of 4096 (212) VLANs. Two of these identifications are reserved, permitting the creation of 4094 VLANs.

802.1Q trunks feature a concept called the native VLAN. The native VLAN is a VLAN for which frames are not tagged. Here are the aspects of the native VLAN:

■ The VLAN a port is in when not trunking.

■ The VLAN from which frames are sent untagged on an 802.1Q port.

■ The VLAN to which frames are forwarded if received untagged on an 802.1Q port.

Cisco switches produce errors if the native VLAN does not match at each end of the link. The default native VLAN in Cisco devices is VLAN 1.

We can control the 802.1Q VLAN traffic that is sent over a trunk; this is possible for security purposes or load balancing.

The command used to create and control trunks on Cisco IOS-based switches is the interface command:

switchport trunk {allowed vlan vlan-list} {encapsulation {dot1q isl negotiate}} {native vlan vlan-id} {pruning vlan vlan-list}

VLAN Trunking Protocol (VTP) is a Cisco-proprietary Layer 2 multicast messaging protocol that synchronizes VLAN information across all media types and tagging methods on your switches. To enjoy the benefits of VTP, your switches must meet the following requirements:

■ We must configure the VTP domain name identically on each device; domain names are case-sensitive.
■ The switches must be adjacent.
■ The switches must be connected with trunk links.
■ The same VTP password must be configured if used in the domain.

Generally, you find four items in all VTP messages:

■ VTP protocol version (either 1 or 2)
■ VTP message type
■ Management domain name length
■ Management domain name

VTP has four possible message types:

■ Summary advertisements
■ Subset advertisements
■ Advertisement requests
■ VTP Join messages (used for pruning)

The VTP configuration revision number is extremely important. This value is used to determine whether a switch has stale information about VLANs and ultimately controls whether the switch overwrites its VLAN database with new information. The revision number increments each time a change is made to the VLAN database on a Server mode VTP system. The number is one from 0 to 4,294,967,295. We must ensure when introducing new Server mode switches that you do not inadvertently overwrite the VLAN database because of a higher configuration revision number on the new switch. Introducing new switches in Transparent mode helps ensure that this problem never results.

You have three possible modes for your VTP servers:

■ Server—This mode enables you to create, modify, and delete VLANs; these changes are advertised to VTP Client mode systems; Catalyst switches default to this mode.

■ Client—This mode does not allow for the creation, modification, or deletion of VLANs on the local device; VLAN configurations are synchronized from Server mode system(s).

■ Transparent—This mode permits the addition, deletion, and modification of VLAN information, but the information resides only locally on the Transparent device; these systems forward advertisements from servers but do not process them.

Here is a sample configuration of VTP for a Server mode system in Cisco IOS mode. Note that changing the VTP domain on this system resets the configuration revision number to 0:

Switch# configure terminal
Switch(config)# vtp mode server
Setting device to VTP SERVER mode.
Switch(config)# vtp domain Lab_Network
Setting VTP domain name to Lab_Network
Switch(config)# end
Switch#

No comments:

Post a Comment