Friday 28 February 2014

Introduction to spanning tree protocol.

Description: STP, a link management protocol that is part of the IEEE 802.1 standard for media access control bridges. Using the spanning tree algorithm, STP provides path redundancy while preventing undesirable loops in a network that are created by multiple active paths between stations. Loops occur when there are alternate routes between hosts. To establish path redundancy, STP creates a tree that spans all of the switches in an extended network, forcing redundant paths into a standby, or blocked state. STP allows only one active path at a time between any two network devices (this prevents the loops) but establishes the redundant links as a backup if the initial link should fail. If STP costs change, or if one network segment in the STP becomes unreachable, the spanning tree algorithm reconfigures the spanning tree topology and re-establishes the link by activating the standby path. Without spanning tree in place, it is possible that both connections may be simultaneously live, which could result in an endless loop of traffic on the LAN.
Spanning Tree Protocol Port Roles: Once the root switch is elected, each of the ports is given a role depending on its place within the STP topology; the available port roles when using 802.1D spanning tree are shown below:
·           Root: The port given this role is the selected best path to reach the root switch
·           Designated: The port given this role is selected with the best path to a specific switched segment; there is only one designated port per switched segment.
·           Alternate: The port given this role is selected as a backup to the root port; if the root port should have a problem, this port would take over the root port role.
·           Backup: The port given this role is selected as a back to the designated port; if the designated port should have a problem this port would take over the designated port role.

There are five different states that a port can be in, described below:

·        Blocking State: Ports that are in the blocking state do not forward traffic; they simply listen to the network to ensure that they should continue to block traffic. Should the state of the switched network change, the port could transition to listening state. All ports start in blocking state after initial switch initialization.
·          Listening State: Ports that are in the listening state do not forward traffic. While in this state, the port will only listen to traffic as they did when in blocking state. This is the first state that comes after the blocking state after the port is set to start frame forwarding. The default time in the listening state is 15 seconds.
·         Learning State: Ports that are in the learning state do not forward traffic; while in this state the port will listen to traffic and begin to learn addresses from the connected devices on a segment. The default time in the learning state is 15 seconds.
·     Forwarding State: Ports that are in the forwarding state forward traffic as well as continue to learn addresses from the segment.

·           Disabled State: Ports that are in the disabled state do not forward traffic or listen to the network traffic.

Solution: The given topology is:


Spanning tree protocols commands:
1.      Show spanning-tree
Syntax:  switch# show spanning-tree
Use: This command will display the root switch as well as root ID, bridge ID and port status.
Output:


2.      Show spanning-tree summary
Syntax: switch# show spanning-tree summary
Use: It will display the summary of port status.
Output:



3.      Show spanning-tree detail
Syntax: switch# show spanning-tree detail
Use: It will display detailed information of ports.
Output:


4.      Show spanning-tree interface fa0/1 or fa0/2
Syntax: switch# show spanning-tree detail
Use: It will display the STP interface status and configuration.
Output:



Output:
1.      Root switch: Switch0
Priority: 327689
MAC address: 0002.16BC.9D27

2.      Non -root switch: switch1, switch2
Switch 1:
Priority: 327689
MAC address: 000C.CF67.7622
Switch 2:
Priority: 327689
MAC address: 0060.3E85.3269

3.      Blocked port: Fa0/3 on switch 2

4.      Port status on switch 0
fa0/1 is in designated forwarding state.
fa0/2 is in designated forwarding state.
fa0/3 is in designated forwarding state.
fa0/4 is in designated forwarding state.

5.      Port status on switch 1
fa0/1 is in designated forwarding state.
fa0/2 is in designated forwarding state.
fa0/3 is in root forwarding state.
fa0/4 is in designated forwarding state.

6.      Port status on switch 2
fa0/1 is in designated forwarding state.
fa0/2 is in designated forwarding state.
fa0/3 is in alternating blocking state.
fa0/4 is in root forwarding state.

0 comments:

Post a Comment