Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Part 3
Pr. Balboul Younes
Docteur en Télécommunications et Ingénieur Télécoms Radio Mobile
HUAWEI Certified Academy Instructor
Part 3 : Cours HCIA Routing & Switching
1) Establishing a Single Switched Network
2) Spanning Tree Protocol
3) Rapid Spanning Tree Protocol
4) Questions HCIA Routing & Switching
G0/0/1
G0/0/2 G0/0/3
MAC Interface
G0/0/1
G0/0/2 G0/0/3
MAC Interface
G0/0/1
00-01-02-03-04-AA G0/0/1
G0/0/2 G0/0/3
G0/0/1
G0/0/2 G0/0/3
Switch A
MAC Interface
G0/0/1
00-01-02-03-04-AA G0/0/1
G0/0/2 G0/0/3
00-01-02-03-04-CC G0/0/3
G0/0/1
<SWA>system-view
Enter system view, return user view with Ctrl+Z.
[SWA]interface GigabitEthernet 0/0/1
[SWA-GigabitEthernet0/0/1]undo negotiation auto
[SWA-GigabitEthernet0/0/1]duplex full
[SWA-GigabitEthernet0/0/1]speed 100
Switch A Host A
G0/0/1
Switch B
Host A
G0/0/3
G0/0/2
00-01-02-03-04-AA
Switch A
Host B
Switch C
00-01-02-03-04-BB
Switch B
Host A
G0/0/3
G0/0/2
00-01-02-03-04-AA
Switch A
MAC Interface
00-01-02-03-04-AA G0/0/3
00-01-02-03-04-AA G0/0/2
Host B
Switch C
00-01-02-03-04-BB
Switch B
Host A
G0/0/3
G0/0/2
00-01-02-03-04-AA
Switch A
Host B
Switch C
00-01-02-03-04-BB
Non-Root Non-Root
Root
BPDU BPDU
Configuration TCN
RPC 0 RPC 0
20000 20000
RPC 20000 20000
20000
20000
RPC 20000 RPC 20000 RPC 20000
20000
⚫ Root path cost is carried in the BPDU and used to determine the shortest path to
the root.
Root
RPC 0 RPC 0
D D
R RPC 20000 R
A D
R R R
A 128.2
R
128.1
32768 00-01-02-03-04-CC
⚫ Where the root path cost is equal, a port identifier is used to determine the active
and alternate paths to the root.
Switch A
32768 00-e0-fc-16-ee-43
BPDU BPDU
BPDU BPDU
BPDU
Switch B Switch C
32768 00-e0-fc-41-42-59
BPDU 32768 00-e0-fc-41-43-69
D A
Switch B Switch C
G0/0/2 G0/0/2
⚫ The Bridge ID and Root Path Cost are used to elect port roles.
Part 1 : HCIA Routing & Switching 24
2) Spanning Tree Protocol
Port State Transition
Disabled
① ⑤
⑤
③
Forwarding Blocking
⑤ ③
③
④ ⑤
Learning Listening
④
Root
⚫ Non root bridges wait for MAX Age before assuming loss of root.
Switch A
Root
BPDU
Switch B Switch C
A
BPDU
A
R Switch C
32768 00-01-02-03-04-CC
Switch B
Host A
G0/0/3
G0/0/2
A 00-01-02-03-04-AA
Switch A
MAC Interface
00-01-02-03-04-AA G0/0/3
00-01-02-03-04-BB G0/0/2
R
Host B
Switch C
00-01-02-03-04-BB
Root
BPDU BPDU
TCN BPDU
TCN BPDU
Host A
Switch B
G0/0/3
G0/0/2 00-01-02-03-04-AA
Switch A G0/0/1 D
MAC Interface
00-01-02-03-04-AA G0/0/3
00-01-02-03-04-BB G0/0/2
Root G0/0/1
R 00-01-02-03-04-BB G0/0/1
Switch C Host B
00-01-02-03-04-BB
Switch A
Switch B Switch C
[SWA]stp mode ?
mstp Multiple Spanning Tree Protocol (MSTP) mode
rstp Rapid Spanning Tree Protocol (RSTP) mode
stp Spanning Tree Protocol (STP) mode
[SWA]stp mode stp
Switch B Switch C
Switch B Switch C
[SWC]stp pathcost-standard ?
dot1d-1998 IEEE 802.1D-1998
dot1t IEEE 802.1T
legacy Legacy
[SWC]interface GigabitEthernet 0/0/1
[SWC-GigabitEthernet0/0/1]stp cost 2000
Switch B Switch C
[SWA]display stp
-------[CIST Global Info][Mode STP]-------
CIST Bridge :4096 .00-01-02-03-04-BB
Bridge Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :4096 .00-01-02-03-04-BB / 0
CIST RegRoot/IRPC :4096 .00-01-02-03-04-BB / 0
CIST RootPortId :0.0
BPDU-Protection :Disabled
TC or TCN received :37
TC count per hello :0
STP Converge Mode :Normal
Share region-configuration :Enabled
Time since last TC :0 days 0h:1m:29s
……
[SWA]display stp
……
----[Port1(GigabitEthernet0/0/1)][FORWARDING]----
Port Protocol :Enabled
Port Role :Designated Port
Port Priority :128
Port Cost(Dot1T ) :Config=2000 / Active=2000
Designated Bridge/Port :4096.00-01-02-03-04-BB / 128.1
Port Edged :Config=default / Active=disabled
Point-to-point :Config=auto / Active=true
Transit Limit :147 packets/hello-time
Protection Type :Root
……
STP RSTP
D R
Root
D A
D D
A
R
Edge Port
⚫ Edge ports do not receive BDPU and can instantly forward data.
Part 1 : HCIA Routing & Switching 42
3) Rapid Spanning Tree Protocol
Port States of RSTP
Switch A
Switch B Switch C
RST BPDU
Switch A
32768 00-e0-fc-16-ee-43
D D
D D
D D
Switch B Switch C
⚫ All RSTP enabled switches begin as root and send RST BPDU.
Switch A
32768 00-e0-fc-16-ee-43
D D
RST BPDU
RST BPDU
D D
D D
Switch B Switch C
Switch A
32768 00-e0-fc-16-ee-43
D D
RST BPDU
D D
D
Switch B Switch C
Switch A
32768 00-e0-fc-16-ee-43
D D
RST BPDU
R D
D
Switch B Switch C
Switch A
32768 00-e0-fc-16-ee-43
D D
RST BPDU
R RST BPDU D
D D
Switch B Switch C
RST BPDU
32768 00-e0-fc-41-42-59 32768 00-e0-fc-41-43-69
Switch A
32768 00-e0-fc-16-ee-43
RST BPDU
D D
Switch B Switch C
RST BPDU
32768 00-e0-fc-41-42-59 32768 00-e0-fc-41-43-69
Switch A
32768 00-e0-fc-16-ee-43
RST BPDU
RST BPDU
D R
Switch B Switch C
Switch A
32768 00-e0-fc-16-ee-43
D D
R R
STP Enabled
D A
Switch B Switch C
BPDU
32768 00-e0-fc-41-42-59 32768 00-e0-fc-41-43-69
Switch A Switch B
Root
Switch C
⚫ The stp mode rstp command allows all ports of the switch to
generate RST BPDU.
Part 1 : HCIA Routing & Switching 60
3) Rapid Spanning Tree Protocol
Configuration Validation
[SWA]display stp
-------[CIST Global Info][Mode RSTP]-------
CIST Bridge :32768.00-e0-fc-16-ee-43
Bridge Times :Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC :32768.00-e0-fc-16-ee-43 / 0
CIST RegRoot/IRPC :32768.00-e0-fc-16-ee-43 / 0
CIST RootPortId :0.0
BPDU-Protection :Disabled
TC or TCN received :37
TC count per hello :0
STP Converge Mode :Normal
Share region-configuration :Enabled
Time since last TC :0 days 0h:14m:43s
Switch A Switch B
Root
G0/0/3
Edge Port
Switch C
Switch A Switch B
Root
G0/0/3
Edge Port
Switch C
Switch A Switch B
Root
BPDU
Switch C
[SWC]stp bpdu-protection
Switch A Switch B
Root
BPDU
A
R
G0/0/1
Switch C
[SWC-GigabitEthernet0/0/1]stp loop-protection
5) false