Ccna Training -the Spanning-tree Root Bridge
The Spanning-tree Root Bridge
The Spanning-tree Root Bridge
Spanning tree is a protocol which exists to ensure loop free paths at in a bridged LAN. Spanning Tree works at layer 2 of the OSI model.
Spanning-tree does not prevent excessive unicast, Multicast or even broadcast traffic even though spanning-tree is touted as a protocol which prevents broadcasts storms. This is a misconception. Spanning-tree can only block ports to prevent loop occurring.
How Loops occur.
Loops occur in networks where the design requires a redundant topology, where you can trace a path from one point around the entire network and return to your point of origin without retracing your path.
Lets start with a simple example of three switches connected in a fully meshed topology, we'll call them Switch A (SWA) Switch B (SWB) and Switch C (SWC) connected as follows:
P.C-----SWA----SWB----SWC---SWA
When SWA gets a frame from the P.C directly connected to one of the switches ports will perform a lookup against it's MAC table to see if it has an entry for the egress port for the frame based on the destination address in it reads in the frame. If SWA cannot find a match in the MAC table it will flood the frame out of all available ports other than the port that the frame was received on, SWB will receive the frame from SWA perform the same lookup operation find no match in the MAC table and flood the frame out of all ports up to SWC. SWC will receive the frame from SWB perform the same lookup operation find no match in the MAC table and flood the frame out of all ports up back to the point of origin SWA, thus we have a loop, SWA will repeat the process and unless one of the links between the switches is disconnected, the power is removed from one of the switches or we use spanning tree to block one of the ports in our little network, just one port will do the trick, we just need one single active path between any of our switches.
This is the concept that we must understand is how we arrive at this one active path between any of our two switches. If a switch has say two paths leading to other switches like we have in our example network which one does it block?, or does it need to, in our network we only need one active path since traffic can go:
P.C-----SWA----SWB----SWC----back to SWA
Or
P.C----- SWB----SWC---- SWA---back to SWB
Or
P.C----- SWC---- SWA--- SWB---back to SWC
One of our switches, just one switch must decide that one, just one port must go into a blocking state. Which switch and then which port?
For a switch to decide which port to block it must see which one is of a "worse preference". The question remains as to what the "worse preference" is referred to
The preference in choosing "worse preference" is a value known as "Path Cost". Ports which have a lower path cost have a better chance of staying in the forwarding state, did you get that, lower path costs mean a better value so, having a high path cost is worse preference.
Think of it like this, when you leave your house in the morning to go to work you take the path that is the least distance, so a lower distance is preferable, a higher distance is in your case a worse.
Path Costs are determined by their interface data rate as follows:
10Mbps = Cost 100
100Mbps = Cost 19
1Gbps = Cost 4
10Gbps=Cost 2
So a switch will see which port has a higher path cost, and the port/s with higher path costs within the switching loop, i.e paths between switches ports connecting to end user devices such as P.C's are not part of the switching topology and will be considered to go into blocking in normal spanning-tree calculations.
The question is what is this path cost calculated against?.
We need to give our switches a point of reference in the network which they can determine a path cost from.
This is when the Root Bridge comes into play, the Root Bridge in Spanning tree acts as the reference point that all switches will use to determine how far each of their ports are from the Root Bridge.
The Root Bridge is elected automatically by spanning-tree or it can be determined by the administrator, best if it determined by you manually, and it is also best to place the Root Bridge as centrally as possible in the network. Another caveat is that the Root Bridge needs to be the most powerful device in your network.
A Root Bridge is selected as being the device in the network with the lowest Bridge ID. Every switch has a unique identifier and a value that can be configured by the administrator called a "Default Priority". The Unique Identifier and the Default Priority are combined to create a Bridge ID also referred to as BID.
Switch when first electing the Root Bridge exchange their Bridge ID's in layer 2 frames called BPDU's (Bridge Protocol Data Units), the switches compare received BID 's to their own BID's. The Default Priority which can be a value of between 0 all the way to 65535 is compared first. A device with a lower Default Priority is preferred as the Root Bridge, is Default Priorities are equal which would be the case if the switches were in their default states (32768) then the Unique Identifier is then compared, the Unique Identifier is the switches MAC address, So a switch with a MAC of 0001:1111:1111 is preferred over a switch with the MAC of 000A:1111:1111.
To ensure that you set the right device as the Root of the network it is advised to set the Default Priority to 0 on the device you wish to act as the Root Bridge.
In summary: the role of the Root Bridge is to act as the reference point in the network so that all switches can determine how far each of their ports are from the Root bridge and the port which has the lowest path cost is placed into a forwarding state all other ports that can lead to the Root bridge are blocked, ports in the switching topology that lead away from the Root Bridge may remain forwarding.
by: Joe Spoto
Ccna/ccnp Training- Ospf Hello Packet The Necessity of CNA Training The Importance of CNA Skills Training In the Life of a Nurse Some Mlm Training Tips Give Your Career Some Impetus With Ccna Training Course Gmp Training Steps Training Pension and Benefits Managers at Centennial College Setting Up A Training Program Foreign Currency Training Program Benefiting From The Inspiration Discovered With Melbourne Personal Training Ccna Ccnp Training Offset Lists Surgical Technologist Training Potty Training Girls: "watch" Them Grow