在大型網路(如百台交換機)中,若每台都需手動建立相同 VLAN(如 VLAN 10, 20, 30, 40, 50),工作量極大且易出錯。VTP(VLAN Trunking Protocol,VLAN 幹線協議) 允許在一台交換機設定 VLAN,自動透過 Trunk 連結宣告同步至同一 VTP 域內的其他交換機,維持 VLAN 設定一致性。
corpnet,非 DNS 網域,不支援中文)。| 模式 | 建立/修改/刪除 VLAN | 發送 VTP 宣告 | 轉發 VTP 宣告 | 同步 VLAN 資料 | 儲存至 NVRAM | 適用場景 |
|---|---|---|---|---|---|---|
| Server(預設) | ✅ | ✅ | ✅ | ✅ | ✅ | 核心/匯聚層,負責 VLAN 管理 |
| Client | ❌ | ❌ | ✅ | ✅ | ❌(僅記憶體) | 存取層,僅接收同步 |
| Transparent | ✅(本地) | ❌ | ✅ | ❌ | ✅(本地) | 特殊需求、擴展 VLAN(1006-4094) |
vtp mode transparent → vtp mode server)。! 核心交換機設為 Server
Switch(config)# vtp domain corpnet
Switch(config)# vtp mode server
Switch(config)# vtp password cisco123
Switch(config)# vtp version 2
! 存取層交換機設為 Client
Switch(config)# vtp domain corpnet
Switch(config)# vtp mode client
Switch(config)# vtp password cisco123
Switch# show vtp status
Switch# show vtp counters