Les réseaux sans fils | Le Spanning Tree | OSPF | La Sécurité |
Vous êtes le 1555e visiteur
NB : Ce document issu de mon rapport de fin d'étude fut initialement rédigé en anglais. Une version française sear prochainement disponible
The spanning tree protocol is designed to solve the different issues raised
by redundant topologies in an Ethernet network. It is part of the IEEE 802.1D
specification for Media Access Control Bridge.
If we consider a simple redundant network we are confronted with several problems.
fig 1 - A simple redundant network
Let’s imagine the server wants to communicate with the station, there may be :
The solution retained in 802.1D norm is not to use some of their port when
forwarding traffic. In fact the spanning tree protocol consists in transforming
the network graph topology into a tree topology, which would suppress any
loop.
To carry this protocol a new level 2-type frame was introduced : Bridge Protocol
Data Unit.
First, the algorithm needs a root for the algorithm. This particular bridge
is elected through the exchange of BPDU. In fact each bridge receives an identifier
made part from its MAC address and part from an arbitrary given value. The
bridge with the lowest identifier becomes the designated root. Each BPDU sent
contains the supposed root bridge and its priority.
Each bridge first assumes he is the root and advertises the other bridges
on the network. Then after few BPDU exchanges the network should converge
to a single root, which is really the one with the lowest identifier.
Besides root bridge a designated bridge and a designated port is defined for
each LAN on the network. The designated bridge is the bridge from which this
LAN frames are forwarded to the root and the designated port for that LAN
is the corresponding port. Each bridge has also a root port from which it
sees its root.
So as for bridge each port has a particular identifier made part of a fixed
value and a configurable value.
Once the bridge is elected each port search its nearest port to the root and
negotiates its utilisation with the corresponding neighbouring bridge. Then
the corresponding port may be used to forward traffic or kept in standby.
A bridge port can be in four states from a spanning tree point of view :
The root bridge is in charge of periodically sending BPDUs on the network.
If a given bridge happens not to receive any root BPDU for a max_age timer
(usually 20 s), it will call for a new root election and will compute its
ports state again.
All port then pass in listening state for a forward_delay period (usually
15 s). This is supposed to be the time the switch needed to collect information
and take a decision regarding the port state. The port should then go blocked
or learning.
The learning state will last forward_delay again. This elapse of time is necessary
to ensure the new spanning tree configuration has been seen by all bridge
on the network and avoid any temporary loop. Yet the bridge can already learn
addresses from this port. Finally the port may become forwarding or even blocked
if new information has told the bridge to.
If a bridge sees a local topology change it will immediately send a topology
change notification to the root, which will notify this change to other bridge
asking them to refresh their address database more quickly.
fig 2 - Configuration BPDU
Protocol identifier : takes the value 0 for spanning tree
Protocol version id : takes the value 0
BPDU type : 0 specify a configuration BDPU
Flags : used to signal a topology change (bit 1)
fig 3 - Topology change notification BPDU
BPDU type : takes the value 128
Maximum bridge diameter recommended : 7
Parameter |
Recommended value |
Absolute maximum |
Maximum bridge transit delay | 1.0 s |
4.0 s |
Maximum BPDU transmission delay | 1.0 s |
4.0 s |
Maximum message age increment overestimate | 1.0 s |
4.0 s |
Table 1 - Transit and Transmission table
Parameter |
Recommended or default value |
Fixed value |
Range |
Bridge hello time | 2.0 s |
- |
1.0 – 10.0 s |
Bridge Max Age | 20.0 s |
- |
6.0 – 40.0 s |
Bridge Forward Delay | 15.0 s |
- |
4.0 – 30.0 s |
Hold Time | - |
1.0 s |
- |
Table 2 - Spanning Tree algorithm timer values
Parameter |
Recommended or default value |
Range |
Bridge priority | 32,768 |
0-65,535 |
Port Priority | 128 |
0-255 |
Table 3 - Bridge and Port Priority parameter values
Link speed |
Recommended value |
Recommanded range |
Range |
4 Mbps |
250 |
100-1 ,000 |
1 - 65,536 |
10 Mbps |
100 |
50-600 |
1-65,536 |
16 Mbps |
62 |
40-400 |
1-65,536 |
100 Mbps |
19 |
10-60 |
1-65,536 |
1 Gbps |
4 |
3-10 |
1-65,536 |
10 Gbps |
2 |
1-5 |
1-65,536 |
Table 4 - Path Cost parameter values