Static Virtual LANs (VLANs)

Port-Based Virtual LANs (Static VLANs)

802.1Q VLAN Tagging

VLAN tagging enables traffic from more than one VLAN to use the same port. (Even when two or more VLANs use the same port they remain as separate domains and cannot receive traffic from each other without going through an external router.) As mentioned earlier, a “tag” is simply a unique VLAN identification number (VLAN ID, or VID) assigned to a VLAN at the time that you configure the VLAN name in the switch. The tag can be any number from 1 to 4094 that is not already assigned to a VLAN. When you subsequently assign a port to a given VLAN, you must implement the VLAN tag (VID) if the port will carry traffic for more than one VLAN. Otherwise, the port VLAN assignment can remain “untagged” because the tag is not needed. On a given switch, this means you should use the “Untagged” designation for a port VLAN assignment where the port is connected to non 802.1Q-compliant device or is assigned to only one VLAN. Use the “Tagged” designation when the port is assigned to more than one VLAN or the port is connected to a device that does comply with the 802.1Q standard.

For example, if port A7 on an 802.1Q-compliant switch is assigned to only the Red VLAN, the assignment can remain “untagged” because the port will forward traffic only for the Red VLAN. However, if both the Red and Green VLANs are assigned to port A7, then at least one of those VLAN assignments must be “tagged” so that Red VLAN traffic can be distinguished from Green VLAN traffic. The following illustration shows this concept:

 

Blue

 

Blue

White

White

 

Server

VLAN

Server

VLAN

Red

5

6

Red VLAN: Untagged

4

3

VLAN

4

 

Green VLAN: Tagged

 

 

 

Switch

Switch

 

7

5

 

3

"X"

 

 

 

"Y"

Red

 

 

 

 

 

2

1

 

 

1

2

Server

 

 

 

 

 

 

 

 

 

Green

Green

Red

 

Green

 

Server

VLAN

VLAN

VLAN

 

Ports 1-6: Untagged

Ports 1-4: Untagged

 

Port 7: Red VLAN Untagged

Port 5: Red VLAN Untagged

 

Green VLAN Tagged

Green VLAN Tagged

Figure 2-21. Example of Tagged and Untagged VLAN Port Assignments

2-29