Search code examples
network-programmingconnectionbridge

Interconnections between bridges in computer networks


Can anybody tell me how the connections between the bridges are made without hosts in the given diagram below? I have got confused as how the connections are made at port 4 and port 3 of bridges B3 and B5 respectively . The question is to construct the spanning tree.

enter image description here

Please Help.


Solution

  • It is very simple to construct the spanning tree.You need to know the following.

    First select the root bridge as the Bridge with smallest id.So B1 is selected as the root bridge.

    Then for each bridge except the root bridge,select the root port,which is the port that has least cost path to root bridge.In case of ties select lowest id port.

    Then for each LAN,except the LAN's directly connected to root bridge,find a designated bridge,the one which has the least cost path to root bridge.Again in case of ties select the bridge with lower id.

    Then for each designated bridge,the port that connects the bridge to corresponding LAN is selected as the designated port.

    Finally,the designated and root ports are put in forwarding state and rest are in blocking state giving us a spanning tree.

    For the given problem,The solution using above algorithm is:

    Root Ports

    B2--1 ,B3--3, B4--1,B5--2

    Designated Bridges

    For LAN with H5,H6 is B3.For LAN with H7,H8 is B3.For LAN with H9,H10 is B4.For LAN with H11,H12 is B2.

    Designated Ports

    B3 has 1,2(1 for LAN with H5,H6 and 2 for LAN with H7,H8)

    B2 has 3

    B4 has 3

    Feel free for any queries.