交换机配置——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(config)#vtp domain test
Changing VTP domain name from NULL to test
S1(config)#vtp mode server
Device mode already VTP SERVER.
S1(config)#vlan 2
S1(config-vlan)#vlan 3
S1(config-vlan)#interface f0/1
S1(config-if)#switchport mode 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(config)#vtp mode transparent
Device mode already VTP TRANSPARENT.
S2(config)#interface f0/2
S2(config-if)#switchport mode trunk

(3)S3交换机配置

Switch#enable
Switch#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S3
S3(config)#vtp mode client
Device mode already VTP CLIENT.
S3(config)#interface f0/2
S3(config-if)#switchport mode trunk

(4)S4交换机配置

Switch#enable
Switch#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S4
S4(config)#vtp mode client
Device mode already VTP CLIENT.
S4(config)#interface f0/1
S4(config-if)#switchport mode trunk

四、验证,分别在各台交换机上查看VLAN

S1#show vlan  --

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
Fa0/18, Fa0/19, Fa0/20, Fa0/21
Fa0/22, Fa0/23, Fa0/24, Gig1/1
Gig1/2
2 VLAN0002 active
3 VLAN0003 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
--More--

猜你喜欢

转载自www.cnblogs.com/evolve/p/9178587.html
今日推荐