VLAN tagging is a switch feature. It allows switches to exchange VLAN information. DTP is a Cisco proprietary protocol. It works only on Cisco switches. It dynamically manages VLAN tagging.
By default, a switch forwards a broadcast message from all ports except the port on which it received the broadcast message. VLAN is a switch feature. It allows us to create a group of switch ports that share broadcast messages. VLAN configuration is a two steps process. First, we define a VLAN. Then, add switch ports to it. After VLAN configuration, a switch forward broadcast messages only between VLAN members.
Let us take an example.
The following image shows an 8-port switch before the VLAN configuration.
Now, we create two VLANs: VLAN-10 and VLAN-20. We add switch ports 1, 2, 3, and 4 to VLAN-10 and switch ports 5, 6, 7, and 8 to VLAN-20.
The following image shows the switch after the VLAN configuration.
The following steps explain broadcast communication between VLAN-10 devices.
- A device connected to port-1 generates a broadcast message.
- The message reaches to switch on port-1.
- Switch checks VLAN configuration on port-1.
- Port-1 is a member of VLAN-10. Other members of this VLAN are ports 2, 3, and 4. Switch forwards the message from these ports.
The following steps explain broadcast communication between VLAN-20 devices.
- A device connected to port-7 generates a broadcast message.
- The message reaches to switch on port-7.
- Switch checks VLAN configuration on port-7.
- Port-7 is a member of VLAN-20. Other members of this VLAN are ports 5, 6, and 8. Switch forwards the message from these ports.
If all VLAN members are on the same switch, the switch can easily forwards broadcast messages between them. But if some VLAN members are on other switches, the switch can not forward broadcast messages to them directly.
The following image shows a network.
In this network, VLAN members are on different switches. Switches are connected through a link on port 8.
The following steps explain broadcast communication between Switch-A's devices.
- PC-A generates a broadcast message.
- The broadcast message reaches Switch-A on port-1.
- Switch-A forwards the message from ports 2 and 3.
- Since it has no information about the VLANs available on Switch-2, it does not forward the message from port -8.
Even if Switch-A forwards the message from port-8, Switch-B will not forward it from ports belonging to its VLAN. Switch-B has no information about the message's VLAN.
VLAN tagging
VLAN tagging is a switch feature. It allows the switch to add VLAN information to frames. Switch-A adds VLAN information to each frame before forwarding it from the port connected to another switch. The process of adding information is called VLAN tagging.
Switch-B uses the attached information to identify frames' VLANs. Since end devices do not understand modified frames, it removes attached information from all frames before forwarding them to their ports.
The following image shows how switches use VLAN tagging to exchange VLAN information.
Not all switch ports can add and read VLAN information. A switch port adds and reads VLAN information only when you change its mode to tunk. A switch port can work in two modes: access and trunk. In access mode, it does not add and remove VLAN information to frames. In trunk mode, it adds and removes VLAN information to frames. Access mode is the default mode on all switch ports.
If you connect a switch port to another switch port, you need to change the default mode to trunk mode on both ports.
DTP protocol
A DTP protocol dynamically manages trunk connections. Based on the connected device, it automatically changes the switch port's mode. For example, if the connected device is a switch, it changes the port's mode to trunk mode. If the connected device is a PC or server, it changes the port's mode to access mode.
This tutorial is a part of the tutorial series on VLAN, VTP, and DTP Concepts and Configurations on Cisco Routers. Other parts of this series are the following.
Chapter 01 VLAN Basic Concepts Explained with Examples
Chapter 02 Advantages and Disadvantages of VLANs
Chapter 03 Static and Dynamic VLAN Membership Explained
Chapter 04 Access Link and Trunk Link Explained
Chapter 05 VLAN Tagging Explained with DTP Protocol
Chapter 06 DTP Modes and Protocol Explained
Chapter 07 802.1Q Native VLAN concept Explained
Chapter 08 Cisco Inter-Switch Link (ISL) Explained
Chapter 09 Trunk Tagging and Frame Tagging Explained
Chapter 10 VTP Modes and VTP Protocol Explained
Chapter 11 VTP Pruning on switches Explained
Chapter 12 VLAN Practice Lab Setup in Packet Tracer
Chapter 13 Configure VTP Server and Client in Switch
Chapter 14 VLAN Configuration Commands Step by Step Explained
Chapter 15 Router on Stick Configuration Explained