Skip to content

4.5 VTP

1. VTP vs DTP

Play

VTP Overview

VTP (VLAN Trunking Protocol) and DTP (Dynamic Trunking Protocol) are both Cisco proprietary protocols used in network environments, but they serve different purposes and operate in distinct ways.

1.1 VTP (VLAN Trunking Protocol)

  • Purpose: VTP is used to manage and synchronize VLAN information across multiple switches in a network. It ensures that all switches in the same VTP domain have consistent VLAN configurations.
  • How it works:
    • A VTP domain is created, and switches within the domain share VLAN information.
    • One switch is configured as the VTP server, which can create, modify, or delete VLANs. Other switches can be configured as VTP clients or in transparent mode.
    • VLAN changes made on the VTP server are propagated to all switches in the domain.
  • Modes:
    • Server: Can create, modify, and delete VLANs. Sends and receives VTP updates.
    • Client: Cannot create, modify, or delete VLANs. Receives and forwards VTP updates.
    • Transparent: Does not participate in VTP updates but forwards them. Can create, modify, and delete VLANs locally.
  • Use case: Simplifies VLAN management in large networks by centralizing VLAN configuration.

1.2 DTP (Dynamic Trunking Protocol)

  • Purpose: DTP is used to dynamically negotiate trunking between two connected switches or between a switch and a device that supports trunking (e.g., a router or another switch).
  • How it works:
    • DTP automatically negotiates whether a link should operate as a trunk (carrying multiple VLANs) or as an access link (carrying traffic for a single VLAN).
    • It uses DTP packets to communicate between devices and determine the trunking mode.
  • Modes:
    • Dynamic Auto: Will form a trunk if the other device is set to “Dynamic Desirable” or “Trunk.”
    • Dynamic Desirable: Actively tries to form a trunk with the other device.
    • Trunk: Forces the link to be a trunk and does not negotiate.
    • Access: Forces the link to be an access link and does not negotiate.
    • Non-negotiate: Disables DTP and forces trunking without negotiation.
  • Use case: Simplifies the configuration of trunk links between switches.

1.3 Key Differences Between VTP and DTP

FeatureVTP (VLAN Trunking Protocol)DTP (Dynamic Trunking Protocol)
PurposeManages and synchronizes VLAN information.Negotiates trunking between devices.
FunctionalityDistributes VLAN configurations.Determines whether a link should be a trunk or access link.
ModesServer, Client, Transparent.Dynamic Auto, Dynamic Desirable, Trunk, Access, Non-negotiate.
LayerOperates at the data link layer (Layer 2).Operates at the data link layer (Layer 2).
DependencyRelies on trunk links to propagate VLAN info.Relies on VTP for VLAN synchronization.
Use CaseSimplifies VLAN management in large networks.Simplifies trunk link configuration.

2. Example

VTP - Part 01

VTP - Part 02

VTP - Part 03

Sure! Let’s walk through an example of configuring VTP and DTP in Cisco Packet Tracer. This example will demonstrate how to set up a VTP domain and configure trunk links using DTP.

Topology

  • Two switches: Switch0 (VTP Server) and Switch1 (VTP Client).
  • A PC connected to each switch for testing VLANs.

2.1 Step 1: Configure VTP

  1. Configure Switch0 as the VTP Server:

    • Open the CLI for Switch0.
    • Enter the following commands:
      Terminal window
      Switch> enable
      Switch# configure terminal
      Switch(config)# vtp mode server
      Switch(config)# vtp domain MyDomain
      Switch(config)# vtp password MyPassword
      Switch(config)# exit
    • Create a VLAN on Switch0:
      Terminal window
      Switch(config)# vlan 10
      Switch(config-vlan)# name Sales
      Switch(config-vlan)# exit
  2. Configure Switch1 as the VTP Client:

    • Open the CLI for Switch1.
    • Enter the following commands:
      Terminal window
      Switch> enable
      Switch# configure terminal
      Switch(config)# vtp mode client
      Switch(config)# vtp domain MyDomain
      Switch(config)# vtp password MyPassword
      Switch(config)# exit
  3. Verify VTP Synchronization:

    • On Switch1, check if VLAN 10 (“Sales”) has been synchronized:
      Terminal window
      Switch# show vlan brief
      You should see VLAN 10 listed, which was created on the VTP server (Switch0).

2.2 Step 2: Configure DTP for Trunking

  1. Configure Trunking on Switch0:

    • Open the CLI for Switch0.
    • Configure the interface connected to Switch1 as a trunk:
      Terminal window
      Switch(config)# interface GigabitEthernet0/1
      Switch(config-if)# switchport mode dynamic desirable
      Switch(config-if)# exit
  2. Configure Trunking on Switch1:

    • Open the CLI for Switch1.
    • Configure the interface connected to Switch0 as a trunk:
      Terminal window
      Switch(config)# interface GigabitEthernet0/1
      Switch(config-if)# switchport mode dynamic auto
      Switch(config-if)# exit
  3. Verify Trunking:

    • On both switches, check if the link between them is trunking:
      Terminal window
      Switch# show interfaces trunk
      You should see the interface (e.g., GigabitEthernet0/1) listed as a trunk.

2.3 Step 3: Assign VLANs to Access Ports

  1. On Switch0:

    • Assign the PC connected to Switch0 to VLAN 10:
      Terminal window
      Switch(config)# interface FastEthernet0/1
      Switch(config-if)# switchport mode access
      Switch(config-if)# switchport access vlan 10
      Switch(config-if)# exit
  2. On Switch1:

    • Assign the PC connected to Switch1 to VLAN 10:
      Terminal window
      Switch(config)# interface FastEthernet0/1
      Switch(config-if)# switchport mode access
      Switch(config-if)# switchport access vlan 10
      Switch(config-if)# exit

2.4 Step 4: Test Connectivity

  1. Assign IP addresses to the PCs:

    • PC0: 192.168.10.2/24
    • PC1: 192.168.10.3/24
  2. Use the ping command from PC0 to PC1:

    Terminal window
    ping 192.168.10.3

    The ping should be successful since both PCs are in the same VLAN (VLAN 10).