兩台交換機兩個接口直連,一個接口隻放行vlan10通過,另一個接口隻放行vlan20通過,根本沒有環路,為什麼stp會阻塞掉一個接口?
(0)
最佳答案
默認情況下交換機所有VLAN在同一個MSTP域下,所以隻要物理有環就會阻塞。可以劃分不同vlan為不同域或開PVST
· 網絡中所有設備都屬於同一個MST域。Device A和Device B為彙聚層設備,Device C和Device D為接入層設備。
· 通過配置MSTP,使不同VLAN的報文按照不同的MSTI轉發:VLAN 10的報文沿MSTI 1轉發,VLAN 30沿MSTI 3轉發,VLAN 40沿MSTI 4轉發,VLAN 20沿MSTI 0轉發。
· 由於VLAN 10和VLAN 30在彙聚層設備終結、VLAN 40在接入層設備終結,因此配置MSTI 1和MSTI 3的根橋分別為Device A和Device B,MSTI 4的根橋為Device C。
圖2-6 MSTP典型配置組網圖
(1) 配置VLAN和端口
請按照圖2-6在Device A和Device B上分別創建VLAN 10、20和30,在Device C上創建VLAN 10、20和40,在Device D上創建VLAN 20、30和40;將各設備的各端口配置為Trunk端口並允許相應的VLAN通過,具體配置過程略。
(2) 配置Device A
# 配置MST域的域名為example,將VLAN 10、30、40分別映射到MSTI 1、3、4上,並配置MSTP的修訂級別為0。
<DeviceA> system-view
[DeviceA] stp region-configuration
[DeviceA-mst-region] region-name example
[DeviceA-mst-region] instance 1 vlan 10
[DeviceA-mst-region] instance 3 vlan 30
[DeviceA-mst-region] instance 4 vlan 40
[DeviceA-mst-region] revision-level 0
# 激活MST域的配置。
[DeviceA-mst-region] active region-configuration
[DeviceA-mst-region] quit
# 配置本設備為MSTI 1的根橋。
[DeviceA] stp instance 1 root primary
# 全局開啟生成樹協議。
[DeviceA] stp global enable
(3) 配置Device B
# 配置MST域的域名為example,將VLAN 10、30、40分別映射到MSTI 1、3、4上,並配置MSTP的修訂級別為0。
<DeviceB> system-view
[DeviceB] stp region-configuration
[DeviceB-mst-region] region-name example
[DeviceB-mst-region] instance 1 vlan 10
[DeviceB-mst-region] instance 3 vlan 30
[DeviceB-mst-region] instance 4 vlan 40
[DeviceB-mst-region] revision-level 0
# 激活MST域的配置。
[DeviceB-mst-region] active region-configuration
[DeviceB-mst-region] quit
# 配置本設備為MSTI 3的根橋。
[DeviceB] stp instance 3 root primary
# 全局開啟生成樹協議。
[DeviceB] stp global enable
(4) 配置Device C
# 配置MST域的域名為example,將VLAN 10、30、40分別映射到MSTI 1、3、4上,並配置MSTP的修訂級別為0。
<DeviceC> system-view
[DeviceC] stp region-configuration
[DeviceC-mst-region] region-name example
[DeviceC-mst-region] instance 1 vlan 10
[DeviceC-mst-region] instance 3 vlan 30
[DeviceC-mst-region] instance 4 vlan 40
[DeviceC-mst-region] revision-level 0
# 激活MST域的配置。
[DeviceC-mst-region] active region-configuration
[DeviceC-mst-region] quit
# 配置本設備為MSTI 4的根橋。
[DeviceC] stp instance 4 root primary
# 全局開啟生成樹協議。
[DeviceC] stp global enable
(5) 配置Device D
# 配置MST域的域名為example,將VLAN 10、30、40分別映射到MSTI 1、3、4上,並配置MSTP的修訂級別為0。
<DeviceD> system-view
[DeviceD] stp region-configuration
[DeviceD-mst-region] region-name example
[DeviceD-mst-region] instance 1 vlan 10
[DeviceD-mst-region] instance 3 vlan 30
[DeviceD-mst-region] instance 4 vlan 40
[DeviceD-mst-region] revision-level 0
# 激活MST域的配置。
[DeviceD-mst-region] active region-configuration
[DeviceD-mst-region] quit
# 全局開啟生成樹協議。
[DeviceD] stp global enable
在本例中,假定Device B的根橋ID最小,因此該設備將在MSTI 0中被選舉為根橋。
當網絡拓撲穩定後,通過使用display stp brief命令可以查看各設備上生成樹的簡要信息。例如:
# 查看Device A上生成樹的簡要信息。
[DeviceA] display stp brief
MST ID Port Role STP State Protection
0 GigabitEthernet1/0/1 ALTE DISCARDING NONE
0 GigabitEthernet1/0/2 DESI FORWARDING NONE
0 GigabitEthernet1/0/3 ROOT FORWARDING NONE
1 GigabitEthernet1/0/1 DESI FORWARDING NONE
1 GigabitEthernet1/0/3 DESI FORWARDING NONE
3 GigabitEthernet1/0/2 DESI FORWARDING NONE
3 GigabitEthernet1/0/3 ROOT FORWARDING NONE
# 查看Device B上生成樹的簡要信息。
[DeviceB] display stp brief
MST ID Port Role STP State Protection
0 GigabitEthernet1/0/1 DESI FORWARDING NONE
0 GigabitEthernet1/0/2 DESI FORWARDING NONE
0 GigabitEthernet1/0/3 DESI FORWARDING NONE
1 GigabitEthernet1/0/2 DESI FORWARDING NONE
1 GigabitEthernet1/0/3 ROOT FORWARDING NONE
3 GigabitEthernet1/0/1 DESI FORWARDING NONE
3 GigabitEthernet1/0/3 DESI FORWARDING NONE
# 查看Device C上生成樹的簡要信息。
[DeviceC] display stp brief
MST ID Port Role STP State Protection
0 GigabitEthernet1/0/1 DESI FORWARDING NONE
0 GigabitEthernet1/0/2 ROOT FORWARDING NONE
0 GigabitEthernet1/0/3 DESI FORWARDING NONE
1 GigabitEthernet1/0/1 ROOT FORWARDING NONE
1 GigabitEthernet1/0/2 ALTE DISCARDING NONE
4 GigabitEthernet1/0/3 DESI FORWARDING NONE
# 查看Device D上生成樹的簡要信息。
[DeviceD] display stp brief
MST ID Port Role STP State Protection
0 GigabitEthernet1/0/1 ROOT FORWARDING NONE
0 GigabitEthernet1/0/2 ALTE DISCARDING NONE
0 GigabitEthernet1/0/3 ALTE DISCARDING NONE
3 GigabitEthernet1/0/1 ROOT FORWARDING NONE
3 GigabitEthernet1/0/2 ALTE DISCARDING NONE
4 GigabitEthernet1/0/3 ROOT FORWARDING NONE
根據上述顯示信息,可以繪出各VLAN所對應MSTI的拓撲,如圖2-7所示。
圖2-7 各VLAN所對應MSTI的拓撲圖
· Device A和Device B為彙聚層設備,Device C和Device D為接入層設備。
· 通過配置PVST,使VLAN 10、20、30和40中的報文分別按照其各自VLAN所對應的生成樹轉發。
· 由於VLAN 10、20和30在彙聚層設備終結、VLAN 40在接入層設備終結,因此配置VLAN 10和20的根橋為Device A,VLAN 30的根橋為Device B,VLAN 40的根橋為Device C。
圖2-8 PVST典型配置組網圖
(1) 配置VLAN和端口
請按照圖2-8在Device A和Device B上分別創建VLAN 10、20和30,在Device C上創建VLAN 10、20和40,在Device D上創建VLAN 20、30和40;將各設備的各端口配置為Trunk端口並允許相應的VLAN通過,具體配置過程略。
(2) 配置Device A
# 配置生成樹的工作模式為PVST模式。
<DeviceA> system-view
[DeviceA] stp mode pvst
# 配置本設備為VLAN 10和VLAN 20的根橋。
[DeviceA] stp vlan 10 20 root primary
# 全局開啟生成樹協議,並開啟VLAN 10、20和30中的生成樹協議。
[DeviceA] stp global enable
[DeviceA] stp vlan 10 20 30 enable
(3) 配置Device B
# 配置生成樹的工作模式為PVST模式。
<DeviceB> system-view
[DeviceB] stp mode pvst
# 配置本設備為VLAN 30的根橋。
[DeviceB] stp vlan 30 root primary
# 全局開啟生成樹協議,並開啟VLAN 10、20和30中的生成樹協議。
[DeviceB] stp global enable
[DeviceB] stp vlan 10 20 30 enable
(4) 配置Device C
# 配置生成樹的工作模式為PVST模式。
<DeviceC> system-view
[DeviceC] stp mode pvst
# 配置本設備為生成樹VLAN 40的根橋。
[DeviceC] stp vlan 40 root primary
# 全局開啟生成樹協議,並開啟VLAN 10、20和40中的生成樹協議。
[DeviceC] stp global enable
[DeviceC] stp vlan 10 20 40 enable
(5) 配置Device D
# 配置生成樹的工作模式為PVST模式。
<DeviceD> system-view
[DeviceD] stp mode pvst
# 全局開啟生成樹協議,並開啟VLAN 20、30和40中的生成樹協議。
[DeviceD] stp global enable
[DeviceD] stp vlan 20 30 40 enable
當網絡拓撲穩定後,通過使用display stp brief命令可以查看各設備上生成樹的簡要信息。例如:
# 查看Device A上生成樹的簡要信息。
[DeviceA] display stp brief
VLAN ID Port Role STP State Protection
10 GigabitEthernet1/0/1 DESI FORWARDING NONE
10 GigabitEthernet1/0/3 DESI FORWARDING NONE
20 GigabitEthernet1/0/1 DESI FORWARDING NONE
20 GigabitEthernet1/0/2 DESI FORWARDING NONE
20 GigabitEthernet1/0/3 DESI FORWARDING NONE
30 GigabitEthernet1/0/2 DESI FORWARDING NONE
30 GigabitEthernet1/0/3 ROOT FORWARDING NONE
# 查看Device B上生成樹的簡要信息。
[DeviceB] display stp brief
VLAN ID Port Role STP State Protection
10 GigabitEthernet1/0/2 DESI FORWARDING NONE
10 GigabitEthernet1/0/3 ROOT FORWARDING NONE
20 GigabitEthernet1/0/1 DESI FORWARDING NONE
20 GigabitEthernet1/0/2 DESI FORWARDING NONE
20 GigabitEthernet1/0/3 ROOT FORWARDING NONE
30 GigabitEthernet1/0/1 DESI FORWARDING NONE
30 GigabitEthernet1/0/3 DESI FORWARDING NONE
# 查看Device C上生成樹的簡要信息。
[DeviceC] display stp brief
VLAN ID Port Role STP State Protection
10 GigabitEthernet1/0/1 ROOT FORWARDING NONE
10 GigabitEthernet1/0/2 ALTE DISCARDING NONE
20 GigabitEthernet1/0/1 ROOT FORWARDING NONE
20 GigabitEthernet1/0/2 ALTE DISCARDING NONE
20 GigabitEthernet1/0/3 DESI FORWARDING NONE
40 GigabitEthernet1/0/3 DESI FORWARDING NONE
# 查看Device D上生成樹的簡要信息。
[DeviceD] display stp brief
VLAN ID Port Role STP State Protection
20 GigabitEthernet1/0/1 ALTE DISCARDING NONE
20 GigabitEthernet1/0/2 ROOT FORWARDING NONE
20 GigabitEthernet1/0/3 ALTE DISCARDING NONE
30 GigabitEthernet1/0/1 ROOT FORWARDING NONE
30 GigabitEthernet1/0/2 ALTE DISCARDING NONE
40 GigabitEthernet1/0/3 ROOT FORWARDING NONE
根據上述顯示信息,可以繪出各VLAN所對應生成樹的拓撲,如圖2-9所示。
圖2-9 各VLAN所對應生成樹的拓撲圖
(0)
首先stp的報文不打vlan標簽的,交換機默認smtp所有vlan都在一個實例下, 所以MSTP仍然會把這兩個接口視為同一個實例內的端口,給阻塞掉一個端口。
(1)
暫無評論
親~登錄後才可以操作哦!
確定你的郵箱還未認證,請認證郵箱或綁定手機後進行當前操作
舉報
×
侵犯我的權益
×
侵犯了我企業的權益
×
抄襲了我的內容
×
原文鏈接或出處
誹謗我
×
對根叔社區有害的內容
×
不規範轉載
×
舉報說明
暫無評論