1、斯科交换机端口的相关配置实验三一 实验拓扑图二 实验要求1、 在2950A交换机上创建VTP域名:cisco,设置为server模式,将其它交换机设置为:client模式,将2950A与2950D的F0/3端口、F0/4端口配置为以太通道。2、 在2950A交换机上创立VLAN100、VLAN200,并将F0/2端口划分给VLAN100,F0/1端口划分给VLAN200。3、 在2950B交换机上将F0/1端口、F0/2端口划分给VLAN200。4、 在2950C交换机上将F0/1端口、F0/2端口划分给VLAN100。5、 将2950A设置为VLAN100的根网桥后,查看STP各端口状态的情
2、况。6、 将2950D设置为VLAN200的根网桥后,查看STP各端口状态的情况。7、 通过修改端口成本或端口做优先级,将阻塞端口变为转发状态。8、 假设交换机2950C、2950D的F0/13端口和F0/14端口连接WEB、DNS服务器,请将这些端口配置为速端口。9、 将有阻塞端口的交换机中置为上行链路,提高故障修复率。10、清除交换机所有配置。11、 将拓扑改为最佳方案。三网络接口4950A Fa0/1 4950B Fa0/1 4950A Fa0/2 4950C Fa0/2 4950A Fa0/3 4950D Fa0/3 4950A Fa0/4 4950D Fa0/4 4950B Fa0/
3、2 4950D Fa0/2 4950C Fa0/1 4950D Fa0/1四实验配置Switchen /进入特权模式Switch#conf t /进入全局模式Switch(config)#host 2950A /设置主机名为2950A2950A(config)#no ip do lo /关闭域名解析协议2950A(config)#line con 0 /进入控制线02950A(config-line)#logg syn /光标同步2950A(config-line)#exec-time 0 0 /对Console口进行空闲超时时间的配置2950A(config-line)#exit /返回全局
4、配置模式2950A(config)#end /返回特权模式2950A#vlan database /进入VLAN数据库模式2950A(vlan)#vtp domain cisco /创建名为cisco的管理域Changing VTP domain name from NULL to cisco2950A(vlan)#vtp server /设置VTP的模式为serverDevice mode already VTP SERVER.2950A(vlan)#exit /退出APPLY completed.Exiting./将接口设置为以太通道2950A#conf t /进入全局配置模式2950A(
5、config)#int range fa0/3 4 /进入fa/3- 4接口2950A(config-if-range)#channel-group 1 mode on /加入以太网通道组1Creating a port-channel interface Port-channel12950A(config-if-range)#no shut /开启接口2950A(config-if-range)#exit /退出/将端口设置为干道2950A(config)#int range fa0/1 2 /进入fa/1 2接口2950A(config-if-range)#switchport mode
6、trunk /配置接口模式为trunk2950A(config-if-range)#switchport trunk encapsulation dot1q /配置封装模式2950A(config-if-range)#exit /返回全局配置模式2950A(config)#end /返回特权模式2950A#vlan database /进入VLAN数据库配置模式2950A(vlan)#vlan 100 /创建VLAN 100VLAN 100 added: Name: VLAN01002950A(vlan)#vlan 200 /创建VLAN 200VLAN 200 added: Name: VL
7、AN02002950A(vlan)#exit /退出APPLY completed.Exiting.2950A#conf t /进入全局配置模式2950A(config)#int fa0/2 /进入接口fa0/22950A(config-if)#switchport mode access / 配置接口模式为access2950A(config-if)#switchport access vlan 100 /将接口划分到VLAN 1002950A(config-if)#exit /退出2950A(config)#int fa0/1 /进入接口fa0/12950A(config-if)#swit
8、chport mode access / 配置接口模式为access 2950A(config-if)#switchport access vlan 200 /将接口划分到VLAN 2002950A(config-if)#exit /返回全局配置模式2950A(config)#end /返回特权模式/查看根网桥2950A#show spanning-tree /查看根网桥VLAN1 Root ID Priority 32768 Address cc00.06e4.0000 Cost 31 Port 321 (Port-channel1) Hello Time 2 sec Max Age 20
9、sec Forward Delay 15 secVLAN100 Root ID Priority 32768 Address cc00.0b60.0001 This bridge is the root /显示是根网桥 Hello Time 2 sec Max Age 20 sec Forward Delay 15 secVLAN200 Root ID Priority 32768 Address cc00.06e4.0000 Cost 19 Port 2 (FastEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 se
10、c/ 查看端口信息。发现F0/1端口阻塞 2950A#show spanning-tree vlan 200 brief /查看端口信息VLAN200 Spanning tree enabled protocol ieee Root ID Priority 32768 Address cc00.06e4.0000 Cost 19 Port 2 (FastEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32768 Address cc00.0b60.0002 Hello Ti
11、me 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300Interface DesignatedName Port ID Prio Cost Sts Cost Bridge ID Port ID- - - - - - - -FastEthernet0/1 128.2 128 19 FWD 0 32768 cc00.06e4.0000 128.2 /修改VLAN的优先级2950A#conf t /进入全局配置模式2950A(config)#int fa0/1 /进入接口fa0/1 2950A(config-if)#spanning-t
12、ree vlan 100 port-priority 120 /修改VLAN 100的优先级2950A(config-if)#spanning-tree vlan 200 port-priority 100 /修改VLAN 200的优先级2950A(config-if)#no shut /开启接口2950A(config-if)#end /退出/查看根桥信息2950A#show spanning-tree summary /查看根桥信息Root bridge for: VLAN100.PortFast BPDU Guard is disabledUplinkFast is disabledBa
13、ckboneFast is disabledName Blocking Listening Learning Forwarding STP Active- - - - - -VLAN1 0 0 0 1 1 VLAN100 0 0 0 1 1 VLAN200 0 0 0 1 1 - - - - - - 3 VLANs 0 0 0 3 3 /将有阻塞端口的交换机设置为上行链路,提高故障修复率。2950A#conf t /进入全局配置模式2950A(config)#spanning-tree uplinkfast /将交换机设置为上行链路2950A(config)#end /退出2950A#show
14、 vlan /查看vlan 信息VLAN Name Status Ports- - - -1 default active Fa0/0, Fa0/5, Fa0/6, Fa0/7 Fa0/8, Fa0/9, Fa0/10, Fa0/11 Fa0/12, Fa0/13, Fa0/14, Fa0/15 Po1100 VLAN0100 active Fa0/2200 VLAN0200 active Fa0/11002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-def
15、ault active VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2- - - - - - - - - - -1 enet 100001 1500 - - - - - 1002 1003100 enet 100100 1500 - - - - - 0 0 200 enet 100200 1500 - - - - - 0 0 1002 fddi 101002 1500 - - - - - 1 10031003 tr 101003 1500 1005 0 - - srb 1 10021004 fdnet 1
16、01004 1500 - - 1 ibm - 0 0 1005 trnet 101005 1500 - - 1 ibm - 0 0 /查看配置2950A# show run /查看交换机的信息Building configuration.Current configuration : 1115 bytes!version 12.4service timestamps debug datetime msecservice timestamps log datetime msecno service password-encryption!hostname 2950A!boot-start-mar
17、kerboot-end-marker!no aaa new-modelmemory-size iomem 5!ip cef!no ip domain lookup! spanning-tree uplinkfast!interface Port-channel1!interface FastEthernet0/0!interface FastEthernet0/1 switchport access vlan 200 spanning-tree vlan 100 port-priority 120 spanning-tree vlan 200 port-priority 100!interfa
18、ce FastEthernet0/2 switchport access vlan 100!interface FastEthernet0/3 channel-group 1 mode on!interface FastEthernet0/4 channel-group 1 mode on! interface FastEthernet0/5!interface FastEthernet0/6!interface FastEthernet0/7!interface FastEthernet0/8!interface FastEthernet0/9!interface FastEthernet0
19、/10!interface FastEthernet0/11!interface FastEthernet0/12!interface FastEthernet0/13!interface FastEthernet0/14!interface FastEthernet0/15!interface Vlan1 no ip address!ip http server!control-plane!line con 0 exec-timeout 0 0 logging synchronousline aux 0line vty 0 4!end2950B的配置Switchen /进入特权模式Swich
20、#conf t /进入全局配置模式Switch(config)#host 2950B /设置主机名为2950B2950B(config)#no ip do lo /关闭名解析协议2950B(config)#line con 0 /进入控制线02950B(config-line)#logg syn /光标同步2950B(config-line)#exec-time 0 0 /对Console口进行空性超时时间配置2950B(config-line)#exit /返回全局配置模式2950B(config)#end /返回特权模式2950B#vlan database / 进入vlan数据库配置模式
21、2950B(vlan)#vtp domain cisco /创建vtp域名为ciscoChanging VTP domain name from NULL to cisco2950B(vlan)#vtp client / 设置vtp 为client模式Setting device to VTP CLIENT mode.2950B(vlan)#exit /退出 In CLIENT state, no apply attempted.Exiting.2950B#conf t /进入全局配置模式2950B(config)#int range fa0/1 2 /进入接口fa0/1-22950B(con
22、fig-if-range)#switchport mode trunk / 配置接口模式为trunk2950B(config-if-range)#switchport trunk encapsulation dot1q / 配置封装协议2950B(config-if-range)#exit /返回全局配置模式2950B(config)#end /返回特权模式2950B#show vlan /查看vlan信息VLAN Name Status Ports- - - -1 default active Fa0/0, Fa0/3, Fa0/4, Fa0/5 Fa0/6, Fa0/7, Fa0/8, F
23、a0/9 Fa0/10, Fa0/11, Fa0/12, Fa0/13 Fa0/14, Fa0/15100 VLAN0100 active 200 VLAN0200 active 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2- - - - - - - - - - -1 enet 1000
24、01 1500 - - - - - 1002 1003100 enet 100100 1500 - - - - - 0 0 200 enet 100200 1500 - - - - - 0 0 1002 fddi 101002 1500 - 0 - - - 1 10031003 tr 101003 1500 1005 0 - - srb 1 10021004 fdnet 101004 1500 - - 1 ibm - 0 0 1005 trnet 101005 1500 - - 1 ibm - 0 0 2950B#conf t /进入全局配置模式2950B(config)#int range
25、fa0/1 2 /进入接口fa0/1 - 22950B(config-if-range)#switchport mode access / 配置接口模式为access 2950B(config-if-range)#switchport access vlan 200 /将接口划分到VLAN2002950B(config-if-range)#no shut /开启接口2950B(config-if-range)#exit /返回全局配置模式2950B(config)#end /返回特权模式2950B#show vlan /查看vlan 信息 VLAN Name Status Ports- - -
26、 -1 default active Fa0/0, 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/15100 VLAN0100 active 200 VLAN0200 active Fa0/1, Fa0/21002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active VLAN Type SAID MTU P
27、arent RingNo BridgeNo Stp BrdgMode Trans1 Trans2- - - - - - - - - - -1 enet 100001 1500 - - - - - 1002 1003100 enet 100100 1500 - - - - - 0 0 200 enet 100200 1500 - - - - - 0 0 1002 fddi 101002 1500 - 0 - - - 1 10031003 tr 101003 1500 1005 0 - - srb 1 10021004 fdnet 101004 1500 - - 1 ibm - 0 0 1005
28、trnet 101005 1500 - - 1 ibm - 0 0 2950B#show run /查看交换机的信息Building configuration.Current configuration : 928 bytes!version 12.4service timestamps debug datetime msecservice timestamps log datetime msecno service password-encryption!hostname 2950B!boot-start-markerboot-end-marker!no aaa new-modelmemory-size iomem 5!ip cef!no ip domain lookup! !interface FastEthernet0/0!interface FastEthernet0/1 switchport access vlan 200!interface FastEthernet0/
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1