交換機配置——VTP管理交換機的VLAN配置


一、實驗目的:將S1配置成VTP-Server,S2配置成VTP-Transparent,S3配置成VTP-Client,S4配置成VTP-Client

二、拓撲圖如下

 

三、具體步驟:

(1)S1交換機的配置

Switch>enable  --進入特權模式
Switch#config terminal  --進入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S1  --修改交換機名為S1
S1(config)#vtp domain test  --創建test
Changing VTP domain name from NULL to test
S1(config)#vtp mode server  --設置S1Server 
Device mode already VTP SERVER.
S1(config)#vlan 7  --創建並進入vlan 7端口,並開啟
S1(config-vlan)#vlan 8  --創建並進入vlan 8 端口,並開啟
S1(config-vlan)#interface f0/1  --進入f0/1端口
S1(config-if)#switchport mode trunk  --將端口改為trunk模式

S1(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

 

(2)S2交換機的配置

Switch#enable  --進入特權模式
Switch#config terminal  --進入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S2  --修改交換機名為S2
S2(config)#vtp mode transparent  --將S2設置為Transparent
Device mode already VTP TRANSPARENT.
S2(config)#interface range f0/1-2  --進入f0/1f0/2端口
S2(config-if)#switchport mode trunk  --將端口改為trunk模式

 

(3)S3交換機配置

Switch#enable  --進入特權模式
Switch#config terminal  --進入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S3  --修改交換機名為S3
S3(config)#vtp mode client  --將S3設置為Client
Device mode already VTP CLIENT.
S3(config)#interface range f0/1-2   --進入f0/1f0/2端口

S3(config-if)#switchport mode trunk  --將端口改為trunk模式

 

(4)S4交換機配置

Switch#enable  --進入特權模式
Switch#config terminal  --進入全局配置模式
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S4  --將交換機名修改為S4
S4(config)#vtp mode client  --將S4設置為Client
Device mode already VTP CLIENT.
S4(config)#interface f0/1  --進入f0/1端口
S4(config-if)#switchport mode trunk  --將端口改為trunk模式

四、驗證,分別在各台交換機上查看VLAN

(1)S1

 

(2)S2

 

 解釋:S2因為是隱藏模式,所以看不見vlan 7vlan 8

(3)S3

 解釋:S3是客戶端模式所以可以查看到vlan 7vlan 8

(4)S4

 解釋:S4因為是客戶端模式,所以可以查看到vlan 7vlan 8


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM