Virtual LANs

In this lesson, we'll study virtual LANs!

We'll cover the following

Introduction

Another important advantage of Ethernet switches is the ability to create Virtual Local Area Networks (VLANs). A virtual LAN is a logical subset of the LAN configured by a network administrator. The traffic for different VLANs remains segregated resulting in increased efficiency of network operation. This is useful in many cases, for example, to keep the traffic for different departments in an organization separate. The traffic of the Accounts Department, for instance, may want to be kept separate from that of Network Operations, Human Resources and so on. A virtual LAN is hence a set of ports attached to one or more Ethernet switches. A switch can support several VLANs and it runs one MAC learning algorithm for each Virtual LAN.

  • Every frame is labeled with the VLAN identifier that it belongs to.
  • When a switch receives a frame with an unknown or a multicast destination, it forwards it over all the ports that belong to the same Virtual LAN but not over the ports that belong to other Virtual LANs.
  • Similarly, when a switch learns a source address on a port, it associates it to the Virtual LAN of this port and uses this information only when forwarding frames on this Virtual LAN.

The figure below illustrates a switched Ethernet network with three Virtual LANs.

  • VLAN 2 and VLAN 3 only require a local configuration of switch S1.
  • Host C can exchange frames with host D, but not with hosts that are outside of its VLAN.
  • VLAN1 is more complex as there are ports of this VLAN on several switches. To support such VLANs, local configuration is not sufficient anymore.
  • When a switch receives a frame from another switch, it must be able to determine the VLAN in which the frame originated to use the correct MAC table to forward the frame. This is done by assigning an identifier to each Virtual LAN and placing this identifier inside the headers of the frames that are exchanged between switches.
Press + to interact
Virtual local area networks in a switched Ethernet network
Virtual local area networks in a switched Ethernet network

Special Header

IEEE defined in the 802.1q standard a special header to encode the VLAN identifiers. This 32-bit header includes a 20 bit VLAN field that contains the VLAN identifier of each frame. The format of the header is described below.

  • The header is inserted immediately after the source MAC address in the Ethernet frame (i.e. before the Ether Type field).

  • The maximum frame size is increased by 4 bytes.

  • It’s encoded in 32 bits and contains four fields.

  • The Tag Protocol Identifier is set to 0x8100 to allow the receiver to detect the presence of this additional header.

  • The Priority Code Point (PCP) is a three-bit field that is used to support different transmission priorities for the frame.

    • Value 0 is the lowest priority and value 7 the highest.
    • Frames with a higher priority can expect to be forwarded earlier than frames having a lower priority.
  • The C bit is used for compatibility between Ethernet and Token Ring networks.

  • The last 12 bits of the 802.1q header contains the VLAN identifier.

  • Value 0 indicates that the frame does not belong to any VLAN while value 0xFFF is reserved. This implies that 4094 different VLAN identifiers can be used in an Ethernet network

Feel free to ask any questions related to the lesson in the following widget. Our AI will answer them and help you better understand the topic

Powered by AI
3 Prompts Remaining
Prompt AI WidgetOur tool is designed to help you to understand concepts and ask any follow up questions. Ask a question to get started.

Quick Quiz!

1

Only ONE VLAN can be configured on one Ethernet switch

A)

True

B)

False

Question 1 of 20 attempted

That’s it for this course! The next chapter is a brief conclusion.

Get hands-on with 1400+ tech skills courses.