Dynamic Trunking and Virtual Trunking Protocol
Objectives
- Understand Dynamic Trunking Protocol (DTP) and how switches automatically negotiate trunk connections.
- Configure and understand the three VTP modes: Server, Client, and Transparent.
- Verify trunk connections and automatic VLAN distribution between switches.
Theory
Dynamic Trunking Protocol (DTP) is a Cisco proprietary protocol used to automatically negotiate whether a switch port should become a trunk port or remain an access port. It simplifies trunk configuration between Cisco switches.
Common DTP Modes:
| Mode | Description |
|---|---|
| Dynamic Auto | Passively waits for the neighboring switch to initiate trunk negotiation. It forms a trunk when connected to a port configured as trunk or dynamic desirable. |
| Dynamic Desirable | Actively attempts to establish a trunk connection with the neighboring switch. |
| Trunk | Forces the interface to operate as a trunk port. |
| Access | Forces the interface to operate as an access port. |
VLAN Trunking Protocol (VTP) is a Cisco proprietary Layer 2 protocol used to distribute VLAN information between switches in the same VTP domain. It reduces the need to manually create VLANs on every switch by synchronizing VLAN databases through trunk links.
Three VTP Modes:
| VTP Mode | Description | Function |
|---|---|---|
| Server | Can create, modify, and delete VLANs and advertise these changes to other switches in the VTP domain. | Create and distribute VLANs |
| Client | Receives VLAN information from VTP servers but cannot create, modify, or delete VLANs. | Receive VLAN information |
| Transparent | Maintains its own independent VLAN database and forwards VTP advertisements without synchronizing its own VLAN database. | Independent VLAN management |
Important: All switches participating in the same VTP domain must have the same domain name. Trunk links are required for VTP advertisements to travel between switches.
Network Topology
Interface Details & VTP Modes
| Sl.No | Device | Interface | VTP Mode |
|---|---|---|---|
| 1 | S1 | Gi1/0/1 | Server |
| 2 | S2 | Gi1/0/1 | Transparent |
| Gi1/0/2 | |||
| 3 | S3 | Gi1/0/1 | Client |
Configuration Commands
1. VTP Server Configuration
Switch 1 – Server
enable configure terminal ! Configure VTP domain and mode vtp domain CCNA vtp mode server ! Create VLANs vlan 10 name Engineering exit vlan 20 name Doctor exit vlan 30 name Teacher exit ! Configure trunk interface interface GigabitEthernet1/0/1 switchport mode trunk no shutdown end
2. VTP Transparent Configuration
Switch 2 – Transparent
enable configure terminal ! Configure VTP domain and mode vtp domain CCNA vtp mode transparent ! Configure trunk interfaces interface range GigabitEthernet1/0/1-2 switchport mode trunk no shutdown end
3. VTP Client Configuration
Switch 3 – Client
enable configure terminal ! Configure VTP domain and mode vtp domain CCNA vtp mode client ! Configure trunk interface interface GigabitEthernet1/0/1 switchport mode trunk no shutdown end
4. DTP Dynamic Desirable and Dynamic Auto
Example – Configure DTP on two connected switches
! On Switch 1 enable configure terminal interface GigabitEthernet1/0/1 switchport mode dynamic desirable no shutdown end ! On Switch 2 enable configure terminal interface GigabitEthernet1/0/1 switchport mode dynamic auto no shutdown end
Verification Commands & Outputs
1. Verify VTP Server on S1
VTP Version : 2 Configuration Revision : 3 Maximum VLANs supported locally : 1005 Number of existing VLANs : 8 VTP Operating Mode : Server VTP Domain Name : CCNA
VLAN Name Status ---- -------------------------------- --------- 1 default active 10 Engineering active 20 Doctor active 30 Teacher active
2. Verify VTP Transparent on S2
VTP Operating Mode : Transparent VTP Domain Name : CCNA
3. Verify VTP Client on S3
VTP Operating Mode : Client VTP Domain Name : CCNA
VLAN Name Status ---- -------------------------------- --------- 1 default active 10 Engineering active 20 Doctor active 30 Teacher active
4. Verify Trunk Connections
Port Mode Encapsulation Status Gi1/0/1 on 802.1q trunking
Port Mode Encapsulation Status Gi1/0/1 on 802.1q trunking Gi1/0/2 on 802.1q trunking
5. Verify DTP Negotiation
! Displays DTP information for the selected interface. ! Check the operational mode and negotiation status. ! Exact output depends on switch model and IOS version.
6. General Verification Checklist
show vtp status show vlan brief show interfaces trunk show dtp interface show running-config
Check the following:
- All switches have the same VTP domain name: CCNA.
- S1 operates in VTP Server mode.
- S2 operates in VTP Transparent mode.
- S3 operates in VTP Client mode.
- Trunk links are successfully established between switches.
- VLANs 10, 20, and 30 are automatically learned by S3 through VTP advertisements.
Note: S2 in Transparent mode maintains its own VLAN database. It forwards VTP advertisements between switches but does not synchronize its own VLAN database with S1. The example outputs are illustrative and may vary depending on the switch model and IOS version.
No comments:
Post a Comment