经过检查发现子网划分不对:改为相同子网网段。
子网掩码都改为:255.255.255.0 下面开始检查交换机switch0在用户界面查看当前运行配置:
SW1#show running-config
spanning-tree mode pvst
!interface FastEthernet0/1!interface FastEthernet0/23 switchport trunk allowed vlan 1-9,11-1005 switchport mode trunk!经总结以上配置得出以下信息:
连接计算机的1口未配置vlan 10 access 模式23端口未允许vlan10通过经过配置:
interface FastEthernet0/1 switchport access vlan 10 switchport mode accessinterface FastEthernet0/23 switchport mode trunk
继续查看下一个
switch 1 spanning-tree mode rapid-pvst!interface FastEthernet0/22 channel-protocol lacp channel-group 1 mode passive!interface FastEthernet0/23 switchport trunk allowed vlan 1-9,11-1005!interface FastEthernet0/24 channel-protocol lacp channel-group 1 mode passiveinterface Port-channel 1
spanning-tree guard root经总结以上配置得出以下信息:
生成树模式为pvst连接 switch 0 的23端口trunk模式不让 vlan 10通过端口22/24运行聚合链路模式 lacp 端口模式为被动接口端口通道1 生成树根保护此交换机配置根保护,题目要求 switch 2 作为根交换机为了不做重复性工作我决定先对switch 2 进行查看再做配置
switch 2
spanning-tree mode pvst
spanning-tree vlan 10 priority 0!interface FastEthernet0/1 shutdowninterface FastEthernet0/22
channel-protocol pagp channel-group 2 mode auto switchport mode trunkinterface FastEthernet0/24
channel-protocol pagp channel-group 2 mode auto switchport mode trunkinterface Port-channel 2
switchport mode trunk经总结以上配置得出以下信息:
没有VLAN 10生成树模式 PVSTvlan 10 的优先级为 0 (数越小优先级越高)连接PC端口1被关闭22/24端口配置为聚合链路PAGP(思科专有)模式通道组 2 自动模式 开启 trunk 模式接口端口通道2设置为trunk 模式经对比switch 1 和 switch 2 得出以下问题:
一、22/24聚合链路模式不同导致数据无法正常传输;二、要求switch2作为根交换机但是switch1设置了根保护 下面开始配置:首先:一、将switch2的端口1打开二、将switch1的根保护关闭三、通道组设置为同通道组,同时改为一组四、将聚合链路都设置为trunk并开启更改后配置:
switch 1spanning-tree mode pvst!interface FastEthernet0/22 channel-protocol lacp channel-group 1 mode active switchport mode trunk!interface FastEthernet0/23!interface FastEthernet0/24 channel-protocol lacp channel-group 1 mode active switchport mode trunk!interface Port-channel 1 switchport mode trunk
!switch2
spanning-tree mode pvstspanning-tree vlan 10 priority 0!interface FastEthernet0/1 switchport access vlan 10 switchport mode accessinterface FastEthernet0/22 channel-protocol lacp channel-group 1 mode active switchport mode trunk
!interface FastEthernet0/23!interface FastEthernet0/24 channel-protocol lacp channel-group 1 mode active switchport mode trunkinterface Port-channel 1
switchport mode trunk========================================================================
连接测试:根测试
switch2SW3#show spanning-tree VLAN0010 Spanning tree enabled protocol ieee Root ID Priority 10 Address 0009.7C27.2B0A This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 10 (priority 0 sys-id-ext 10)
Address 0009.7C27.2B0A Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------Fa0/1 Desg FWD 19 128.1 P2pFa0/24 Desg FWD 19 128.24 P2pFa0/22 Desg FWD 19 128.22 P2pPo1 Desg FWD 9 128.28 Shr显示这个交换机是根(switch2)
完成。