華爲設備上STP模式、RSTP模式下開關機是否觸發TC變更(源自考官的一道追問題目)

聲明:本實驗用真機完成,終端採用了路由器和PC。
華爲交換測試版本:
[SW2] dis version
Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.160 (S5700 V200R009C00SPC500)
Copyright (C) 2000-2016 HUAWEI TECH CO., LTD
Quidway S5700-52P-LI-AC Routing Switch uptime is 0 week, 0 day, 0 hour, 1 minute

LS52T52S 0(Master) : uptime is 0 week, 0 day, 0 hour, 0 minute
256M bytes DDR Memory
64M bytes FLASH
Pcb Version : VER.B
Basic BootROM Version : 0001.0015 Compiled at 禗姚拠Q9:-`+A閯
€(
CPLD Version : 0109
Software Version : VRP (R) Software, Version 5.160 (V200R009C00SPC500)
[SW2] dis version
Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.160 (S5700 V200R009C00SPC500)
Copyright (C) 2000-2016 HUAWEI TECH CO., LTD
Quidway S5700-52P-LI-AC Routing Switch uptime is 0 week, 0 day, 0 hour, 1 minute

LS52T52S 0(Master) : uptime is 0 week, 0 day, 0 hour, 0 minute
256M bytes DDR Memory
64M bytes FLASH
Pcb Version : VER.B
Basic BootROM Version : 0001.0015 Compiled at 禗姚拠Q9:-`+A閯
€(
CPLD Version : 0109
Software Version : VRP (R) Software, Version 5.160 (V200R009C00SPC500)

1.實驗拓撲

R1(config)#do sh lldp nei
Capability codes:
(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other

Device ID Local Intf Hold-time Capability Port ID
SW2 Gi0/1 120 B GigabitEthernet0/0/2
即:
R1(g0/1)-----SW2(G0/0/2)
R1後面實驗換成一臺PC。

2.STP模式下交換機接口UP/DOWN是否產生TC或者TCN

[SW2]stp mode stp //STP模式
[SW2-GigabitEthernet0/0/2]stp edged-port enable //開啓STP模式下的邊緣端口
[SW2]dis stp interface g0/0/2 //在兩端接口開啓的情況下驗證該接口的STP狀態
-------[CIST Global Info][Mode STP]-------
CIST Bridge :32768.f84a-bfeb-4a0f
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.f84a-bfeb-4a0f / 0 (This bridge is the root)
CIST RegRoot/IRPC :32768.f84a-bfeb-4a0f / 0
CIST RootPortId :0.0
BPDU-Protection :Disabled
TC or TCN received :0
TC count per hello :0

STP Converge Mode :Normal
Share region-configuration :Enabled
Time since last TC :0 days 0h:0m:59s
Number of TC :1
Last TC occurred :GigabitEthernet0/0/2
----[Port2(GigabitEthernet0/0/2)][FORWARDING]----
Port Protocol :Enabled
Port Role :Designated Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=20000
Designated Bridge/Port :32768.f84a-bfeb-4a0f / 128.2
Port Edged :Config=enabled / Active=enabled
Point-to-point :Config=auto / Active=true
Transit Limit :6 packets/s
Protection Type :None
Port STP Mode :STP
Port Protocol Type :Config=auto / Active=dot1s
BPDU Encapsulation :Config=stp / Active=stp
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 20
TC or TCN send :17
TC or TCN received :0

BPDU Sent :48
TCN: 0, Config: 48, RST: 0, MST: 0
BPDU Received :0
TCN: 0, Config: 0, RST: 0, MST: 0
Last forwarding time: 2018/03/24 16:57:09 UTC-05:13

在路由器上:
R1(config)#int g0/1
R1(config-if)#shu
R1(config-if)#shutdown //關閉路由器上連接交換機的接口,來模擬終端關機
驗證STP接口的狀態
[SW2]dis stp interface g0/0/2
-------[CIST Global Info][Mode STP]-------
CIST Bridge :32768.f84a-bfeb-4a0f
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.f84a-bfeb-4a0f / 0 (This bridge is the root)
CIST RegRoot/IRPC :32768.f84a-bfeb-4a0f / 0
CIST RootPortId :0.0
BPDU-Protection :Disabled
TC or TCN received :0
TC count per hello :0
STP Converge Mode :Normal
Share region-configuration :Enabled
Time since last TC :0 days 0h:4m:24s
Number of TC :1
Last TC occurred :GigabitEthernet0/0/2
----[Port2(GigabitEthernet0/0/2)][DOWN]----
Port Protocol :Enabled
Port Role :Disabled Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=200000000
Designated Bridge/Port :32768.f84a-bfeb-4a0f / 128.2
Port Edged :Config=enabled / Active=enabled
Point-to-point :Config=auto / Active=false
Transit Limit :6 packets/s
Protection Type :None
Port STP Mode :STP
Port Protocol Type :Config=auto / Active=dot1s
BPDU Encapsulation :Config=stp / Active=stp
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 20
TC or TCN send :0 //由於接口關閉,沒有發送TC或者TCN
TC or TCN received :0 //由於接口關閉,自然也收不到TC或者TCN
BPDU Sent :0
TCN: 0, Config: 0, RST: 0, MST: 0
BPDU Received :0
TCN: 0, Config: 0, RST: 0, MST: 0
再次開啓路由器的接口

R1(config-if)#int g0/1
R1(config-if)#no shu
[SW2]dis stp interface g0/0/2
-------[CIST Global Info][Mode STP]-------
CIST Bridge :32768.f84a-bfeb-4a0f
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.f84a-bfeb-4a0f / 0 (This bridge is the root)
CIST RegRoot/IRPC :32768.f84a-bfeb-4a0f / 0
CIST RootPortId :0.0
BPDU-Protection :Disabled
TC or TCN received :0
TC count per hello :0
STP Converge Mode :Normal
Share region-configuration :Enabled
Time since last TC :0 days 0h:16m:52s
Number of TC :1
Last TC occurred :GigabitEthernet0/0/2
----[Port2(GigabitEthernet0/0/2)][FORWARDING]----
Port Protocol :Enabled
Port Role :Designated Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=20000
Designated Bridge/Port :32768.f84a-bfeb-4a0f / 128.2
Port Edged :Config=enabled / Active=enabled
Point-to-point :Config=auto / Active=true
Transit Limit :6 packets/s
Protection Type :None
Port STP Mode :STP
Port Protocol Type :Config=auto / Active=dot1s
BPDU Encapsulation :Config=stp / Active=stp
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 20
TC or TCN send :0
TC or TCN received :0
//在STP模式下開啓連接交換機的接口或者關閉接口沒有產生TC或者TCN
BPDU Sent :204
TCN: 0, Config: 204, RST: 0, MST: 0
BPDU Received :0
TCN: 0, Config: 0, RST: 0, MST: 0
Last forwarding time: 2018/03/24 17:07:15 UTC-05:13
拔掉路由器連接SW的接口,連接到PC上,此時的STP:
[SW2]dis stp interface g0/0/2
-------[CIST Global Info][Mode STP]-------
CIST Bridge :32768.f84a-bfeb-4a0f
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.f84a-bfeb-4a0f / 0 (This bridge is the root)
CIST RegRoot/IRPC :32768.f84a-bfeb-4a0f / 0
CIST RootPortId :0.0
BPDU-Protection :Disabled
TC or TCN received :0
TC count per hello :0
STP Converge Mode :Normal
Share region-configuration :Enabled
Time since last TC :0 days 0h:19m:55s
Number of TC :1
Last TC occurred :GigabitEthernet0/0/2
----[Port2(GigabitEthernet0/0/2)][DOWN]----
Port Protocol :Enabled
Port Role :Disabled Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=200000000
Designated Bridge/Port :32768.f84a-bfeb-4a0f / 128.2
Port Edged :Config=enabled / Active=enabled
Point-to-point :Config=auto / Active=false
Transit Limit :6 packets/s
Protection Type :None
Port STP Mode :STP
Port Protocol Type :Config=auto / Active=dot1s
BPDU Encapsulation :Config=stp / Active=stp
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 20
TC or TCN send :0
TC or TCN received :0
//拔掉路由器上連接SW的接口依舊沒有TC或者TCN
BPDU Sent :0
TCN: 0, Config: 0, RST: 0, MST: 0
BPDU Received :0
TCN: 0, Config: 0, RST: 0, MST: 0
把交換機接口連接到一臺開啓的PC上:
[SW2]dis stp interface g0/0/2
-------[CIST Global Info][Mode STP]-------
CIST Bridge :32768.f84a-bfeb-4a0f
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.f84a-bfeb-4a0f / 0 (This bridge is the root)
CIST RegRoot/IRPC :32768.f84a-bfeb-4a0f / 0
CIST RootPortId :0.0
BPDU-Protection :Disabled
TC or TCN received :0
TC count per hello :0
STP Converge Mode :Normal
Share region-configuration :Enabled
Time since last TC :0 days 0h:23m:42s
Number of TC :1
Last TC occurred :GigabitEthernet0/0/2
----[Port2(GigabitEthernet0/0/2)][FORWARDING]----
Port Protocol :Enabled
Port Role :Designated Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=20000
Designated Bridge/Port :32768.f84a-bfeb-4a0f / 128.2
Port Edged :Config=enabled / Active=enabled
Point-to-point :Config=auto / Active=true
Transit Limit :6 packets/s
Protection Type :None
Port STP Mode :STP
Port Protocol Type :Config=auto / Active=dot1s
BPDU Encapsulation :Config=stp / Active=stp
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 20
TC or TCN send :0
TC or TCN received :0

BPDU Sent :36
TCN: 0, Config: 36, RST: 0, MST: 0
BPDU Received :0
TCN: 0, Config: 0, RST: 0, MST: 0
Last forwarding time: 2018/03/24 17:19:43 UTC-05:13
拔掉PC的接口:
[SW2]dis stp interface g0/0/2
Mar 24 2018 17:22:24-05:13 SW2 %%01IFPDT/4/IF_STATE(l)[39]:Interface GigabitEthernet0/0/2 has turned into UP state.
Mar 24 2018 17:22:24-05:13 SW2 %%01IFNET/4/IF_STATE(l)[40]:Interface Vlanif1 has turned into UP state.
-------[CIST Global Info][Mode STP]-------
CIST Bridge :32768.f84a-bfeb-4a0f
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Mar 24 2018 17:22:24-05:13 SW2 %%01IFNET/4/LINK_STATE(l)[41]:The line protocol IP on the interface Vlanif1 has entered the UP state.
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.f84a-bfeb-4a0f / 0 (This bridge is the root)
CIST RegRoot/IRPC :32768.f84a-bfeb-4a0f / 0
CIST RootPortId :0.0
BPDU-Protection :Disabled
TC or TCN received :0
TC count per hello :0
STP Converge Mode :Normal
Share region-configuration :Enabled
Time since last TC :0 days 0h:25m:15s
Number of TC :1
Last TC occurred :GigabitEthernet0/0/2
----[Port2(GigabitEthernet0/0/2)][FORWARDING]----
Port Protocol :Enabled
Port Role :Designated Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=20000
Designated Bridge/Port :32768.f84a-bfeb-4a0f / 128.2
Port Edged :Config=enabled / Active=enabled
Point-to-point :Config=auto / Active=true
Transit Limit :6 packets/s
Protection Type :None
Port STP Mode :STP
Port Protocol Type :Config=auto / Active=dot1s
BPDU Encapsulation :Config=stp / Active=stp
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 20
TC or TCN send :0
TC or TCN received :0 //依舊沒有TC或者TCN
BPDU Sent :2
TCN: 0, Config: 2, RST: 0, MST: 0
BPDU Received :0
TCN: 0, Config: 0, RST: 0, MST: 0
Last forwarding time: 2018/03/24 17:22:24 UTC-05:13

3.RSTP模式下華爲交換機接口UP/DOWN是否產生TC或者TCN

[SW2]stp mode rstp
Info: This operation may take a few seconds. Please wait for a moment...done.

    [SW2]dis stp interface g0/0/2

-------[CIST Global Info][Mode RSTP]-------
CIST Bridge :32768.f84a-bfeb-4a0f
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.f84a-bfeb-4a0f / 0 (This bridge is the root)
CIST RegRoot/IRPC :32768.f84a-bfeb-4a0f / 0
CIST RootPortId :0.0
BPDU-Protection :Disabled
TC or TCN received :0
TC count per hello :0
STP Converge Mode :Normal
Share region-configuration :Enabled
Time since last TC :0 days 0h:32m:57s
Number of TC :1
Last TC occurred :GigabitEthernet0/0/2
----[Port2(GigabitEthernet0/0/2)][FORWARDING]----
Port Protocol :Enabled
Port Role :Designated Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=20000
Designated Bridge/Port :32768.f84a-bfeb-4a0f / 128.2
Port Edged :Config=enabled / Active=enabled
Point-to-point :Config=auto / Active=true
Transit Limit :6 packets/s
Protection Type :None
Port STP Mode :RSTP
Port Protocol Type :Config=auto / Active=dot1s
BPDU Encapsulation :Config=stp / Active=stp
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 20
TC or TCN send :0
TC or TCN received :0
BPDU Sent :235
TCN: 0, Config: 46, RST: 189, MST: 0
BPDU Received :0
TCN: 0, Config: 0, RST: 0, MST: 0
Last forwarding time: 2018/03/24 17:22:24 UTC-05:13
拔掉接口:
[SW2]dis stp interface g0/0/2
-------[CIST Global Info][Mode RSTP]-------
CIST Bridge :32768.f84a-bfeb-4a0f
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.f84a-bfeb-4a0f / 0 (This bridge is the root)
CIST RegRoot/IRPC :32768.f84a-bfeb-4a0f / 0
CIST RootPortId :0.0
BPDU-Protection :Disabled
TC or TCN received :0
TC count per hello :0
STP Converge Mode :Normal
Share region-configuration :Enabled
Time since last TC :0 days 0h:33m:41s
Number of TC :1
Last TC occurred :GigabitEthernet0/0/2
----[Port2(GigabitEthernet0/0/2)][DOWN]----
Port Protocol :Enabled
Port Role :Disabled Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=200000000
Designated Bridge/Port :32768.f84a-bfeb-4a0f / 128.2
Port Edged :Config=enabled / Active=enabled
Point-to-point :Config=auto / Active=false
Transit Limit :6 packets/s
Protection Type :None
Port STP Mode :RSTP
Port Protocol Type :Config=auto / Active=dot1s
BPDU Encapsulation :Config=stp / Active=stp
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 20
TC or TCN send :0
TC or TCN received :0
BPDU Sent :0
TCN: 0, Config: 0, RST: 0, MST: 0
BPDU Received :0
TCN: 0, Config: 0, RST: 0, MST: 0
插上PC連接交換機的接口:
[SW2]dis stp interface g0/0/2
-------[CIST Global Info][Mode RSTP]-------
CIST Bridge :32768.f84a-bfeb-4a0f
Config Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
Active Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.f84a-bfeb-4a0f / 0 (This bridge is the root)
CIST RegRoot/IRPC :32768.f84a-bfeb-4a0f / 0
CIST RootPortId :0.0
BPDU-Protection :Disabled
TC or TCN received :0
TC count per hello :0
STP Converge Mode :Normal
Share region-configuration :Enabled
Time since last TC :0 days 0h:34m:23s
Number of TC :1
Last TC occurred :GigabitEthernet0/0/2
----[Port2(GigabitEthernet0/0/2)][FORWARDING]----
Port Protocol :Enabled
Port Role :Designated Port
Port Priority :128
Port Cost(Dot1T ) :Config=auto / Active=20000
Designated Bridge/Port :32768.f84a-bfeb-4a0f / 128.2
Port Edged :Config=enabled / Active=enabled
Point-to-point :Config=auto / Active=true
Transit Limit :6 packets/s
Protection Type :None
Port STP Mode :RSTP
Port Protocol Type :Config=auto / Active=dot1s
BPDU Encapsulation :Config=stp / Active=stp
PortTimes :Hello 2s MaxAge 20s FwDly 15s RemHop 20
TC or TCN send :0
TC or TCN received :0
BPDU Sent :3
TCN: 0, Config: 0, RST: 3, MST: 0
BPDU Received :0
TCN: 0, Config: 0, RST: 0, MST: 0
Last forwarding time: 2018/03/24 17:31:30 UTC-05:13
以上實驗表明華爲交換機上無論是STP還是RSTP模式在接口UP/DOWN時都沒有產生TC或者TCN BPDU

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