A VLAN (Virtual LAN) segments a network logically, while trunking is the method used to carry traffic for multiple VLANs across a single physical link.
Here's a breakdown of the key differences:
VLANs (Virtual LANs)
- Logical Segmentation: VLANs divide a physical network into multiple logical networks. This allows you to group devices together based on function, department, or security requirements, even if they are not physically located in the same area.
- Local Significance: VLAN configurations are typically locally significant to a switch or a small group of switches. The VLAN database containing this configuration resides on the switch.
- Broadcast Domain Control: VLANs reduce broadcast traffic and improve network performance by limiting broadcasts to within the VLAN.
- Security: Enhance security by isolating sensitive data within specific VLANs.
- Example: All computers in the Accounting department, regardless of their physical location, can be placed in VLAN 10.
Trunking
- Carrying Multiple VLANs: Trunking allows a single physical link to carry traffic for multiple VLANs. This is essential for connecting switches together and for connecting switches to routers or servers that need to communicate with devices in multiple VLANs.
- VLAN Tagging: Trunk links add a VLAN tag to each frame to identify which VLAN it belongs to. This allows the receiving device to properly forward the frame to the correct VLAN.
- IEEE 802.1Q Standard: The industry-standard protocol for trunking is IEEE 802.1Q. This protocol inserts a tag into the Ethernet frame header to identify the VLAN.
- Alternatives (Deprecated): Cisco's older proprietary trunking protocol, Inter-Switch Link (ISL), is now deprecated and rarely used.
- Example: A trunk link between two switches carries traffic for VLANs 10 (Accounting), 20 (Marketing), and 30 (Engineering).
VLAN vs. Trunking - A Table
Feature | VLAN | Trunking |
---|---|---|
Purpose | Logical network segmentation | Transporting multiple VLANs over a single link |
Function | Creates separate broadcast domains | Allows VLANs to span multiple switches |
Mechanism | Configuration on the switch | Adds a VLAN tag to the frame (e.g., 802.1Q tagging) |
Scope | Local to a switch (typically) | Link between network devices (switches, routers) |
Configuration | Assigned to ports on a switch | Configured on ports connecting network devices |
In summary, VLANs logically segment your network, and trunking provides the means to transport traffic between those segments over a single physical connection. They work together to create a scalable, efficient, and secure network infrastructure.