here - Technion

advertisement
1. Introduction
The MST takes the best of two worlds: the idea of multiple trees introduced in the
PVST+ where each VLAN holds its own spanning tree and the idea of IEEE 802.1q
standard which assumes only one spanning tree for the entire network.
MST comes to solve the problems in the previously mentioned protocols. In the
diagram you see three bridges with the given physical topology. In this topology there are
800 VLANs.
In PVST+ each VLAN holds the spanning tree witch suites it best. However,
notice that there are only two possible spanning trees, but here, 800 trees are maintained.
MST solves this problem by mapping the VLANs 1-400 to one spanning tree, and the
other 401 – 800 VLANs to another spanning tree. (Notice that now only two trees are
maintained).
B3
B2
VLANs
1-400
VLANs
401-800
B1
In the IEEE 802.1q standard there is only one tree called the CST, which all
VLANs use. This might cause tremendous traffic problems, since no load balancing is
possible, however there is only one spanning tree maintained. In this case MST holds two
spanning trees, and also manages to reach optimum load balancing results.
B3 ROOT
B2
VLANs
1-800
B1
MST Region is a group of bridges with a common MST configuration. The MSTP
operates inside such a region creating up to 16 spanning trees in the region. Each tree is
known as MST Instance (MSTI). One of these MSTIs is known as the IST. This spanning
tree is a sub tree of the CST (the CST is a spanning tree which spans the entire network).
So after applying the MST Protocol on a network, the result is regions with 16
spanning trees inside of each, and a spanning tree (CST) spanning the regions. Each
region is an independent unit – replacing the entire region with an RSTP bridge, leads to
little change in the behavior of the remainder of the bridged local area network.
MSTP speeds recovery from errors such as broken link errors. When a bridge falls
we usually need to start building the spanning tree from the beginning, thus stopping all
traffic in the network for a while. But with MSTP, when a bridge falls in a region, it does
not affect transport in other regions. MSTIs which have the fallen bridge as a leaf are not
affected so only VLANS which were mapped to an MSTI in which the fallen bridge was
not a leaf, would be affected.
In conclusion, MSTP achieves load balancing and quick resilience from errors
while trying to occupy as little memory space as possible.
2. The goal of the project
This project assists a system administrator to configure a bridged LAN using the
MSTP, by providing an easy to use GUI. After entering the required input, the system
administrator will be able to see the stable state of the network including problematic
connections in the network.
The algorithm described in the IEEE 802.1s standard is a distributed algorithm.
However the software created in the project will use non-distributed algorithm, therefore,
comparison of the results of both algorithms will be done as well.
3. The algorithm
In this project two different techniques will be implemented and compared.
Non-distributed algorithm and distributed algorithm, that work on the same network
topology provided in the input. The end results of both algorithms will be the same.
Non-distributed algorithm:
Non-distributed algorithm includes three main stages:
1.
Reduction to shortest path problem.
2.
Executing Dijekstra algorithm.
3.
Determining spanning tree topology.
B1
10
LAN 3
2
LAN 1
7
6
1
B2
4
3
LAN 2
LAN 6
9
B4
2
11
B3
2
LAN 4
3
1
LAN 5
Reduction to shortest path problem:
1.1
Every bridge and LAN is converted to the vertex in the graph (named
bridge vertex and LAN vertex).
1.1.1
Each bridge vertex gets the MAC address of the bridge it represents.
1.2
Every connection between bridge and LAN is converted to two opposite
directed arcs connecting vertices that represent these LAN and bridge.
Every direct connection (full duplex) between two bridges is converted to
two opposite directed arcs connecting vertices that represent these bridges.
1.2.1
1.3
If a bridge is connected to a LAN in more than one port, port with the
lowest cost is chosen. If a bridge is connected to another bridge by
more than one port all ports are reduced to arcs.
Each arc directed from bridge vertex to LAN vertex gets the weight of 0.
Each arc directed from LAN vertex to bridge vertex gets the weight of the
port cost (assuming the port through which the bridge is connected to
LAN). Each arc directed from bridge vertex to another bridge vertex gets
the weight of the port cost of the bridge that is represented by the arc’s
end.
The port
cost
B1
10
0
1
0
LAN 3
LAN 1
B2
0
9
7
4
0
6
0
LAN 6
B4
LAN 2
0
3
0
11
3
B3
5
0
LAN 5
0
0
LAN 4
Executing Dijekstra algorithm:
2.1
Executing the Dijekstra algorithm of finding the shortest path from vertex
to all other vertices in graph starting from the bridge vertex with the
lowest MAC address.
2.2
During the running of Dijekstra algorithm, if two vertices have the same
path length from root, the vertex with the lower MAC address is selected.
For each bridge-vertex if two arcs connecting it to the same vertex, only
the one with the lower weight will be chosen.
2.3
At the end of the Dijekstra algorithm a tree is created, such that every path
from the root to other vertex is the shortest path.
Determining spanning tree topology.
3.1
3.2
Determining the root: For building the CST the bridge vertex with the
lowest MAC address is selected as the root. For building the other 15
MSTIs per region the bridge vertex with the lowest priority is selected as
the root.
For each LAN-vertex v in tree:
Let B be the bridge represented by the parent of v in the graph. The port
that connects B to the LAN represented by v is the designated port on this
LAN.
For each bridge-vertex b that is son of v:
Let B be the bridge represented by the vertex b. The port that
connects B to the LAN represented by v is the root port of B. (if
there are more than one port look in 1.2.1)
For each bridge vertex v that is parent of another bridge vertex i:
All ports of v connecting v to i are marked as designated, port of i
that is in the tree is marked as a root port, all the other ports
connecting i to v are marked as backup ports.
3.3
For each bridge that is connected to the same LAN with more than one port,
every port that is not in the tree is marked as alternate.
Comments:
There are no arcs between two bridge vertexes or between two LAN vertexes, hence in
the result tree of stage 2 LAN vertex’s parent and sons are always bridge vertexes.
B1
D
D
LAN 1
R
B2
LAN 3
D
R
LAN 6
LAN 2
B4
D
D
R
LAN 5
B3
D
LAN 4
To create all the instances of the trees inside all the regions the algorithm is run for every
instance of spanning tree in every region limited only to the bridges inside this region.
The Master root port is selected at the port linking a bridge from within the region to a
bridge outside the region in the CST.
Distributed algorithm:
The MSTP (for the description of the protocol it is presumed all the bridges support
MST):
1. Every bridge that “wakes up” and doesn’t have a root defined on one of its instances,
waits a few seconds and then nominates itself as the root on that instance.
2. Every bridge, which has itself defined as root, sends every once in a while (1-4
seconds) a control frame (MST BPDU) that contains its identity and its MST
Configuration identifier. The MST BPDU contains information of all 15 instances as
well as the information needed to build the CST.
3. Every bridge sets the root port to the port from which the MST PBDU with the lowest
identity on that instance was received.
4. If no MST BPDUs were received from a LAN connected to the bridge, the bridge
considers itself to be the designated bridge on that LAN (for the CST and for each of
the instances).
5. Every bridge that receives an MST BPDU on its CST root port sends the MST BPDU
to all the LANs where the bridge is defined as designated bridge. (Since there are 16
instances, notice that a port which is marked designated on one instance, can be a root
port in another instance, and so the message can be sent back to the LAN from which
it came). In case a bridge receives the same BPDU as the one it sent it selects the port
with the lowest cost of all ports that receive this BPDU to be the designated or root
port as was defined. In case bridge receives a BPDU on the full duplex port, all other
full duplex ports that receive BPDU from the same bridge are marked as alternate.
Note: If the MST BPDU was received from another region (different MST
Configuration identifier) the bridge disregards the information on the last 15 instances
in the message, and updates these fields by the info it holds.
5.1. an MST BPDU contains the following (relevant) details for each instance:
5.1.1. The identity of the sending bridge and the port that it wants to be the
designated port on that LAN.
5.1.2. The identity of the bridge the sender has identified as root.
5.1.3. The path cost of the route from the sender to root. (calculating also the
bridges priority)
Comments:

If there are RST or SST bridges in the network, notice that the beginning of the
MST BPDU is the exact information these stations need, so there are no conflicts.
(The station simply disregards all other added information). If the BPDU an MST
bridge receives is not an MST BPDU, it turns it into one.

The CIST root in each region (the root of instance 0) is the bridge whose CST
root port is a boundary port (port which the designated bridge on its segment is in
a different region). There is only one bridge that fit the description; otherwise
there is a circular path in the CST.

Only the root of instance 0 (the IST) is not chosen according to its MAC address.
All the other roots of the MSTIs are chosen by their MAC address.

The MSTP creates the CST using the RSTP and simultaneously builds 15 more
instances of spanning trees in each region by using a priority vector (in order to
create different instances, different priorities for the bridges are used in each
instance creating different trees with the same root). The first fields of the MST
BPDU are of the CST tree. Notice that the information sent there, is not
disregarded when leaving the region.
4. The GUI
The application will consist of the main screen, which includes all the menus. Inside the
main window CST tree will be shown while each region is represented as a single vertex.
Upon double clicking on vertex, a new window will open with IST of the region that this
vertex represents. In this window user will be able to select between one of the sixteen
instances of the MST.
A peek to how the GUI will look:
Download