企业内——局域网——内网排错思路及方法


image.png


首先遇到局域网链路故障从外部设备进行排错:
PC机——>线路——>交换机
进入PC机界面
PC0

image.png


PC1

image.png



经过检查发现子网划分不对:改为相同子网网段。
子网掩码都改为:255.255.255.0



下面开始检查交换机
switch0

image.png

在用户界面查看当前运行配置:


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 access


interface FastEthernet0/23
 switchport mode trunk


继续查看下一个
switch 1

image.png


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 passive


interface Port-channel 1
 spanning-tree guard root


经总结以上配置得出以下信息:
生成树模式为pvst
连接 switch 0 的23端口trunk模式不让 vlan 10通过
端口22/24运行聚合链路模式 lacp  端口模式为被动
接口端口通道1 生成树根保护
此交换机配置根保护,题目要求 switch 2 作为根交换机


为了不做重复性工作我决定先对switch 2 进行查看再做配置


switch 2

image.png


spanning-tree mode pvst
spanning-tree vlan 10 priority 0
!
interface FastEthernet0/1
 shutdown


interface FastEthernet0/22
channel-protocol pagp
 channel-group 2 mode auto
 switchport mode trunk


interface FastEthernet0/24
channel-protocol pagp
 channel-group 2 mode auto
 switchport mode trunk


interface Port-channel 2
 switchport mode trunk


经总结以上配置得出以下信息:
没有VLAN 10
生成树模式 PVST
vlan 10 的优先级为 0 (数越小优先级越高)
连接PC端口1被关闭
22/24端口配置为聚合链路PAGP(思科专有)模式
通道组 2 自动模式  开启 trunk 模式
接口端口通道2设置为trunk 模式


经对比switch 1 和 switch 2 得出以下问题:
一、22/24聚合链路模式不同导致数据无法正常传输;
二、要求switch2作为根交换机但是switch1设置了根保护



下面开始配置:
首先:
一、将switch2的端口1打开
二、将switch1的根保护关闭
三、通道组设置为同通道组,同时改为一组
四、将聚合链路都设置为trunk并开启


更改后配置:
switch 1
spanning-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 pvst
spanning-tree vlan 10 priority 0
!
interface FastEthernet0/1
 switchport access vlan 10
 switchport mode access


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


========================================================================
连接测试:

image.png

根测试
switch2
SW3#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 sec


  Bridge 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  20


Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1            Desg FWD 19        128.1    P2p
Fa0/24           Desg FWD 19        128.24   P2p
Fa0/22           Desg FWD 19        128.22   P2p
Po1              Desg FWD 9         128.28   Shr


显示这个交换机是根(switch2)
完成。



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章