Thursday, October 27, 2016

Leave a Comment

Spanning Tree Protocol Port States

                   A Spanning Tree is going to be a Logical, Loop Free Topology and, i say it’s a “Logical Loop Free Topology”, because physically like the Topology, we see on Picture.
                   Physically it’s looks like we have a Loop, it’s looks like we got the path between Switches A and B, where packets could Circulate Endlessly but, with Spanning Tree Protocol we going to logically make one of the ports, on one of those Switches Block Traffic. We gonna prevent traffic from flowing in and out of one of those ports, that’s what Spanning Tree Protocol can do for us. It can give us a Logical Loop Free Topology, which is gonna give us Redundancy. Well avoiding the ugly side of facts that come with Layer 2 Topological Loop like we discussed, a Spanning Tree has a Root Bridge, and we want to be able to administrative influences, which Bridge, which Switch becomes the Root Bridge.
                 If we just plug several Switches together without configuring Spanning Tree Protocol. Spanning Tree Protocol will automatically elect the Root bridge, however The Bridge, The Switch that’s the elected is the Root Bridge, it might not be the Optimal Switch, and order to influence the Root Bridge, we need too able to look at the topology like this, and on paper to determine.
   Ø  Who is the Root Bridge in this Topology?
   Ø  Which Ports Are Forwarding?
   Ø  Which Ports Are Blocking?
                   The first question that we ask, who is the Root Bridge. In a Spanning Tree Topology, we have One Root Bridge, and Switch that has the Lowest Bridge ID.
                   The Bridge ID is made up of a Switch Priority, which is something that we can administratively set as well as a Mac-Address, and on Cisco Catalyst Switches the default Switch Priority, that we have is 32768, we could make that value lower to influence that Switch to become the Root Bridge.
                   What if we interconnect bunch of Switches, and we do not set the Switch Priority to something other than the default. Well the Mac-addresses, is the different Switches acts the Tie Breaker, the Switch with the Lowest Mac-Address become the Root Bridge, if we do not go in, and influence the Switch Priority.
Let’s take a look at the Topology on Picture.
                  We got a couple of switches, and the Priority Value of these switches are the default values 32768, that means we gonna use the Switches Mac-Addresses as the Tie-Breaker. The Question we need to ask is
   Ø  Who is the Root Bridge?
                             They have an Equal Priorities that means we look to see who has the lowest mac-address. Let’s look at the first 3 Hexadecimal digits in each Mac-Address. On Switch A, the First 3 digits are 001, and Switch B the first 3 digits are 000Oh! That’s less than 001” that’s tell us, that Switch B, because the Priority is equal. The Switch B is going to be Elected as the Root Bridge.
                       We now know, which Switch is going to be the Base of our Spanning Tree. However, we do not yet know
   Ø  Which port are going to be Blocking
   Ø   And Which Port are going to be Forwarding
 To determined that, we need to understand the different ports states that Spanning tree has.

                          First up is a Root Port “A Root Port is a Port on a Non-Root Bridge, Root Bridge does not have any Root Ports. It’s the Port on a Non-Root bridge that is closest to the Root Bridge in terms of Cost”.
                   Well we know that, Switch B is not going to have any Root Port because it’s the Root Bridge, that means Switch A going to have Root Port. It’s only gonna have One (1).  
                  It’s the Port, that is Closest in Terms of Cost, and when we talk about Cost, we can look at the Interface Speeds, even though both interfaces that we see on Switch A are Fastethernet Interfaces. It doesn’t necessarily mean that they configured to run at Fastethernet Speeds. 
                 Notice that Fastethernet 1/0/1, up of the top of Switch A. It is running 100Mbps, however, Fastethernet 1/0/2 at the bottom of Switch A. It’s configured to run at 10Mbps, in you see from table on Picture.
                 That an “Interface Speed or Ports Speed” of 10Mbps, has an associated Spanning Tree Protocol Port Cost of 100. The Cost for a 100Mbps Port is 19. In order for Switch A, to get back to the Root Bridge, if it goes out of fastethernet 1/0/1, it’s gonna have a Cost of 19 to get there. If it goes out of Fastetherent 1/0/2, that’s gonna be Cost of 100 because that Port Speed is 10Mbps.
                The Cost is lower, if we go out of Fastetherent 1/0/1. Therefore, we can label our Root Port on Switch A as Fastethernet 1/0/1.
                The next Port State is a “Designated Port” and we have a Designated Port on every Network Segment. We got 2 segments on Picture “Top One and Bottom One”, and on each Segment, we going to have One Designated Port, and “It’s the Port, that is Closest to the Root in Terms of Cost” and since both of these Segments touch the Root Bridge. This is going to be easy in this Topology because we are not gonna get Closer to the Root, that actually being on the Root. This means that both Ports on our Root Bridge are “Designated Ports Gigabit 0/9 and Gigabit 0/10”.
               The Next Type of Port, we have is a “Non-Designated Port or a Blocking Port”. By the way we could have a Port, that was “Administratively Shutdown”. It would “be Disabled” and if it were “Administratively Shutdown”, Spanning Tree Protocol would not Administratively bring at Backup, if it were needed it’s just going to be Shutdown. We assuming that in this Topology, we truly do have Backup Path. We were assuming that, none of these Ports are Shutdown, that means that any Remaining Ports, that we not already identified as a “Root Port or as a Designated Port”, any another Remaining Ports, we gonna be “Non-Designated Ports”, another words that’s gonna be “Blocking Ports”, and that means the Bottom Port on “Switch A Fastethernet 1/0/2”, that’s a “Blocking Port”.

Conclusion: - This gives us our “Loop Free Topology”. We not going to have a “Layer2 Topological Loop” because Production Traffic is not going to be flowing “Into or Out” of a Fastethernet 1/0/2 on Switch A.



              If You Like the Post. Don’t forget 
       to “Subscribe/Share/Comment”. Thank You.

0 comments:

Post a Comment