🌐

VLANS and Trunking

Feb 20, 2025

Lecture Notes: Local Area Networks (LANs) and VLANs

Local Area Networks (LANs)

  • Definition: A group of devices in the same broadcast domain.
  • Configuration: Devices connected to a switch are in the same broadcast domain.
  • Example: Red and blue networks, each on separate switches.

Challenges with Separate Switches

  • Each switch requires:
    • Separate power sources
    • Space in a rack
    • Individual management
  • Inefficiencies: Managing multiple switches separately is less efficient.

Virtual Local Area Networks (VLANs)

  • Purpose: Allows for multiple broadcast domains on a single switch.
  • Configuration:
    • Each interface on a switch can belong to a specific VLAN.
    • Devices on the same VLAN can communicate with each other.
  • Numbering: VLANs are defined by numbers (e.g., VLAN 1, VLAN 2, VLAN 3).

VLAN Trunking

  • Problem: Need to connect the same VLANs across different switches.
  • Solution: Use a VLAN trunk (802.1Q trunk).
    • Allows multiple VLANs to share a single physical connection between switches.
    • Tags are added to Ethernet frames to identify VLAN membership.
    • VLAN Tag: 12 bits long, allowing up to 4,094 VLANs.

Native VLAN

  • Definition: A VLAN that does not add a tag over a trunk connection.
  • Purpose: Useful for devices and admin functions that do not support 802.1Q.
  • Configuration: Ensure the native VLAN is the same on connected switches to avoid errors.

Layer 2 vs. Layer 3 Switches

  • Layer 2 Switch: Makes forwarding decisions based on MAC addresses.
  • Layer 3 Switch: Combines switch and router functionality.
    • Uses IP addresses for routing decisions.
    • Configures Switched Virtual Interfaces (SVIs) for routing.
  • Advantages: Combines routing and switching in one device, saving space and power.

Combining Voice and Data

  • Historical Setup: Separate cables for Ethernet and telephones.
  • Current Setup: Voice over IP allows voice and data on the same network.
  • Challenge: Contention between voice and data traffic.
  • Solution: Assign voice and data to separate VLANs using trunking technology.
    • Requires compatible switching equipment.
    • Ensures seamless simultaneous use of voice and data.

Conclusion

  • VLANs provide efficient management and separation of network traffic on a single switch.
  • Trunking and VLAN configurations enhance connectivity and communication across networks.
  • Layer 3 switches integrate routing and switching, optimizing network functionality.