? ? ? ? ? ? ? ? ? ??
? ? ? ? ? ? ? ? ? ? 安徽工業經濟職業技術學院
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 實驗報告
? ? ? ? ? ? ? ? ? ?實驗報告課程:網絡互聯技術基礎實驗報告
? ? ? ? ? ? ? ? ? ? ? 實驗項目名稱:VTP的基本管理與應用
? ? ? ? ? ? ? ? ? ? ? ?專業班級:計算機網絡技術31715班
一、實驗名稱:
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?VTP的基本管理與應用配置實驗
二、實驗內容:
?(1) ? 域內的每臺交換機都必須使用相同的域名,不論是通過配置實現,還是由交換自動學到的。
(2)交換機必須是相鄰的,即相鄰的交換機需要具有相同的域名。
(3)在所有交換機之間,必須配置中繼鏈路。
(4)VTP模式有3種 服務器模式(Server)客戶機模式(Client) 透明模式(Transparent)
三、實驗目的:
? ? ? ? ? ? ? ? ? ? ?掌握交換機上創建、配置VTP域的方法.
四、實驗器材:
? ? ? ? ? ? ? ? ? ? ? ? ? 4臺交換機,若干導線.
五、實驗步驟:
實驗拓撲圖
1、(1)將SW1交換機設置為服務器模式(Server)
SW1#vlan database
% Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode.
SW1(vlan)#vtp domain vtp-1
Changing VTP domain name from NULL to vtp-1
SW1(vlan)#vtp password 123
Setting device VLAN database password to 123
SW1(vlan)#vtp server
Device mode already VTP SERVER.
(2)再創建VLAN
SW1#conf t
Enter configuration commands, one per line. ?End with CNTL/Z.
SW1(config)#vlan 10
SW1(config-vlan)#vlan 20
(3)]配置Trunk鏈路進行連接,查看VLAN
SW1(config)#int range f0/1,f0/2
SW1(config-if-range)#sw mode trunk
查看VLAN信息:SW1#show VLAN
2、將SW3、SW4配置為客戶機模式(Client)
Switch>en
Switch#vlan database
% Warning: It is recommended to configure VLAN from config mode,
as VLAN database mode is being deprecated. Please consult user
documentation for configuring VTP/VLAN in config mode.
Switch(vlan)#vtp domain vtp-1
Domain name already set to vtp-1.
Switch(vlan)#vtp client
Setting device to VTP CLIENT mode.
Switch(vlan)#vtp password 123
Setting device VLAN database password to 123
Switch(vlan)#exit
APPLY completed.
Exiting....
Switch#conf t
Enter configuration commands, one per line. ?End with CNTL/Z.
Switch(config)#int f0/3
Switch(config-if)#sw mode trunk
3、將SW2設置為透明模式(Transparent)
SW2(vlan)#vtp domain vtp-1
Domain name already set to vtp-1.
SW2(vlan)#vtp transparent
Setting device to VTP TRANSPARENT mode.
SW2(vlan)#vtp password 123
Setting device VLAN database password to 123
SW2(vlan)#exit
APPLY completed.
Exiting....
SW2#conf t
Enter configuration commands, one per line. ?End with CNTL/Z
SW2(config)#int range f0/2,f0/3
Switch(config-if)#sw mode trunk
4、查看交換機的VLAN信息
SW3
SW4
★查看VTP域的相關信息(用以下命令可進行查詢)
SW#Show vtp status
六、實驗結果
1、通過配置VTP可實現VLAN信息間的傳遞
2、只有配置為同一VTP域(即VTP域名相同),交換機之間才能實現VLAN信息共享