Introduction

A switch is a multi-input ,multi-output device which transfers packets from an input to one or more outputs. It is a mechanism that allows us to interconnect links to form a larger network. When we need to interconnect a pair of Lans (Ethernets) we would choose one of the following two implementations: 1. Use a repeater between the 2 LANS. 2. Use a node between the 2 LANS and have this node forward frames from one LAN to the other. However, the first approach has a disadvantage following from the physical limitations of the Ethernet that not more than 4 repeaters can be used between any pair of hosts and also not more than a total length 2500 m is allowed. To overcome this problem, the second approach is used as it has the ability to accept all the frames transmitted on either of the Ethernets so that it can forward that to the other. This node is called a 'Bridge' .A collection of LANS interconnected with the help of one or more of these bridges is said to form an 'Extended LAN'. The most significant problem we face in this network topology of Extended LAN is the presence of cycles or loops .A serious consequence being that the packets will loop through the extanded LAN forever.Thus Bridges should be able to correctly handle loops. We have included a link titled 'The Problem of Loops' to help you understand better how loops can bring a network down to its knees. 'The Spanning tree' is a subgraph of the original topology,which touches each and every node but ensures that no cycles are present. We compute a distributed Spanning Tree for the topology of the interconnected bridges. The Spanning Tree Algorithm is a protocol use by a set of bridges to agree upon a spanning tree for a particular extended LAN. The Bridge has a port for each Lan that it connects. Using this algorithm the bridges select the ports over which they will and will not forward frames. The algorithm is dynamic ,so that should any bridge fail it will recompute a new spanning tree. Go through the sections on 'The Spanning Tree Protocol' and 'The Project' for better understanding......