IEEE 802.1Q

From Teknologisk videncenter
Revision as of 09:17, 2 May 2009 by Heth (talk | contribs) (Why is a trunk protocol needed)
Jump to: navigation, search
Figure 1: Trunk between two switches carrying traffic from VLAN 100 and VLAN 200 between the Switches

The IEEE 802.1Q trunk protocol connects two or more Ethernet or Token Ring switches, and allows transmission of packets between Switches sharing the same VLAN(s).

Principle

In figure 1 all PC's connected to ports which are in VLAN 100 - Blue - can communicate together, and all PC's connected to ports in VLAN 200 - Red - can communicate together. In figure 1 there can be no exchange of frames between VLAN 100 and VLAN 200.

Why is a trunk protocol needed

A trunk protocol is needed when using a OSI layer 2 technology as Ethernet or Token Ring because the Layer 2 header has no field describing the origin of the frames. Se figure two upper half Standard 802.3 Ethernet Frame. There is no field where the transmitting Switch can tell the receiving Switch which VLAN a receiving frame belongs.

Figure 2: Standard untagged Ethernet frame and 802.1Q tagged ethernet frame

Tagging a Frame

If both switches uses the IEEE 802.1Q tagging trunk protocol, the transmitting Switch tags the frame when sending it. Se figure 2 bottom half 802.1Q tagged 802.3 Ethernet Frame

DOT1Q tag fields
Field Description
Priority Also called COS field or Class Of Service. A priority between 0 and 7
CFI Canonical Field Indicator CFI=0 (Ethernet) CFI=1 (Token Ring)
VID Vlan ID, to which VLAN number the Frame belongs (0 - 4095)

Native VLAN

Defined in the 802.1Q specification there is one untagged VLAN. The standard untagged VLAN for ethernet is VLAN 1 which is the standard administrative VLAN. All ethernet ports belong to VLAN 1 on a unconfigured switch.