Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Protocol
4-1
Copyright 2005 Juniper Networks, Inc.
www.juniper.net
Segment 2
C
Listening
Drops all data packets, listens to BPDUs
Port is transitioning and will be used in active topology
Learning
Drops all data packets, listens to BPDUs
Port is transitioning, switch is learning MAC addresses
Forwarding
Receives and forwards data packets, sends and receives
BPDUs
Port has transitioned, switch continues to learn MAC
addresses
2008 Juniper Networks, Inc. All rights reserved.
Root
Switches exchange
BPDUs
A1
A2
A3
F
F
A2
Designated Ports
Root Ports
A1
A3
B
F
=
Blocking
=
Forwardi
ng
Root
F
F
A1
F
F
F
A2
A3
Reconvergence Example (1 of 2)
Steps:
Root
A
C
TC
N
N
TC
K
AC
N
TC
TC
N
AC
K
1. Bridge G fails
2. Bridge Es port leaves forwarding state
3. Bridge E sends TCN
B
Port leaves
forwarding state
te
Bridge fails
Reconvergence Example (2 of 2)
Steps (contd.):
g
Fla
TC
Fla
g
TC
MAC Fwd
Table
Aging Time
15 sec
g
Fla
MAC Fwd
Table Aging
Time 15 sec
TC
A
g
F la
MAC Fwd
Table Aging
Time 15
sec
TC
MAC Fwd
Table Aging
Time 15
sec
g
F la
Root
TC
MAC Fwd
Table
Aging
Time 15
sec
Rapid STP
First defined in IEEE 802.1w; later
incorporated into IEEE 802.1D-2004
Convergence improvements include:
Point-to-point link designation
Edge port designation
Direct and indirect link failure and recovery
10
(Root)
Alternate port:
Provides alternate path to root bridge
(nondesignated switches)
Blocks traffic while receiving superior
BPDUs from neighboring switch
Backup port:
Provides redundant path to a
segment (designated switches only)
Blocks traffic while a more preferred
port functions as designated port
Switch A
R
R
B
A Switch
Root Port = R
Designated Port = D
Alternate Port = A
Backup Port = B
11
802.1D-2004
RSTP
Alternate,
backup, and
disabled ports
Disabled
Blocking
Discarding
Root and designated
ports
Listening
Learning
Learning
Forwarding
Forwarding
12
RSTP BPDUs
RSTP BPDUs
Act as keepalives
RSTP bridges send BPDUs every hello time (default of 2
seconds)
13
14
15
Blocking =
Root Port =
Designated Port =
Alternate Port =
F
D
Switch A
F
Infe
rior
Switch A
BPD
U
F
Supe
rior
BPD
U
F D
16
Root
Switch B
F R
Switch B
F
F
Switch A
R
F
Switch A
R F
Forwarding =
Blocking =
Root Port =
Designated Port = D
Alternate Port =
17
18
Multiple STP
Each switch maintains
a topology for the
Orange and Purple
instances
Root: Orange
VLANs 1100
F F
F B
F F
F
B F
Root: Purple
VLANs 101200
19
Region A
MST
Region B
20
CST
B
CST =
Blocking =
B
B
21
22
Configuring STP
[edit protocols stp]
user@switch# set ?
Possible completions:
+ apply-groups
+ apply-groups-except
bridge-priority
disable
forward-delay
hello-time
> interface
max-age
> traceoptions
23
Configuring RSTP
[edit protocols rstp]
user@switch# show
bridge-priority 32k;
max-age 20;
hello-time 2;
forward-delay 15;
interface ge-0/0/10.0 {
disable;
}
interface ge-0/0/13.0 {
priority 128;
mode point-to-point;
}
interface ge-0/0/14.0 {
cost 20000;
mode shared;
}
interface ge-0/0/2.0 {
edge;
}
24
25
Port ID
128:523
128:524
128:525
128:526
128:527
128:528
Designated
port ID
128:523
128:524
128:525
128:526
128:527
128:528
Designated
bridge ID
32768.0019e2507c00
32768.0019e2507c00
32768.0019e2507c00
32768.0019e2503fe0
32768.0019e2503fe0
32768.0019e2503fe0
Port
Cost
20000
20000
20000
20000
20000
20000
State
Role
BLK
BLK
BLK
FWD
BLK
BLK
ALT
ALT
ALT
ROOT
ALT
ALT
BPDUs sent
ge-0/0/10.0
ge-0/0/11.0
ge-0/0/12.0
ge-0/0/13.0
ge-0/0/14.0
ge-0/0/15.0
7
7
7
7
7
7
BPDUs received
5
5
5
4
5
5
Next BPDU
transmission
0
0
0
0
0
0
26
Configuring MSTP
[edit protocols mstp]
user@switch# show
configuration-name reg1;
revision-level 1;
msti 1 {
bridge-priority 4k;
vlan 1-10;
}
msti 2 {
bridge-priority 8k;
vlan 11-20;
}
msti 3 {
bridge-priority 12k;
vlan 21-30;
}
27
Monitoring MSTP (1 of 3)
user@switch> show spanning-tree ?
Possible completions:
bridge
Show STP bridge parameters
interface
Show STP interface parameters
mstp
Show Multiple Spanning Tree Protocol information
statistics
Show STP statistics
user@switch> show spanning-tree mstp configuration
MSTP configuration information
Context identifier
: 0
Region name
: reg1
Revision
: 1
Configuration digest
: 0x476c7ee38f56eea4a9bbe3fa9e7b7979
MSTI
0
1
2
3
Member VLANs
0,31-4094
1-10
11-20
21-30
Values must
match for all
switches within
a common MST
region
Configuration
digest is
determined by
contents of MSTI to
VID table
28
Monitoring MSTP (2 of 3)
user@switch> show spanning-tree interface
Spanning tree interface parameters for instance 0
Interface
ge-0/0/10.0
Port ID
128:523
Designated
port ID
128:523
Designated
bridge ID
32768.0019e2507c00
Interfaces and
associated details are
listed by instance
Port
Cost
20000
State
Role
BLK
ALT
Port
Cost
20000
State
Role
FWD
DESG
Port
Cost
20000
State
Role
FWD
ROOT
Port ID
128:526
Designated
port ID
128:526
Designated
bridge ID
4097.0019e25082e0
Port ID
128:527
Designated
port ID
128:527
Designated
bridge ID
12290.0019e2503fe0
29
Monitoring MSTP (3 of 3)
user@switch> show spanning-tree bridge
STP bridge parameters
Context ID
: 0
Enabled protocol
: MSTP
STP bridge parameters for CIST
Root ID
Root cost
Root port
CIST regional root
:
:
:
:
:
:
:
:
32768.00:19:e2:50:3f:e0
0
ge-0/0/13.0
32768.00:19:e2:50:3f:e0
4097.00:19:e2:50:82:e0
2 seconds
20 seconds
15 seconds
STP details
are listed by
instance
: 4097.00:19:e2:50:82:e0
: 0
: 1
30
Solution:
31
Switch BST
Trunk
BPDUs
BPDUs
Trunk
[edit protocols stp]
user@switch# show
interface ge-0/0/5.0 {
edge;
}
interface ge-0/0/10.0 {
edge;
}
bpdu-block-on-edge;
Distribution Lay
Trunk
Access Layer
Switch CSTP
ge-0/0/5
BPDUs
ge-0/0/10
B
Access Ports
BPDUs
32
Switch BST
Trunk
BPDUs
BPDUs
Trunk
Trunk
Distribution Lay
Access Layer
[edit ethernet-switching-options]
user@switch# show
Switch Cnon-STP
bpdu-block {
interface ge-0/0/5.0;
interface ge-0/0/10.0;
}
ge-0/0/5
BPDUs
ge-0/0/10
B
Access Ports
BPDUs
33
34
The solution:
35
Distribution Layer
Access Layer
BPDUs
ge-0/0/5
BPDUs
Trunk
ge-0/0/10
A
Switch B
Switch C
36
37
The solution:
38
Switch A
A
D
BPDUs
Switch C
Switch Broot
Distribution Lay
ge-0/0/10D
Access Layer
Superior
BPDUs
Switch D
39
40
41
Switch A
Switch B
Nonactive Link
Active Link
Access Layer
Switch C
2008 Juniper Networks, Inc. All rights reserved.
42
Configuration Considerations
Redundant trunk group feature and STP are
mutually exclusive on a given port
Access layer (Switch C in the previous example):
Cannot run STP on redundant trunk group links
STP BPDUs received on redundant trunk group links are
discarded
43
A verification is performed
to ensure that STP is not
running on redundant
trunk group links
2008 Juniper Networks, Inc. All rights reserved.
44
Flap
count
2
2
State
ge-0/0/13.0 Up/Pri/Act
ge-0/0/16.0 Up
Bandwidth
1000 Mbps
1000 Mbps
Flap
count
2
2
45