1. 程式人生 > >企業內——局域網——內網排錯思路及方法

企業內——局域網——內網排錯思路及方法

開啟 技術 運行 思科 交換機 sys chan 打開 重復


技術分享圖片


首先遇到局域網鏈路故障從外部設備進行排錯:
PC機——>線路——>交換機
進入PC機界面
PC0

技術分享圖片


PC1

技術分享圖片



經過檢查發現子網劃分不對:改為相同子網網段。
子網掩碼都改為: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 access


interface 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 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

技術分享圖片


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


========================================================================
連接測試:

技術分享圖片

根測試
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)
完成。



企業內——局域網——內網排錯思路及方法