Monday, April 15, 2013

RSTP / MSTP PART-II Selecting the Optimal Blocking port

Dear Friends of my transmission fraternity,

In the previous blog post I had given the first two rules about how to provision when the RSTP is used as a major loop avoidance mechanism. However, I probably forgot to mention one very important thing in the earlier post.

I said "RSTP is not a protection mechanism it is more for loop avoidance" then how is protection achieved in a Layer 2 circuit?

Answer is a Layer -2 circuit is created when a VPN is formed and a VPN is nothing but a kind of a cross connect that you have in the SDH. However we cannot directly co-relate a VPN with a cross connect because in a cross connect the PTP and the CTP are all hard wired however in a VPN the process is different. There may be two or more than two connectivity points in a VPN and these are bound by something called as a vFIB or Virtual Forwarding Information base. The frame makes a decision on the egress port based on the Mac Table learning and if it is not able to make a decision, well it is flood. So a VPN has two modes, Flooding mode (When addresses are not known) and Forwarding mode (when addresses are known).

So if you already have more than one egress points in a VPN then be sure that the protection is already imbibed, so a VPN would first follow the MAC table and if a path fails then it takes the path that is actually present in the flooding mode. However the basic problem is the point when more than one path is active. Then in flooding state the traffic may be flooded to all the ports and then there may be a condition of loop.

It is to avoid this loop and streamline the protection that RSTP is used.

So when there is a failure the blocking path is unblocked and the traffic is seamlessly switched to the alternate path.

There are also elements like flushing involved in this to actually push the traffic to the alternate path however, this will be covered later.

Rule No: 3  Selecting the optimum blocking path for the RSTP topology

Continuing with the set of rules let us understand that the RSTP also selects the blocking path by the means of

a) Path Cost.
b) Port Priority.
c) Designated Port Number  (Ref Wiki Article on RSTP).

While a novice would actually let the protocol let do this activity and select the blocking port by itself an expert planner would actually exploit this mechanism and influence the selection of the blocking port. Remember one thing while planning of network is done for maximum reliability it also involves an element that when the active and the contingency are both available then there will be more and more stress on the effective utilization of dual bandwidth.

So as to the fact that when the ring is up we can have a dual BW utilization.

Attached is a picture of a mis-planned RSTP ring with respect to path cost and blocking link.

Now what is really wrong in this setup?

First of all the Root Bridge is not planned, which makes all the sanctity of Rule -1 as void. Secondly the traffic is from hub to spokes, and if the right side link is always blocking then in ideal condition there will be a problem in the sense that you will always have 100Mb/s of traffic in the Idle times also. So as to say that when the ring is intact you will only have 100 Mb/s of traffic flowing and no gain in the same ring.

The picture below will explain it.

So as you can see that when the ring is intact the maximum possible BW interchange between the Hub and the spokes are only 100 Mb/s. In a data planning scenario this is like a very novice planning. An efficient planner will not do this, never.

So what is the right way of going ahead? How can we actually ensure that we have a more controlled instance of the RSTP to our benefit.

So friends, let us understand the nuances of creating the blocking link to our benefit. If we see the example above then it is very clear that you have 4 spoke locations in the entire setup and the best possible location of having the blocking link is the link between the second and the third spoke.

To do this we need to understand that which is the factor of  blocking port that is actually in our hands.

1. Designated Bridge Port........ No.
2. Port Priority....... May be but when you have more number of ports in hand it is better not to touch that.
3. Path Cost..... Yes.

The path cost is something that is in our hands and so if we make the path cost of the segment between the second and the third link to be highest then there is most probability that the link would be the blocking link.

Also we keep in mind that the other links' path cost are kept at a much lower side. Because remember the basic statement of RSTP.

"For N number of paths to the root bridge from a bridge N-1 Paths would be in a blocking state"

So the computation of the paths is done taking the sum of all the cost of the segment that is coming from the root to the expected bridge.

Look at the picture below.


The picture explains the following.

> First of all the root bridge is selected as the HUB.  So both the egress ports and all the ports are in actually forwarding state.

> Then the link in-between the second and the third  bridge is assigned the highest path cost. This makes the link as the blocking link.

However, let us understand how optimal is that. For this look at the next picture.

Now as you can see that there is a double usage of the same 100 Mb/s infrastructure. This is happening due to optimally planning the RSTP blocking path. This means that in the ideal scenario where there is no ring cut there will be double the BW available for all the sites. Efficient planning like this will actually lead to more use of EIR ( Extra Information Rate) which can be sold at BE prices.

Thus this kind of planning either saves revenue in a traffic sparse area by conserving resources or generates more revenue in a traffic opulent region by actually investing less resources.

In the next part we will study how to construct services in the RSTP configuration. Lot many parts to go.

Till then some tips.

1. Understand the requirement of BW per pop rather than taking the holistic picture.
2. Compute what will be the total requirement of BW and carefully place the blocking link.
3. Try to divide the RSTP ring in a pattern where efficient division of BW can happen, this is not technology, this is basic mathematics which you and I all have studied and you don't need a crash course for it.
4. Listen to the requirement of customer.... Because if he wants to kill a mosquito do not bring a tank.

And happy planning and provisioning.




  1. Nice article. Just to add to the above:-

    Port priority & Port number only comes to picture when we have direct links between 2 switches.

    In case we have a ring & there is a tie of path cost then designated & blocking port is selected on the base of bridge ID to which the port is connected. let's say we have a ring of 4 switches A,B,C & D. Now if A is RB & path cost of all the links are same then there is a question that which will be the blocking port at C, whether it'll be the port of C towards D or towards B. In this case it'll be selected on basis of Bridge ID of B & D, so say if B has lower bridge ID then the port of C towards B will be designated & other one will go into blocking state.

    So in the above described case even if the path costs are not manipulated & only Bridge ID's are changed then also we can control the blocking port.

  2. Hi Deepak,

    Right so and quite true. I was actually reserving this for the MSTP section. Because in MSTP, I believe, and correct me if I am wrong, that you cannot play much with the path Cost and you have to play more with region and instances. In the case of MSTP if I want different Blocking for different instances of SVLAN then I would be putting different Bridge priorities for different instances and selecting the Blocking for different Instance.

    So in your example if say for one instance I want to select the port towards B as Blocking so for that instance I would have Bridge B as a higher Bridge Priority and in other instance say I want to select the port towards D as blocking then for the other instance I will have Bridge D as a higher priority.

    I believe this will work and we will have different Blocking for different instances.

    1. Yes Kalyan, in MSTP you can have different blocking for different instances & that is why you can optimally use the BW there. You can have different VPN's there (different SVLAN) & each VPN will forward traffic according to it's own MSTP instance forwarding path in the same topology.

      However the fact is that selection of Blocking port is regardless of MSTP & RSTP (it's based on path cost & then bridge ID). Hence for selecting the blocking port you can manipulate the bridge ID both the cases.

      Port priority & port number comes into picture when 2 switches are connected directly with redundant links, so say you have Switch A & B with 2 links between them, A is the RB, now which port in Switch B will be blocking in case path cost of both links are same?

      In this case since connected bridge to both ports of B is A hence Bridge ID can't break the tie, so port priority & port number will break the tie here.

  3. Hi Deepak,

    So that is what I was trying to understand, that if we make a topology ring with MSTP enabled then the Path cost assignment happens well before, that is when the ring is being made. Now for a transmission engineer to use MSTP optimally at that time it becomes easy to play with the bridge ID per SVLAN as you mentioned. Now here the user (typically a TDM user) will go to the bridge profiles and keep on changing the Bridge ID as per his/her convenience as per the Service.

    However, in RSTP where there is most of the time the requirement of a Ring it is much easier for the Tx Engineer to actually go ahead and keep Bridge IDs fixed and then drastically vary the path Cost in the link that he/she wants blocking.

    You are definitely right about the fact that if there are two redundant links between the same bridge then port priority would come into picture. So when A is RB and the blocking has to be in the B switch then definitely that comes into place. However, I believe there also we can play with the path cost by keeping the port priority same right.

    1. Yes kalyan definitely you can play with path cost in case of RSTP also in order to select the blocking port however sometimes this solution may not be scalable as we may add on BW of the link (say LAG added to it or VC's added) in that case Path cost will automatically be updated as per the new BW of the link & again convergence will happen.